Sidebar Block – Popular sorting shows no results

Posted in: Newspaper
Post count: 201

Hi,

Created a ‘Popular Articles’ block as a widget on our sidebar, but not getting the desired results.

It works fine if I choose Popular (all-time) as the setting, but when using the 24hr, 48hr or 7-day filters, the list shows up blank. The notes do state that these options “are affected by caching plugins and CDNs,” and while we do use caching, I was hoping to get at least a usable approximation rather than a blank list.

Have I missed another setting somewhere, or will the 7-day filter not work at all when caching (WP Super Cache) is used?

Post count: 27744

Hello,

To sort the block for Popular (24h,48h and 7days you need to have added the element SINGLE POST VIEWS => https://i.imgur.com/pLWuoSS.png -> https://i.imgur.com/BbrBmL0.png, also, for Popular you need to have this option enable https://i.imgur.com/grI3bti.png
You can find more information here https://forum.tagdiv.com/flex-block-settings-guide/

Thank you!

Post count: 201

Hi Anamaria,

Still haven’t been able to get this working.

Single post views are set not to be visible on the page (Post Settings -> Post and Custom Post Types -> Show Post Views is turned off).
However, view counts are being recorded and displayed in the list of posts in the WP dashboard.

‘USE LAST 24/48 HOURS & 7 DAYS POST SORTING’ is enabled under Block Settings.
‘ENABLE / DISABLE AJAX POST VIEW COUNT’ is also enabled under Post Settings.

When I create the relevant sidebar widget – https://imgur.com/a/BSiK7pT – choosing ‘Popular (all time)’ works, but ‘Popular (last 24hrs),’ ‘Popular (last 48hrs)’ ‘Popular (last 7 days)’ result in a blank list.

I have tried turning WP Super Cache off, but that makes no difference.

Post count: 27744

Hello,

Please let me know what template you use for posts, if you use a template from Theme Panel, then you need to enable the Post View from Post Settings -> Post and Custom Post Types -> Show Post Views (also, you can let enable for Single Post Template).
Also, I recommend creating the sidebar like in this article https://forum.tagdiv.com/sidebars-tutorial/ and you can use Flex Block.
Also, please provide the link to your website.

Thank you!

Post count: 201

Hi Anamaria,

Just tried your recommendation and you’re right, if I enable Post View from Post Settings -> Post and Custom Post Types -> Show Post Views, the sidebar block does then show popular articles from the last 7 days.

Question now is; how can I get it to work without publicly showing post views?

  • This reply was modified 4 years by c386.
Post count: 27744

Hello,

Please let me know what Single Template you use from tagDiv Cloud Library or Theme Panel.
If you have a Single Template from tagDiv Cloud Library, you can try to hide the Single Post Views from the tab called “CSS” -> https://i.imgur.com/IyOYDHq.png for post template from Theme Panel, you need to use a custom code CSS to hide it and try after this to see if the option to show popular articles the last 7 works.
.td-post-views
{
display: none;
}

This code needs to be set in Theme Panel -> Custom Code -> Custom CSS.

Thank you!

Post count: 201

Hi Anamaria,

We are using the ‘default’ post template in the Theme Panel: https://imgur.com/a/aVSUW6Q

You can see the sidebar block in question using this link as an example.

Post count: 27744

Hello,

You can use the code to hide the post views and try after to set the filter.

Thank you!

Post count: 201

Hi Anamaria,

Unfortunately the code to hide post views isn’t ideal, as the view counter does show briefly before the CSS hides it.

Is there no way to get the ‘last 7 days’ filter working with Show Post Views disabled?

Post count: 27744

Hello,

Unfortunately, there is no other option, because those options are created based on Single Post Views.

Thank you!

Post count: 201

Hi Anamaria,

Thank you for confirming.

Do you operate a feature request system? If so, I would like to propose more options for popular sorting and overall analytics.

Displaying popular articles from the last x days is important to us, and it seems odd not to be able to do so while the stats are available in the backend.

Thanks for your assistance.

Post count: 21065

Hello @c386!

Yes, I can add your query on our request list. Please let me know which options do you like to propose.

Thank you!

Post count: 201

* Ability to sort popular articles while front-end single post view count is disabled

* Option to show popular articles using date range – i.e. popular articles from those published in last 10 days

These additions would be most helpful.

Post count: 35449

Thank you for your suggestion!

“Ability to sort popular articles while front-end single post view count is disabled”
This can be done simple, just edit the single post template, select the post vide element and hide it -> https://i.imgur.com/pkMP2x4.png -> https://i.imgur.com/GrZT1T1.png and you’ll be able to use the sort without displaying the view count for users/visitor.

About the second request, there is a similar option -> https://i.imgur.com/C2daKmi.png -> https://i.imgur.com/cnSDAGi.png

I hope that those options can help you!
Thank you!

Viewing 14 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic.