• I’ve run into a problem using the “articles” plugin from Alex King, and I’m hoping someone can help me out. This is on WP 2.3 with the latest version of the plugin. I have done an upgrade on my WP install, as well as a complete wipe and reinstall to troubleshoot this issue.

    As long as I leave all my categories alone, and never delete or modify them, the plugin works as expected. As soon as I delete a category, I get some major weirdness:

    1. Categories fail to display. For example, I have a category named “My Lists”, with one post in it containing the article property. That category never shows up on my articles listing. I can tag articles with multiple categories (My Lists and uncategorized) and the article will show up under any added categories EXCEPT “My Lists” on the articles page. This is not limited to a single category.

    2. Articles show up under the wrong category. I have seen articles that are not a member of a specific category show up under that category.

    Any ideas, or any additional information I can provide?

Viewing 13 replies - 16 through 28 (of 28 total)
  • If you want to show all articles in your article index remove
    “AND $wpdb->postmeta.meta_key = ‘article’ AND $wpdb->postmeta.meta_value = ‘1’” from line 80

    Yep, Andy(cowl). Thank you, ist works just fine.

    I think, the idea for the plugin is perfect. Until I found ist, i didn´t know, how badly i needed it and i´m grateful for Alex to provide the plugin. But now, this post is two month old an i´m not the only one encountering this problem.

    Isn´t it overdue to release a new version for this plugin? Probably many are testing this plugin, have the same problems as we have, and do not find the way to Andy`s solution. A pity.

    and it´s a pity too, that my comment on Alex´ blog, where i tried to show him this problem and this thread, was sent to hell. Nevermind, the plugin works for me now… *shrug*

    Thanks andycowl, it worked. In case anyone’s interested, I have edited the plugin to simply display all posts, but not pages (without needing article=1). Just replace the query in aka_get_articles to:

    $posts_data = $wpdb->get_results(“
    SELECT $wpdb->posts.*
    FROM $wpdb->posts
    WHERE $wpdb->posts.post_status = ‘publish’
    AND $wpdb->posts.post_date_gmt < ‘$now’
    AND $wpdb->posts.post_type = ‘post’
    GROUP BY $wpdb->posts.ID
    ORDER BY $wpdb->posts.post_date_gmt DESC
    “);

    As you might assume you can change ‘post’ to ‘page’ if you want to display only pages and not posts!

    is there a way to just list posts within a specific category?

    i want to show all posts under the ‘recipe’ category

    so it would look like so:

    —————————–

    Breads
    – Simple Bread

    Desserts
    – Many Hands Make Gingerbread
    – Chocolate Bark
    – Homemade Applesauce

    Soups
    – Matzoh Ball Soup
    – Butternut Squash – My Favorite Soup

    —————————–

    you get the idea

    thanks!

    I’d love this plugin if it would work. Want to try Andy’s solution. But where exactly do I put the code he proposed?

    Thanks!

    I’ve had the same problem since 2.3 upgrade (tags are probly the problem).

    The SQL for the categories is very hard to read, only because I can’t find a good description of the tag “term” tables.

    Alex, if you look at the articles tab on http://www.dracutforum.net, then look at the individual articles, you’ll see an example of how posts and pages are appearing under wrong categories.

    andy cowls fix worked for me here too.

    I am having the same issue. It is listed on my articles page posts under the incorrect categories. I am unsure of how to apply Andy Cowls fix. Any help is greatly appreciated!

    Thanks Andy Cowl, this fix worked for me as well (Running on Wp 2.3.3}. To apply the fix, just replace the code in the top part of the fix with the code in the bottom. Corrected everything.

    thehealthyskeptic

    (@thehealthyskeptic)

    THANK YOU! I spent hours trying to figure out what I was doing wrong, and I just discovered this thread. Andy’s solutions worked perfectly.

    Okay, I tried Andy Cowl’s fix and it worked. Sort of. Now I’m getting both categories and tags displayed. I just want it to be category and the articles, no tags at all.

    Any help? Maybe because I’m trying to apply this to WP 2.5.

    I am having the same problem as well as mmkurko, I am getting items for both categories and tags under wordpress 2.6.1.

    is there any way of changing the sql code to just use categories and not tags?

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘Articles plugin – failure to display categories/articles’ is closed to new replies.