• Resolved abeolson

    (@abeolson)


    The Archives for my blog are not currently working. I suspect it was due to some recent changes I made in order to have Tumblr posts imported into the blog. Currently, the most recent 10 blog posts exept those in the “tumblr” category show up for anything done that invokes the archives.

    This code:

    <!-- this was added to exclude the tumblr posts-->
    		<?php $page = (get_query_var('paged'))
    		? get_query_var('paged') : 1;
    		query_posts("cat=-19&showposts=10&paged=$page");
    		?>
    		<!--end tumblr exclusion code-->

    was added to the the main index.php in order to exclude the tumblr posts from the main blog (I’m using WP-O-Matic in order to import all my Tumblr posts and have them in their own tab, details on that here).

    The full index.php can be found at https://wordpress.pastebin.ca/962141.

    The ideal functionality is a search that works correctly and searches both posts of category tumblr and regular blog posts, but I still need to exclude all posts with the tumblr category from the main blog page.

    You can see the site at https://www.abeolson.com

Viewing 1 replies (of 1 total)
  • Thread Starter abeolson

    (@abeolson)

    Thanks to Yuchi’s post on another thread, I was able to find a good way to do this.

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

    is the code I use now, and the archives and search features work.

Viewing 1 replies (of 1 total)
  • The topic ‘Archives Broken: shows all blog posts’ is closed to new replies.