• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Featured Image Text Overlay

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Featured Image Text Overlay

This topic is: not resolved

Tagged: featured image, image hover, image overlay, text overlay

  • This topic has 8 replies, 2 voices, and was last updated 7 years, 2 months ago by Brad Dalton.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • March 9, 2018 at 4:54 pm #217634
    Breezii K.
    Member

    Hello,

    Am using the Wellness Pro child theme on the genesis framework with the latest version of wordpress. Am wondering if there was any way to custom code the featured image so it displays a different custom caption for each featured image on the post page?

    If not possible, is anyone aware of a plugin that can do this that is compatible with studiopress themes?

    Thank you!

    - Bree

    http://mybreality.com
    March 10, 2018 at 12:32 am #217692
    Brad Dalton
    Participant

    This may work https://wordpress.org/plugins/wp-overlays/


    Tutorials for StudioPress Themes.

    March 10, 2018 at 2:05 am #217699
    Breezii K.
    Member

    Hello,

    Thank you for the response. I tried that plugin along with about 8 others and nothing seems to have worked for me, as far as I can tell.

    I did find this article, however;
    https://napitwptech.com/tutorial/wordpress-development/display-image-caption-added-wordpress/

    ...and am wondering if perhaps this method could work with the Genesis framework and Wellness Pro child theme I am using.

    If so, they first suggest this-

    For the display of the image caption under the featured image, you first have to know that which file is rendering the display of the featured image in your site.

    So I wonder where exactly in my files might the featured image be 'rendering to display'? 🙂

    March 10, 2018 at 2:26 am #217700
    Brad Dalton
    Participant

    You'll find the PHP code which adds the featured image in your child themes functions file.


    Tutorials for StudioPress Themes.

    March 10, 2018 at 10:12 am #217716
    Breezii K.
    Member

    I tried looking for it there the other night but am not sure exactly where this snippet of code needs to go; is it somewhere in this section?

    // Add featured image on single post.
    add_action( 'genesis_entry_content', 'wellness_featured_image', 1 );
    function wellness_featured_image() {

    $add_single_image = get_theme_mod( 'wellness_single_image_setting', true );

    $image = genesis_get_image( array(
    'format' => 'html',
    'size' => 'featured-image-large',
    'context' => '',
    'attr' => array ( 'alt' => the_title_attribute( 'echo=0' ), 'class' => 'aligncenter' ),
    ) );

    if ( is_singular() && ( true === $add_single_image ) ) {
    if ( $image ) {
    printf( '<div class="featured-image">%s</div>', $image );
    }
    }

    }

    // Modify size of the Gravatar in the author box.

    March 10, 2018 at 10:16 am #217717
    Breezii K.
    Member

    WHen I try to add the suggested code given from the article to the snippet of 'featured image' code found in my functions.php file (above) I see this error;

    Your PHP code changes were rolled back due to an error on line 169 of file wp-content/themes/wellness-pro/wellness-pro/functions.php. Please fix and try saving again.

    syntax error, unexpected '<'

    March 10, 2018 at 10:23 am #217718
    Breezii K.
    Member

    I think I may have to give up on this idea and try to find a different way of doing this perhaps. All I wanted to do was to show the Image Source Credit link on each of my featured images (but only on the post page and not the homepage).

    I seem unable to figure it out, hmm.

    March 10, 2018 at 10:24 am #217719
    Breezii K.
    Member

    Was hoping the image caption section would do this but it's not appearing, and I am not the best at working with custom code - all the options I have tried thus far have failed.

    March 11, 2018 at 10:29 pm #217801
    Brad Dalton
    Participant

    There's some work involved in this relating to PHP & CSS. I spent a few hours working on this example for a registered member.

    The source of the overlay text can be added on single posts.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble