• 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

Changing function of "Genesis – Featured Posts" image

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 › Changing function of "Genesis – Featured Posts" image

This topic is: not resolved
  • This topic has 2 replies, 2 voices, and was last updated 8 years, 11 months ago by Brad Dalton.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 23, 2014 at 8:48 pm #92074
    NWTD
    Member

    Is there a way to change how the image is displayed? Rather than just showing a thumbnail, I'd like to use it for the background of the widget area. I need it as the background to utilize the background-size property to integrate it properly into my theme.

    Ideally this would be done in my theme, not the Genesis Framework.

    Thanks!

    February 24, 2014 at 1:28 pm #92179
    NWTD
    Member

    Rather than altering the way the widget functions, could I add my desired output to the widget callback in the template?

    My current theme is calling the widget with the following:

    genesis_widget_area( 'home-top', array(
    	'before' => '<div class="home-top widget-area"><div class="wrap">',
    	'after'  => '</div></div>',
    ) );

    I tried the following with no luck...maybe there's a better way?

    $bkgd_img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'home-top' );
    	
    genesis_widget_area( 'home-top', array(
    	'before' => '<div class="home-top widget-area" style="background-image: url(' . $bkgd_img . ');"><div class="wrap">',
    	'after'  => '</div></div>',
    ) );
    February 24, 2014 at 5:32 pm #92214
    Brad Dalton
    Participant

    I don't think so but its a great question.

    I think you will need to filter the Genesis featured posts plugins output.

    Or maybe this plugin may include that option https://github.com/wpsmith/genesis-sandbox-featured-content-widget


    Get Help – Book Consultation.

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

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