skip to Main Content
Our free WordPress themes are downloaded over 3 MILLION times. Get them now!

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Featured image captions #8063
    Steve87
    Member

    Aigars, thanks for your suggestion.

    Although I am a beginner I did manage and think there might be some others wo are interested in it, so here you are:

    For my site I needed a copyright information below the featured image. To put it onto the post view just edit the file content-single.php. You can put the code below
    <div class="post-inner-content"> or whatever your needs are.

    <?php // Custom Field
    		$string = get_post_meta(get_the_ID(), 'copyright', true);
    		if($string != '')
    		{
    		echo '<font size=5px><i class="fa fa-warning"></i> '.$string.'</font><br>';
    		}
    		?>
    

    This will put out the custom field “copyright” if it is defined (maybe the post option to define a custom field is hided, just activate it in the options).

    If you want to, you can add an icon of these: http://fortawesome.github.io/Font-Awesome/icons/
    If not, just delete <i class="fa fa-warning"></i>
    Please do not forget to adjust the font size.

    KR
    Steve

    in reply to: Featured image captions #7967
    Steve87
    Member

    Does it mean that it’s not possible on the category overview as well as on the blog post itself?
    I would like to add it to the blogpost under the featured image above the headline.

    Steve87
    Member

    Thanks Aigars, it does work!

    If anyone else is interested in the solution:

    Comment the following line out:
    $atts['title'] = ! empty( $item->title ) ? $item->title : '';

    =>

    // $atts['title'] = ! empty( $item->title ) ? $item->title : '';

    I do not know if there are other parts that will not work or if it has negative influence on searchmachines, but icons do work as well as the divider!

    Kind regards!
    Steve

Viewing 3 posts - 1 through 3 (of 3 total)
Disclosure: This page contains external affiliate links that may result in us receiving a commission if you choose to purchase mentioned product. The opinions on this page are our own and we don't receive additional bonus for positive reviews.
Back To Top