[Resolved] [Plugin: TheThe Tabs and Accordions] Display Recent Posts
Hello, I have installed “TheThe Tabs and Accordions” plugin version 1.0.6 with WP 3.2.1. I would like to display recent posts using these tabs but I don’t know how that would be done. Ideally it would be a scrolling box held within the tabbed area. I can achieve that with CSS but can’t figure out how I might add the PHP required to display posts. I tried using the plugin “Shortcode Exec PHP” to input my recent posts but that didn’t work.
My question is, how can I call the plugin from a page template rather than a shortcode? And then, how can I input the PHP for recent posts? Thanks so much. This should look really cool when all finished.
[tabs title="Tabs Group Title" active=1 event="click"] [tab title="News"][event_recent_posts][/tab] [tab title="Events"]Second tab content[/tab] [tab title="Calendar"][event_recent_posts][/tab] [/tabs]
Shortcode Exec PHP code
$args = array( 'numberposts' => 5, 'offset'=> 0, 'category' => 5 ); $lastposts = get_posts( $args ); foreach($lastposts as $post) : setup_postdata($post); ?> <h6><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h6> <?php the_content(); ?> <?php endforeach; ?>
- The topic ‘[Resolved] [Plugin: TheThe Tabs and Accordions] Display Recent Posts’ is closed to new replies.