• 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

Can I put the Genesis Featured Posts Widget in a page using shortcode or php?

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 › Can I put the Genesis Featured Posts Widget in a page using shortcode or php?

This topic is: not resolved

Tagged: amplified, featured posts, nick the geek, zozo tabs

  • This topic has 5 replies, 2 voices, and was last updated 11 years, 5 months ago by nutsandbolts.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • December 25, 2013 at 3:03 am #81145
    notfarnow
    Participant

    I'm trying to put the Genesis Featured Posts Widget OR Nick the Geek's Amplified version in a page using shortcode or php?
    Basically I'm using a tab setup (zozo tabs) and I want one of the tabs to show the top 5 posts with a featured image thumbnail.

    The code for the tabs is:

    <div id="tabbed-nav" data-role="z-tabs" data-options="{"theme": "silver", "animation": {"duration": 800, "effects": "slideH"}}">

    • Recent Posts *
    • Specs
    • Price
    • Release Date

    <div>
    <div>Genesis Featured Posts Here *</div>
    <div>Specs</div>
    <div>Price</div>
    <div>Release Date</div>
    </div>
    </div>

    http://www.gotoddrun.com/about
    December 25, 2013 at 11:08 am #81178
    nutsandbolts
    Member

    I have a tutorial for adding a widget area to a page - you could probably put the entire code for all the tabs in it: http://www.nutsandboltsmedia.com/how-to-add-a-widget-area-to-a-page-using-genesis/


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    December 25, 2013 at 11:10 am #81180
    nutsandbolts
    Member

    Oh, and you probably need this in your functions.php to allow shortcodes and PHP in widgets:

    // Enable shortcodes in widgets
    add_filter('widget_text', 'do_shortcode');
    
    // Enable PHP in widgets
    add_filter('widget_text','execute_php',100);
    function execute_php($html){
         if(strpos($html,"<"."?php")!==false){
              ob_start();
              eval("?".">".$html);
              $html=ob_get_contents();
              ob_end_clean();
         }
         return $html;
    }

    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    December 25, 2013 at 11:50 pm #81222
    notfarnow
    Participant

    Dynamite support thank you I'm working on it now. Is the the manual process of doing it with Genesis Simple Sidebars?

    December 26, 2013 at 1:38 pm #81284
    notfarnow
    Participant

    Ok I followed your great tutorial and got the widget area dialed in but I'm stuck on what to place inside the tab code.

    So if each tab has a separate div for its content:
    <div>
    <div>Genesis Featured Posts Here *</div>
    <div>Specs</div>
    <div>Price</div>
    <div>Release Date</div>

    What do I put in the div for it to show the Genesis Featured Posts Widget?

    For example:
    <div>
    <div>[Genesis Featured Posts shortcode Here]</div>

    or
    <div>
    <div><php Genesis Featured Posts PHP Here></div>

    Thanks!

    December 28, 2013 at 10:33 am #81584
    nutsandbolts
    Member

    Ah, I see what you're saying. This tutorial might help: http://petercoughlin.com/tweaking-the-genesis-featured-posts-widget/

    Personally, I think it would be easier to put in the posts yourself with column classes versus using the Featured Posts widget - that way you can control things more easily. So you could do something like this:

    <div class="one-fifth first">
    <center><a href="LINK-TO-POST"><img src="LINK-TO-THUMBNAIL"></a><br /><br />
    <a href="LINK-TO-POST"><h4>Title of Post</h4></a></center></div>

    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

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