• Hi WordPressers,

    I have changed my index.php so it only shows category 3 posts i.e. blogs. I done this by changing my code to:

    ?php query_posts(‘cat=3’); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <div <?php post_class() ?> id=”post-<?php the_ID(); ?>”>

    It all works fine, however when I try to click on the tag cloud or any archive it just shows them all rather than the relevant content. Any ideas why? The blog is on:

    http://www.liverpoolwebdesign.com/blog/

    Cheers,

    Andy

Viewing 3 replies - 1 through 3 (of 3 total)
  • <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'cat' => 3,
    	'paged' => $paged
    );
    query_posts($args);
    if ( have_posts() ) : while ( have_posts() ) : the_post();?>
    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    Thread Starter yooka

    (@yooka)

    Hi Esmi I tried that also but it doesn’t work it breaks the site when I try and click on the archives.

    Do you think it is anything to do with having custom permalinks set to /%postname%/ ??

    Thanks

    it breaks the site when I try and click on the archives.

    Then you’re either adding it in the wrong place or you have another issue in your theme.
    http://codex.wordpress.org/Function_Reference/query_posts

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Blog’ is closed to new replies.