WordPress.org

Support

Support » Themes and Templates » [Resolved] Pages as Category Browser

[Resolved] Pages as Category Browser

  • Hello there.

    I like this theme, but there is something I just cannot find how to do.

    stoilov-it.com/ – this is my blog. As you see there are currently two pages called Home and news, which display all the posts in the blog. I want when I click on News, the posts displayed on the news page the be the ones under the category “news”, when I click on the tricks page (which is not present at the time), on the trick page to be displayed only the posts under the “tricks” category amd etc.

    What I do NOT!! want is the page to display an unordered list with links.(got tired of answers like this)

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Frumph

    @frumph

    There is a template that comes with Easel blog.php you can copy and edit it and attach it to whatever page you create, just add the line of code in each one for the specific category you want to use for that page

    Thanks, man. I kinda figured that out, but had read a little php to do it.

    Any chance you can be a bit more specific about what to change in the new php file?

    For example, you reference changing the “one line.” What line are you referring to? If I want to make a particular page show only the “Sesame Street” category, which line would that be and what would it look like?

    Thanks!

    <?php
    
    /*
    
    Template Name: My template
    
    */
    
    get_header();
    
    Protect();
    
    $blog_query = array(
    
    		'paged' => get_query_var('paged')
    
    		);
    
    $posts = &query_posts('showposts=5&cat=3&paged='.$paged);
    
    if (have_posts()) {
    
    	while (have_posts()) : the_post();
    
    		easel_display_post();
    
    	endwhile;
    
    	easel_pagination();
    
    }
    
    UnProtect();
    
    get_footer();
    
    ?>

    Line 17 – Where cat=(number) is your category id

    Thanks! Worked like a charm, once I figured out how to find the category ID haha.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Pages as Category Browser’ is closed to new replies.