• Resolved jhkb

    (@jhkb)


    Hi all, after hours of searching I haven’t found a solution that will fix this for me.

    My local version using 3.0 works perfectly with this code:

    <?php if ( is_home() ) {
    query_posts($query_string . '&cat=-3');
    }
    ?>

    …but with the live 3.1 version the category is excluded but the next_posts_link only refreshes the first page of posts. I’ve tried lots of different methods of querying the posts including pagination (which seemed to fix the problem for almost every thread I read).

    Is this a problem specific to 3.1 that I’ve missed?

    http://www.jhkbdesign.co.uk/blog/

    Thanks in advance!
    Jess

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jhkb

    (@jhkb)

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('category_name=Uncategorized&posts_per_page=5&paged=' . $paged); ?>

    Just tried this and no luck either – it’s definitely excluding the right category, just not paging right. Any clues?

    I can paste my entire index page if this helps…

    Thread Starter jhkb

    (@jhkb)

    Here goes:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Since the last post i’ve tried suggestions to use wp_reset_query – so those are still in there. I’m at a loss…

    Edit: I also have a few ‘mini-loops’, a list of latest posts in my footer and a list of all posts from the excluded category in the sidebar. Not sure if these are causing the problem as they are also on the local version, which is working properly.

    Thread Starter jhkb

    (@jhkb)

    Sorry to go on but am I missing something really obvious here?

    Any help would be really appreciated!

    Jess 🙂

    Thread Starter jhkb

    (@jhkb)

    *facepalm* for anyone as silly as me, and to resolve this lonely thread, my permalink structure was set to numeric – I set a custom of /archives/%postname% and it worked.

    My host suggested this after I queried a conflict in versions of MySQL, they also claimed to have changed something in my .htaccess file which might have made a difference.

    Oh well – it works!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Navigation when excluding category broken in 3.1’ is closed to new replies.