• Resolved websiteguide

    (@websiteguide)


    This worked before I updated the theme, but stupidly forgot to do a backup before installing the update. The Magazine Columns plugin now shows all posts, if there’s no posts found in the category selected. I looked at the query WP is doing, but I can’t think how to change it.

    $post_ids array is returning empty, which it should, but then WP is doing this query:

    SELECT wpdg_posts.ID FROM wpdg_posts WHERE 1=1 AND wpdg_posts.post_type = 'post' AND (wpdg_posts.post_status = 'publish' OR wpdg_posts.post_status = 'private') ORDER BY wpdg_posts.post_date DESC LIMIT 0, 10

    I don’t know what to alter to stop it from continuing if there’s nothing in the post_ids array

    • This topic was modified 7 years, 1 month ago by websiteguide.
    • This topic was modified 7 years, 1 month ago by websiteguide.
Viewing 1 replies (of 1 total)
  • Thread Starter websiteguide

    (@websiteguide)

    Done a nasty quick fix. Changed widget-magazine-posts-columns.php

    if ( $posts_query->have_posts()) :

    to

    if ( $posts_query->have_posts() && !empty($post_ids)) :

Viewing 1 replies (of 1 total)
  • The topic ‘Problems with Magazine Columns plugin’ is closed to new replies.