• Is there any way that I can add text under a featured image, such as credit for the photograph, and then style this so it appears before the Title?

    I am looking to achieve something for a featured image, which I will be getting from Flickr and I also want to give credit to the owner, but I cant figure out how to input their name so it is styled correctly and in the right location?

Viewing 7 replies - 1 through 7 (of 7 total)
  • hello. i am sharing my code with you, i am currently using it to display post author over post thumbnail :

    HTML :
    <div class="credits">photo credits</div>
    CSS :

    .credits {
      position:relative;
      top: /*find out*/px;
      left: /*find out*/px;
      color:#fff;
      background: rgba(0, 0, 0, 0.4);
      text-align: center;
    }

    Please, use Google chrome or text editor to find out the appropriate values for top and left .

    Live Preview : a random post .
    this is the code i am using to do that :

    <style>
    #post-author {
      position:relative;
      top: -362px;
      left: 457px;
      color:#fff;
      text-transform:uppercase;
      font-family:'open sans', segoe ui light;
      font-size: 12px;
      background: rgba(0, 0, 0, 0.4);
      max-width: 72px;
      text-align: center;
    }
    </style>
    <div id="post-author">by samuel</div>
    Thread Starter 1200ug

    (@1200ug)

    Thanks for the reply with dedicated code!

    I have gone with WP Inject which allows me to search for CC images, and use them not only in my post but as the featured image. It also allows me to download them to my server to save in case the images go offline from the source.

    have you tried giving your featured image a specific height? try to locate them in your style file or plugin editor css, then set a height, always use it and the code will show the credits right in the same position every time. if your featured image appear also in front page, category, tag & archives .. then reply cause the position will commit failure ..

    you can also try a method which is changing your wp-caption text style and then while setting the featured image, credits can be added as image caption !

    @sam, don’t offer advice for people to change their code without first suggesting to make a child theme!

    @1200ug, first, create a child theme. Here’s how: Create a child theme.

    sorry respectyoda i forgot to mention that. i’d work with your tip from now on!

    Thread Starter 1200ug

    (@1200ug)

    I had created a child theme already ??

    Thanks a lot for your help sam elh, very much appreciated ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add text under featured image’ is closed to new replies.