Hi,
I have update my theme to latest version 6.5.1 but the site was really really slow. However i have some other issue and put back the 6.1 version that worked best or me so far. However i like the new feature of Jetpack stat implementation you have done for your Newspapper theme, It’s possible to tell me what files need to edit in order to have that featured on my older theme version ?
Thank you
Hi,
You could try to edit td_data_source.php and add the new sort order – http://screencast.com/t/PzXKRSlQYGsM – http://pastebin.com/EAeg6Yy0 also edit td_config.php file and add this code so the sort option will appear on block settings – http://screencast.com/t/m8zA3xYCjo
'Popular (site wide) - jetpack + stats module required' => 'jetpack_popular_2',
Please first make a backup of your files, so you can revert if something goes wrong. Also you can check these files(to see how the code is added) in the latest version of the theme.
Thanks!
Hi,
Also you could try to update the theme and try the shim version of VC – https://forum.tagdiv.com/topic/disable-visual-composer/
Thanks!
Hi, thanks for the code.
It seems need little more configuration to get the right views order in the widget.
eg: according to jetpack stats console the post with the most views its doesn’t come first in the widget order its on top 5 but not first.
I like to ask also below code means keep display stats for 2 days data ? What if i want to keep weekly data and display ?
$jetpack_api_posts = stats_get_csv('postviews', array(
'days' => 2,
'limit' => $limit + 5
));
Any help is appreciated.
Hi,
The best way is to update to the latest version to make sure that your modifications will not create issues and check this guide how to optimize your speed and requirements for Newspaper theme – https://forum.tagdiv.com/how-to-make-the-site-faster/ as I have checked your site on pagespeed tool and you have to do some fix even if you use 6.1 – http://screencast.com/t/8jz2iWZetX
This sort order was designed to work exactly like the jetpack stats(2 days), the plugin’s API doesn’t support that.
Also I how the Shim version will help.
Thanks!