Widgets categories not filtering

resolved (10 posts) (3 voices)

  1. I just noticed if I use the categories in my widgets the cat filter isn't being applied, it simply lists all the posts. If I use a direct cat filter it filters correctly.

    ../?cat=97 doesn't filter

    ../category/fine-art/ filters correctly

    I'm on 3.1.1

    Any ideas before I embark on a process of elimination?

    Posted 1 year ago #
  2. Ruderic
    Support

    Hello,

    Could you please provide us a link to your website, and your login details?

    I do not understand what you are talking about. If the widgets do not work, they have nothing to do with the URL.

    Posted 1 year ago #
  3. Ruderic
    Support

    Hi,

    I found the problem.

    Go to the theme folder, and open the file "lib/includes/template-blog.php", and you will find this code in lines #164 to #169:

    <?php
    $exclude_blog_cats = preg_replace("!(\d)+!","-${0}$0", $blog_excludecats);
    $query_string = "cat=".$exclude_blog_cats."&paged=$paged";
    query_posts($query_string);
    $counter=0;
    ?>

    Replace it with:

    <?php
    /*$exclude_blog_cats = preg_replace("!(\d)+!","-${0}$0", $blog_excludecats);
    $query_string = "cat=".$exclude_blog_cats."&paged=$paged";
    query_posts($query_string);*/
    $counter=0;
    ?>

    Please try that and let us know the results.

    Posted 1 year ago #
  4. Hi Ruderic, I replaced the code unfortunately that caused the blog page to become blank with no posts, and the cat filtering was unaffected so wasn't the solution.

    Posted 1 year ago #
  5. Quick up date, I switched themes to the default twentyten one and the category filtering worked as normal on selecting a category from the widget, on switching back the problem returned.

    Posted 1 year ago #
  6. Elliott
    Support

    Hello WilliamWilsonPhotography,

    Open up /wp-content/themes/awake/archive.php and on line 8 you should see this,

    query_posts($query_string . '&cat='.$exclude_blog_cats);

    Try changing it like this,

    query_posts($query_string . '&cat='.$exclude_blog_cats . '&category_name=' . get_query_var('category_name'));

    If that does not work for you then if possible PM us a Wordpress login so we can take a closer look.

    Posted 1 year ago #
  7. Hi Elliott it's the inFocus theme I've sent you a pm with log in info

    Posted 1 year ago #
  8. Just tried the code change in inFocus it looks to have worked, thank you.

    can I ask if this covered in the forth coming update or will I need to remember these fixes?

    Posted 1 year ago #
  9. Ruderic
    Support

    Hi,

    The developers will probably address this issue and fix it in the next update.

    As far as I know, a huge update is coming, with several modifications.

    Posted 1 year ago #
  10. Elliott
    Support

    I think it is a 3.1.1 bug, I am seeing it on my XAMPP setup as well. We have a big update for both inFocus and Awake as well as some new themes on the horizon so we'll be sure to have this updated.

    Let us know if you need anything else WIlliamWilsonPhotography.

    Posted 1 year ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme