i have a yuzo related plugin installed
it counts each post views
i would like to add it to my view -, by their shortcode yuzo_views
it works fine - but when i filter results - it show the shortcode string and not the view counter value
any ideas?
Hi Meirk,
Thank you for contacting us and I'll be happy to assist.
For further troubleshooting, we’ll need temporary access (WP-Admin and FTP) to your site ( preferably, to a test site where the problem has been replicated if possible ).
This access will allow us to offer better help and check if some configurations might need to be changed. Any screenshot(s) or details about the placement of the "yuzo_views" shortcode, will also prove very useful.
Your next answer will be private which means only you and our support team will have access to it.
If you're going to share the access details for the live/production website, it is very important that a complete backup of your database and website has been made.
We would additionally need your permission to deactivate and reactivate Plugins and the Theme and to change configurations on the site. This is also a reason the backup is really important.
Please let us know if you have any further information or questions.
regards,
Waqar
Hi Meirk,
Thanks for writing back and for sharing the access details.
During troubleshooting, I noticed that the way Related Posts plugin's shortcode is designed, it is not compatible with AJAX filtering.
But you can get values of views directly from the plugin, using a custom shortcode:
1. Please add following code at the bottom of your active theme's "functions.php" file:
// custom shortcode to check if number of views directly from "Related Posts" plugin
add_shortcode('yuzo_views_custom', 'yuzo_views_custom_fn');
function yuzo_views_custom_fn($atts) {
$a = shortcode_atts( array(
'id' => ''
), $atts );
if ( class_exists('yuzo_related_post') ) {
return yuzo_related_post::yuzo_get_PostViews( $a['id'] );
}
else
{
return "The related post plugin is not active";
}
}
2. Next, you can update your View to get the view count as:
views: [yuzo_views_custom id="[wpv-post-id]"]
I hope this helps! Please let us know how it goes and if you need any further assistance.
regards,
Waqar
bsd
thanks - it works!!
i need one more thing
how can i filter a view by this shortcode? (meaning i will filter the posts by view rank)
Hi Meirk,
Thanks of the update and glad it worked.
The "Related Posts" plugin stores the information about the views count in form of a serialized data. For this reason, I'm afraid, there is no direct method to use values from it for filtering/ordering a Toolset View.
It may be possible to achieve using custom code, but complex custom programming like this is beyond the scope of our support.
You can consult one of our certified consultants, for a possibility of a custom project:
hidden link
If I can be of any further assistance, please let me know.
regards,
Waqar