• 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

Adding Image Titles to Featured Post Widgets.

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 › Adding Image Titles to Featured Post Widgets.

This topic is: not resolved

Tagged: featured page, featured post, genesis, image, Image Title

  • This topic has 4 replies, 2 voices, and was last updated 12 years, 2 months ago by jonbarratt.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • January 27, 2014 at 8:53 pm #87380
    jonbarratt
    Member

    I was recently presented the challenge of using image titles for Genesis featured-post widgets on the front page of a custom child theme (http://www.mickybooth.com.au). Two widgets were located on the front page, and as you'd expect, each required a different image. So, this is how it was achieved.

    1. Create a copy of the Genesis featured-post-widget.php file and add it to your child theme folder. Best to adhere to good protocol, so if you haven't already, create a lib folder in your child theme folder and place it there (childtheme > lib > featured-post-widget.php).

    2. Open the copied .php file and rename the file on line 21 to uniquely identify the new widget.

    class Genesis_Featured_Post extends WP_Widget {
    to -
    class Genesis_Custom_Featured_Post extends WP_Widget {

    then include the new image area by adding -
    echo '<div class="featured-title"> </div>';
    on line 133 before -
    if ( $instance['show_image'] && $image )

    3. Open your child theme functions.php file and add the following code -

    /* Code for Replacing Feature Post Widget */
    include_once( CHILD_DIR . '/lib/featured-post-widget.php' );
    register_widget( 'Genesis_Custom_Featured_Post' );
    add_action( 'widgets_init', 'unregister_genesis_widgets', 20 );
    function unregister_genesis_widgets() {
    unregister_widget( 'Genesis_Featured_Post' );
    }

    4. Open your child theme style.css file and add the class -

    .featured-title {
    height: [height of image]
    width: [width of image]
    background: url([of image]) no-repeat;
    }

    and style / position accordingly.

    To use alternative images for multiple featured post widgets, simply identify the widget ID prior to the .featured-title class (eg. #featured-post-4 .featured title) and use the url of the alternative image.

    And that's it!! You could do similar for featured-page widgets as well.
    Hope it makes sense.


    http://www.krolyn.com | Facebook
    “I don’t have any idea what I’m doing half the time. The other half, I’m brilliant. Asleep, but brilliant.”

    http://www.mickybooth.com.au
    April 8, 2014 at 2:40 pm #99148
    Susan
    Moderator

    Did you ever get this figured out? I’d be happy to escalate if you are still looking for resolution.

    April 8, 2014 at 4:36 pm #99209
    jonbarratt
    Member

    Thanks Susan. However, this post IS the resolution.


    http://www.krolyn.com | Facebook
    “I don’t have any idea what I’m doing half the time. The other half, I’m brilliant. Asleep, but brilliant.”

    April 8, 2014 at 4:58 pm #99211
    Susan
    Moderator

    Thanks, Jon - I just changed the category from "Not Resolved" to "Not a Support Question".

    April 8, 2014 at 5:10 pm #99213
    jonbarratt
    Member

    Sorry about that, Susan. I didn't realise I needed to do that. Next time 🙂


    http://www.krolyn.com | Facebook
    “I don’t have any idea what I’m doing half the time. The other half, I’m brilliant. Asleep, but brilliant.”

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 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

© 2026 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