WordPress.org

Forums

Easel
[resolved] Pages as Category Browser (6 posts)

  1. DrongoBG
    Member
    Posted 2 years ago #

    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)

  2. Frumph
    Member
    Theme Author

    Posted 2 years ago #

    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

  3. DrongoBG
    Member
    Posted 2 years ago #

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

  4. AlthalamundMangod
    Member
    Posted 2 years ago #

    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!

  5. DrongoBG
    Member
    Posted 2 years ago #

    <?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

  6. AlthalamundMangod
    Member
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.