Support » Fixing WordPress » Having the same post appearing on multiple pages?

  • akashnayee

    (@akashnayee)


    Hi, I’m totally new to wordpress but I have a question, so my blog at the moment is http://www.techka.sh
    and as you can see there are multiple pages along the header such as news, video, blog.

    I’m quite inexperienced and new to WordPressbut would like to know if this can be achieved.

    What I’d like to do is whenever I make a post on the home page, have the option to simultaneously post it in the appropriate page. At the moment, I have a separate category for each page but am not sure how i can go about doing this so any help would be appreciated, thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Jonas Grumby

    (@ss_minnow)

    There are at least a few ways. One way would be to create a template for each page and use query_posts or WP_Query to show only posts from one category on a page. If the category ID is 15 (for example) and you want to show 5 posts per page, you could replace the default query with one like this:

    <?php
    //The Query
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('posts_per_page=5&cat=15&paged=' . $paged);
    //The Loop
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    
    ?>
    Jonas Grumby

    (@ss_minnow)

    Read this to learn how to name your template files:

    http://codex.wordpress.org/Template_Hierarchy

    akashnayee

    (@akashnayee)

    I’m still a bit baffled about your suggestion as I’m an absolute beginner, firstly how do I create a template for each page, is there no simpler solution like switching the header tabs for categories or something similar such as a plugin?

    Jonas Grumby

    (@ss_minnow)

    Try searching the plugins directory.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Having the same post appearing on multiple pages?’ is closed to new replies.