The WP Postviews plugin is one of the most used to record post views.
Then you can sort by amount by;
<?php if (function_exists('get_most_viewed')): ?>
<ul>
<?php get_most_viewed(); ?>
</ul>
<?php endif; ?>
Or pass in the variables to the URL:
http://example.com/?v_sortby=views&v_orderby=desc
Or even run a custom query that sorts by the post_meta value.
Related Posts:
- How to Change Order of Posts in Admin?
- Get current menu_order
- Different post sort order within different categories
- what types of order can I pass to get_posts() via orderby?
- How do I reorder (pop and push) items from WP_Query?
- How to put last edited entry on top of the blog-post list?
- Sort post by attributes ‘order’
- How to sort posts by last name (2nd word) on ONE category only?
- Query posts from current year
- Reverse chronology of post listing
- Order Posts by Alphabetical for Each Letter
- Set number of article per number of page
- Problem ordering posts with numbers for titles numerically E.g. 1, 10, 100
- How to choose a sort order (for posts) per category? (ideally when creating a new category)
- Order post by year DESC and month ASC
- Display custom post types by date field
- orderby=meta_value_num creates duplicate posts
- Change Order of Admin Posts Depending on Meta
- Display posts in alphabetical order for a particular category
- post re-order on my site
- Display posts from #6 to #20 on archive page
- Why orderby=”date” does not support manually changed posts?
- WP_Query orderby not working with meta_value_num and menu_order
- How can I sort posts by the date and a custom meta field?
- Sort WP posts by span value
- How to sort posts inside categories
- Any way for get_next_post() to use the actual post order instead of publish order?
- Custom order for Mysql array
- How to order posts by meta_value and title
- Order posts alphabetically: how to set order=asc in mysql query?
- how to get post order by post id wp_query?
- How Do I Get My Post Tags to Alphabetize?
- While loop articles – if statement order
- Make a vertical dynamic list of posts in alphabetically order and in columns [closed]
- Create a list of posts with topic headdings
- How can I add a box to edit Order on a regular post?
- get_previous_post() while accounting for sticky posts
- Need to know custom code to display random and most viewed posts in wordpress posts and pages
- Posts and order
- Adjust the order for returned posts
- Order posts by date
- query posts with selected post ids first
- How do I display posts ordered by a date custom field?
- WP_Query sort by meta_value_num or date
- Allow reader to reorder posts for themselves (oldest first)
- Random order of the 5 most popular posts
- My custom query is displaying random posts in random order
- Get query result according to merged array
- How to make post button to a random post
- Where is object, property or label in the database that controls the order of the posts being displayed?
- Last three posts not being put in order by date. How to fix this?
- Order by ‘s’ using WP_Query()
- Custom Admin Post Column change order
- How to sort posts alphabetically based on a specific parent category
- How to load paginated post pages via ajax
- Get the current post ID as a variable in Javascript
- Developing a secure front end posting form
- Open WordPress Posts in Bootstrap Modal
- How to remove images from showing in a post with the_content()?
- Display All Sticky Post Before Regular Post
- Add custom fields to post programmatically
- Custom excerpt length filter doesn’t work
- Custom Blog Post Page
- Post-ID in url differs from $post->ID
- How to create a submenu that will navigate through different posts in the same page
- minimum requirement to add posts via database
- Delete and perform a fresh install of WordPress
- How safe is renovating $wp_query when doing WP_Query pagination in Page Template
- How to show full post?
- Overwrite posts/pages via import
- Auto-realod with new posts // Ajax call
- How many posts does the loop return?
- Posts loop displaying the same post data
- Display Posts on Custom Page
- Blog Post On Home Page Displaying Page Published Date Not Post Published Date
- Counter is skipping post when I still want it visible [closed]
- Divs appearing everywhere in post content
- Latest posts by category — how to exclude current post?
- Posts page not showing correct image
- wp_query with ajax
- Add “Posted on” to post date
- How to compare post tags?
- Get a term each custom post type
- Post in bulk based on category template
- Delete Post but retain image of post [WP REST API]
- Menu Items disappearing/being empty on save or post edit
- Display/Filter post using if else statement
- Redirect to custom post if custom archive page has just one result?
- Strange behaviour in WordPress admin
- sometimes on saving a post as draft, it says Access Denied You don’t have permission to access “mywebsite.com/wp-admin/post.php”
- How do I change the post title’s link on the posts page?
- WordPress text field in array problem
- Possible to display X number of authors posts from another WordPress site?
- Theme Unit testing not importing on MAMP server – Fatal error: Maximum execution time of 60 seconds exceeded
- Use radio buttons & checkboxes for post categories
- List posts that are in the same category as the current post title
- Wanting to apply different featured images for each post
- How do I show the post title if an advanced custom field hasn’t been used?
- website images getting corrupt automatically
- Posts Page in WordPress loading bare HTML of my homepage