Support » Theme: Sela » Sela Theme – Show Image Attribution in Featured Image

  • Resolved bigacelloy

    (@bigacelloy)


    When hovering featured images, I would like to show image attribution. Can someone guide me on this issue? I have added image “title” under media library but it seems the pulled image for featured is the resize version.

    If the image is inside a text widget or inside a post, I was able to add attribution by inserting title in the <img class

    The website is https://poetsgig.com

    Many thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Hi there – one simple way to do this would be to add a credit to the image graphic itself, would that work?

    If you didn’t want to go that route, so you’d have to set up something custom.

    Here’s a little tutorial to output the image caption near featured images, if you’d like to try adapting it for a hover effect:

    http://www.sourcexpress.com/how-to-add-caption-to-the-featured-images-in-wordpress/

    Don’t edit the theme files directly, otherwise your changes will be overwritten every time the theme is updated. Instead, create a child theme, so your changes won’t be overwritten when you update the theme. If you’re new to child themes, you can explore these guides:

    http://codex.wordpress.org/Child_Themes
    https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/

    • This reply was modified 9 months, 1 week ago by  Kathryn. Reason: typo

    Thank you, Kathryn. I tried the first source link you suggested and added the code in content-hero.php. After playing around with CSS, I got the workaround hover effect. This works for featured images on static pages. The outcome: https://poetsgig.com/about/

    Meanwhile, I have been longing to use child Sela theme but the steps only tell you to create functions.php and styles.css. When I did that, I got a broken theme error asking to add index.php. After adding index.php and hitting Live Preview, I got this Uncaught Error: Call to undefined function sela_content_nav().

    Also, if I had changes done for header, footer or other php files inside the parent theme, should I add them to the child theme, as well? Because when I tested, they also threw undefined errors (not the ones I’ve added but the error comes from the lines of original php file).

    If you feel my other questions are outside of the original topic. I can add another topic if you feel necessary. Thanks again.

    • This reply was modified 9 months, 1 week ago by  bigacelloy.
    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Hi there. It sounds like your child theme is not set up correctly.

    When I did that, I got a broken theme error asking to add index.php.

    You do not need to add index.php to create a child theme, and if you’re being prompted to do so, it sounds like your stylesheet might be missing the required Template line at the top.

    I’d suggest you go back through the tutorials to make sure everything is set up correctly. Once it is, you shouldn’t get any errors.

    Also, if I had changes done for header, footer or other php files inside the parent theme, should I add them to the child theme, as well?

    You should never edit the original theme files, since your changes will be wiped out every time the theme is updated. I suggest you move any changes you’ve made into the child theme and then reinstall a fresh, untouched, copy of the parent theme.

    Thank you, Kathryn. I finally made the child theme working.
    Two thumbs up for you!

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Glad to hear it!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sela Theme – Show Image Attribution in Featured Image’ is closed to new replies.