Community Forums › Forums › Archived Forums › Design Tips and Tricks › Can I put the Genesis Featured Posts Widget in a page using shortcode or php?
Tagged: amplified, featured posts, nick the geek, zozo tabs
- This topic has 5 replies, 2 voices, and was last updated 11 years, 2 months ago by
nutsandbolts.
-
AuthorPosts
-
December 25, 2013 at 3:03 am #81145
notfarnow
ParticipantI'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"}}">
<div>
http://www.gotoddrun.com/about
<div>Genesis Featured Posts Here *</div>
<div>Specs</div>
<div>Price</div>
<div>Release Date</div>
</div>
</div>December 25, 2013 at 11:08 am #81178nutsandbolts
MemberI 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 #81180nutsandbolts
MemberOh, 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 #81222notfarnow
ParticipantDynamite 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 #81284notfarnow
ParticipantOk 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 #81584nutsandbolts
MemberAh, 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+ -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.