Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php /*
- Template Name: Test Accordion IV
- */
- // ref link http://www.kimwoodbridge.com/wordpress-how-to-list-recent-posts-from-one-category/
- // wordpress support link http://wordpress.org/support/topic/do_shortcode-on-closing-isnt-working?replies=3
- get_header();
- /** Register default layout setting */
- ?>
- <?php genesis_before_content_sidebar_wrap(); ?>
- <div id="content-sidebar-wrap">
- <?php genesis_before_content(); ?>
- <div id="content" class="hfeed">
- <?php $shrt_cd = "[accordion title='Menus & Parties']";
- query_posts( array ( 'category_name' => 'menus-parties', 'posts_per_page' => '-1' ) );
- $shrt_cd .= '<ul>';
- while (have_posts()) : the_post();
- $shrt_cd .= '<li><a href="'.get_permalink().'">';
- $shrt_cd .= get_the_title();
- $shrt_cd .= '</a></li>';
- endwhile;
- $shrt_cd .= '</ul>';
- $shrt_cd .= "[/accordion]";
- echo do_shortcode( $shrt_cd );
- wp_reset_query(); ?>
- </div> <!-- end #content -->
- <?php genesis_after_content(); ?>
- </div> <!-- end #content-sidebar-wrap -->
- <?php genesis_after_content_sidebar_wrap(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement