• 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

Force the Genesis Featured Posts widget to show the 'Read More' link?

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 › Force the Genesis Featured Posts widget to show the 'Read More' link?

This topic is: not resolved

Tagged: force display, read more link

  • This topic has 2 replies, 2 voices, and was last updated 11 years, 3 months ago by Brad Dalton.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • January 5, 2014 at 1:29 pm #83398
    mattspaeth
    Member

    Have a layout where I am not showing content, but need the 'Read More' link. So basically, I am showing the post title only, and then want to have a button below the title for 'Read More'.

    I know how to take care of all the styling, but not sure how to force the widget to display the 'Read More' link if no content is being displayed.

    How can I achieve this?

    January 7, 2014 at 11:19 am #83839
    mattspaeth
    Member

    Found this great post on creating tweaking the Genesis Featured Posts widget by Peter Coughlin:
    http://petercoughlin.com/tweaking-the-genesis-featured-posts-widget/

    Using that, I created a duplicate of featured-posts-widget.php in the theme folder, unregistered the old one and registered the new one.

    Now I am trying to tweak the code to display the 'Read More' link when no content is being displayed, but having difficulty getting it to work.

    This is the section that I believe needs to be modified:

    		if ( ! empty( $instance['show_content'] ) ) {
    
    				echo genesis_html5() ? '<div class="entry-content">' : '';
    
    				if ( 'excerpt' == $instance['show_content'] ) { // Show Content 
    					the_excerpt();
    				}
    				elseif ( 'content-limit' == $instance['show_content'] ) { // Show Content Limit
    					the_content_limit( (int) $instance['content_limit'], esc_html( $instance['more_text'] ) );
    				}
    				else { 
    
    					printf ('Show Excerpt');
    
    					global $more;
    
    					$orig_more = $more;
    					$more = 0;
    
    					the_content( esc_html( $instance['more_text'] ) );
    
    					$more = $orig_more;
    
    				}
    
    				echo genesis_html5() ? '</div>' : '';
    
    			}

    I haven't been able to get any of my modifications to show up. I even commented out this entire section to see if it would break the plugin but it didn't. I was wondering if my theme was actually loading this version of the widget instead of the old one. So then I commented out the entire function that encloses this section, which did break the plugin so I know I have all that taken care of.

    This PHP is over my head. I am working through the tutorials at http://www.developphp.com/, but if anyone can offer some advice to help me get this project done, I would really appreciate it!

    Thanks,
    Matt

    August 2, 2014 at 4:41 pm #116731
    Brad Dalton
    Participant

    just worked out a solution you might find useful http://wpsites.net/best-plugins/custom-genesis-featured-posts-widget-you-can-modify-safely/


    Tutorials for StudioPress Themes.

  • 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

© 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