NB: Make sure you do a back up of your theme, files and database before attempting the tutorials
---- Last modified : Sep 09 2022
Estimated reading time : 0 minutes, 30 seconds - 103 words
This post offers a new download of files which includes a function that will allow you to display Post Type sorted inside the single.php file. So for example, you have a post type and Post Meta Key views which let you display the number of views by product.
Query Rank number Post type
Our function allows you to sort products by number of views.
The function is ready to use out of the box. Just two parameters to adjust inside the query: Post Type name and Post Meta Key name; views or likes for example.