• Resolved qtpankajsingh

    (@qtpankajsingh)


    I installed this plugin today, but couldn’t get it working properly. Selected the categories from widget section, which needed to shown in front-end, but there was missmatch between post shown on page and count of post in calendar for that particular month.
    Look at the image below –
    Blog page

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author alek

    (@alekart)

    Hi,
    What is the url of the page after your domain (yourdomain.com/_WHATS_HERE_?_)
    What categories dis you selected in the widget? I see two different categories on the page (blogs, webinars).

    Plugin Author alek

    (@alekart)

    The links on the calendar open by default the archives page for a specified date. By default the archives page shows all the posts for the date.
    The plugin can be configured to filter this page but the url becomes less pretty and less SEO friendly.

    Thread Starter qtpankajsingh

    (@qtpankajsingh)

    hi @alekart,

    thanks for your quick response. link to the page is https://corp.qaitdevlabs.com/category/blog/

    And currently I have selected 4 categories in admin widget section.

    Plugin Author alek

    (@alekart)

    Hi,
    Actually there is a problem with my SQL request that counts the number of posts with selected categories for a date. I’ve never noticed this bug and you’re the first to report about this problem. I don’t know if this is due to WP changes or if it was always broken.
    I have to review my code, I’m not very good in SQL and it’s a pretty complex SQL request.

    I only can suggest you to disable post count for now.

    Sorry for the inconvenience.

    Thread Starter qtpankajsingh

    (@qtpankajsingh)

    Hi @alekart,

    I think I have corrected this by changing column to “tt.term_id” from “tt.term_taxonomy_id” name in the following query of file – “arw-widget.php” at line 186

    $sql .= "JOIN $wpdb->term_relationships tr ON ( wpposts.ID = tr.object_id )
    	JOIN $wpdb->term_taxonomy tt ON ( tr.term_taxonomy_id = tt.term_taxonomy_id
    	     AND tt.term_id IN(" . $cats . ") ) ";
    Plugin Author alek

    (@alekart)

    Hi, i’ve found the problem,
    should use COUNT(DISTINCT(ID)) to count unique posts. So if the post has 2 or more matching categories it was counted 2 or more times.

    I will release the fix as soon as possible.

    Thanks for pointing on the problem.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘calendar widget displaying wrong post count’ is closed to new replies.