Thanks for the reply and information. We have updated the theme and Yoast SEO plugin, but we are still seeing posts with two different url’s in the statistics. We have for example this article:
– https://indebuurt.nl/delft/nieuws/opmerkelijk/pokemon-go-hype-ook-delft/
– https://indebuurt.nl/delft/doen/pokemon-go-hype-ook-delft/
Both links refer to the same article, but the canonical link (and thus also the primaray category settings) are ignored since both url’s exist without one of them redirecting to the other.
Google Analytics is getting confused with the article pageviews because of this, and that is of course not a good thing. Any other idears on what might be causing this?



Hi
Thanks again for the quick reply, much appreciated. Reading back the mentioned topic I noticed that the issue has been known since February. The solution is not easy as I read, but can you give us a timeframe for this? Back in February the answer was also that you would try to fix it as soon as possible in a next release. That was three months ago. I hope it doesn’t take another three months?
Regards
Wilbert
Hi
Thanks for the quick reply. I know that the 7day post count does not represent the total views, but that is exactly why I want to be able to use that option. The sorting option was activated shortly after we started with the web site, so that can’t be an issue (and the ajax count view option you mentioned is activated). So this leaves me with the same issue since the latest theme update (and is not affecting articles published before the moment we updated the theme).
Is anybody else having the samen issue of can you reproduce it? My questions are basicly still the same:
1. What is causing the 7days post counter to register extra views
2. Why is post_view_count not affected
3. What can I do to get the correct number of views logged at post_views_count_7_day_total
Regards
Wilbert
Hi
Thanks for the quick reply. We really appreciate it! Checking the cache did the trick for the mega menu. The reason you assumed the solution worked on my end was because I deleted the articles in the category. I have restored one and can confirm that it is not showing in the mega menu, but it is visible in the big grid on the category page. I have followed your suggestion to apply the code to the grid template. Can you help me with altering the code and applying it in the code? I have looked at the code in the correct file, but don’t know how and where.
<?php
class td_category_top_posts_style_3 extends td_category_top_posts_style {
function show_top_posts() {
parent::render_posts_to_buffer();
if (parent::get_rendered_post_count() == 0) {
return; // die here
}
?>
<!-- big grid -->
<div class="td-category-grid">
<div class="td-container">
<div class="td-pb-row">
<div class="td-pb-span12">
<?php
echo parent::get_buffer();
?>
</div>
</div>
</div>
</div>
<?php
}
}
Hi
Thanks for the quick reply. I tried your code but without any luck. I have two images to illustrate what I am trying to accomplisch.Perhaps showing it helps you better understand or give me a hint on what I am doing wrong with your code.
The site has several Categories with Subcategories. One of those Categories is ‘Nieuws’ (Dutch for News). The category id for this category is 23. Nieuws has several subcategories, such as ‘File’ (Dutch for traffic jam). The category id for this category is 87.
I tried accomplishing what I want with this code:
if (get_class($this) == 'td_block_mega_menu' && $this->atts['category_id'] == 23) {
$this->atts['category_ids'] = "23, -87";
}
However, the result is still the same. The articles from the category File keep popping up in the mega menu and on the category page in the big grid.


Hope you can assist me further.