Support » Plugin: WordPress Popular Posts » Disable cropping of photos and set no limit to post view
Disable cropping of photos and set no limit to post view
-
Hi would like to check can I disable image cropping. Also I would like to check the popular post view to no limit instead of capturing daily view? Thanks.
-
Hi there,
would like to check can I disable image cropping.
Nope, there’s currently no way to do that using the settings provided. You’d need some custom coding for this, see How can I use my own HTML markup with WordPress Popular Posts?
Also I would like to check the popular post view to no limit instead of capturing daily view?
Sorry, I didn’t understand this. What do you mean exactly?
Hi thanks for the prompt response. Currently it is capturing the views daily and showing it. But after next day it will refresh and no post will be showing unless user click into different post then it will starting showing again.
The image it auto crop and resolution drop so there is no other solution except custom html markup?
I am using this to filter all views instead of daily
function custom_wpp_update_postviews($postid) { // Accuracy: // 10 = 1 in 10 visits will update view count. (Recommended for high traffic sites.) // 30 = 30% of visits. (Medium traffic websites.) // 100 = Every visit. Creates many db write operations every request. $accuracy = 100; if ( function_exists('wpp_get_views') && (mt_rand(0,100) < $accuracy) ) { // Remove or comment out lines that you won't be using!! update_post_meta( $postid, 'views_total', wpp_get_views($postid, 'all', true) ); } } add_action('wpp_post_update_views', 'custom_wpp_update_postviews');
and for the display
<?php $args = array( 'post_type' => 'articles', 'offset' => 1, 'stats_views' => 1, 'limit' => 7, 'wpp_start' => '<ol class="wpp-list" start="2">', 'wpp_end' => '</ol>', 'meta_key' => 'views_total' ); wpp_get_mostpopular($args); ?>
Please advise thanks Hector
If all you want to do is to display popular articles listed by total views count then you don’t really need all that code 😛 You can just use the
range
parameter and set its value toall
in order to have the wpp_get_mostpopular() function list the most viewed articles since you first installed the plugin:$args = array( 'range' => 'all', 'post_type' => 'articles', 'offset' => 1, 'stats_views' => 1, 'limit' => 7, 'wpp_start' => '<ol class="wpp-list" start="2">', 'wpp_end' => '</ol>' ); wpp_get_mostpopular($args);
Also, I removed
meta_key
from the$args
array since it isn’t a valid parameter.Thank you. Back to the image issue, is there any way to resolve the resolution issue? I am using a Image Regenerate & Select Crop plugin. Does that have conflict to the thumbnail image generated to the resolution drop? Please advise. Thanks.
Also the views is not increasing when i click on the post
Back to the image issue, is there any way to resolve the resolution issue?
Yep. As I suggested earlier, you’ll need some custom coding for this.
WPP’s thumbnails -as you already know- are always cropped. You can however have the plugin display custom images, like this for example.
Also the views is not increasing when i click on the post
Hard to say what’s going on without more details. Maybe reading these FAQs can get you on the right direction:
- Is WordPress Popular Posts compatible with caching plugins?
- Is WordPress Popular Posts compatible with security / firewall plugins?
- Is WordPress Popular Posts compatible with plugins that minify/bundle JavaScript code?
If none of these apply in your case you’ll have to share some more details about your setup so I can actually help:
- Site URL?
- Active plugins?
- Settings you’re using with WPP?
- Any other info that might be relevant.
-
This reply was modified 1 month, 3 weeks ago by
Héctor Cabrera. Reason: Fixed some typos
How do i share the settings?
Take a screenshot (or several if needed), upload it somewhere (like prnt.sc, postimages.org, etc), then share the link here so I can see.
is this 2 sufficient?
https://prnt.sc/whb3el
https://prnt.sc/whb4v3
Thanks.You have a caching plugin and a security plugin installed on your site so as I suggested above please read the linked FAQs to make sure WPP can work normally on your website.
- You must be logged in to reply to this topic.