sotiro123 Posted February 22, 2012 Share Posted February 22, 2012 I'm new to all this so I'm finding it impossible to find an answer to this so hopefully someone can help me. I found this code on the internet which adds teasers to 1 static page. However, I want to add teasers from posts in a category to any page I specify. Any help would be much appreciated. class custom_loop extends thesis_custom_loop { function page() { if(is_page('thesis-size')) { global $thesis_design; $thesis_design->home['body']['content']['features'] = 0; $thesis_design->display['archives']['style'] = 'teasers'; $thesis_design->image['thumb']['y'] = 'before-headline'; $thesis_design->teasers['options']['date']['show'] = 1; $thesis_design->teasers['options']['excerpt']['show'] = 1; $thesis_design->teasers['options']['edit']['show'] = 0; global $wp_query; $saved_query = $wp_query; thesis_loop::page(); wp_reset_query(); $args = array('category_in' => array(199,186)); $loop = query_posts("cat=199"); thesis_loop::home(); wp_reset_query(); $wp_query = $saved_query; } else thesis_loop::page(); } } $custom_loop = new custom_loop(); Quote Link to comment https://forums.phpfreaks.com/topic/257534-code-for-adding-teasers-to-all-pages/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.