Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [popular-posts]

The tag has no usage guidance.

1
vote
1answer
21 views

Create a list-style post of popular posts for the week?

I've been looking for something that would automate the creation of a popular posts of the week blog post. So for instance, every Monday create post that is a list of the most popular posts from the ...
0
votes
1answer
87 views

Popular Post By Month in WordPress

I have been trying to get popular posts for the current month. I wrote the code given here. But showing nothing. <?php $query_args = array( 'posts_per_page' => 3, ...
0
votes
1answer
60 views

Show Top 10 posts in a rss feed

I am trying to get a rss feed that will show the top 10 posts for the week. I am using the top 10 popular posts plugin to show them in a sidebar on the site which works great but need to show them in ...
0
votes
1answer
305 views

How to Display Most View Post in the template file?

I need to create most viewed post column in the template file, but based on post view count? Function File function wpb_get_post_views($postID){ $count_key = 'wpb_post_views_count'; $count = ...
0
votes
1answer
1k views

Display most popular posts of category

Right now in my slider I'm showing most popular post by views. However, I want to shop most popular post by views only for a certain category? The category id I want to use is "10". How would I ...
1
vote
1answer
120 views

popular post weekly and monthly

i want to display popular posts for 1 week ago and 1 month ago.these are codes that i used but these don't work correctly for 1 week ago <ul> <?php $week = date('W'); $year = ...
0
votes
1answer
55 views

Display query post based on two orderby value in wordpress

I have been trying to display popular posts (based on view counts) and fetching them randomly using array in orderby but it doesn't seem to be working. The reason I want them to display randomly is ...
0
votes
1answer
61 views

Get a page ancestor from a most viewed list

I'm using WPBeginner's tutorial do display a list of the most viewed pages on a site. This is on my functions.php: function wpb_set_post_views($postID) { $count_key = 'wpb_post_views_count'; ...
1
vote
0answers
66 views

Display most popular in the past two days

Hi I'm using this code below to display the most popular post on my wordpress site. It works great! I was wondering if there was anyway to show the most popular post of the current day? This in my ...
0
votes
0answers
158 views

Display most popular posts

I have already found a way to display recent posts: <?php $args = array( 'post_status' => 'publish', 'numberposts' => '60', ...
3
votes
2answers
2k views

Sort Popular Posts by Views for the Last Week

I'm trying to sort the popular posts so it shows the most visited in the last week, but it hasn't worked. Anyone have an idea of why it isn't working? <?php $popularpost = new WP_Query( array ( ...
0
votes
1answer
636 views

Can't get post thumbnail to display in foreach loop

I've been trying to get the post thumbnail to display in the foreach loop for a few hours now and I can't figure out how to make it work, any help would be greatly appreciated! <div id="...
0
votes
2answers
38 views

How to properly get popular Posts by multiple Values

I am trying to display Popular Posts on my website, selected by a mixture of Views and Comment Count. Since views are always way more than Comments, I am multiplying the Comment Count by X, but it ...
0
votes
0answers
82 views

Popular posts - based on pageviews

I'm trying to figure out if it's possible, either by using a pre-existing plugin or some other route to pick the 10 most popular posts based off of page views (per the last month)? Using either Google ...
0
votes
1answer
144 views

Pull 'Popular Posts' within specific timeframe

I'm looking to display a weekly list of 'Popular Posts' on a site. Currently the list shows a 'Popular Posts' column but these are posts from no particular timeframe. It's displaying the most popular ...
9
votes
1answer
3k views

Show popular post in another php website via WP REST JSON API

I need to show popular & recent posts in another PHP web site under the same domain. Example: www.example.com -> main website (php, mysql) www.example.com/blog -> WordPress blog Need to show ...
0
votes
2answers
119 views

Display popular posts by how many hits it got within 30 days of publishing

I am an editor of a blog with nearly 200 published articles that have been published within the last two years. All the popular posts plugins I've found show the most popular posts of all time. ...
1
vote
1answer
2k views

Most popular post for last 7 days

I need to change the most popular post widgets with date restrictions. For an example, how should I get most popular posts(post_views_count) of last 7 days. original query, $popularposts = new ...
1
vote
1answer
2k views

Show popular post by category code

How do I show popular post by category code I have add code <?php $popularpost = new WP_Query( array( 'cat'=> 2, 'posts_per_page' => 1, 'meta_key' => 'post_views_count',...
0
votes
2answers
264 views

wp query for popular post with simple field

I used simple-fields plugin for one addition field(premium posts) and now I need to change the popular post widget. I need to get all popular post exclude premium post. What I have tried so far, ...
0
votes
1answer
1k views

Wordpress popular posts by week code

I m trying make a code that list the popular posts by week. Until now i was able to creat a veiws counter and display the 4 popular posts. So what i still need is to make this query more accurate. ...
0
votes
0answers
155 views

Popular post 'of the week'

I would like to know how can I make my widget get the popular post by week ? Right now it show only popular post since the beginning of the website. here is my code : // PopularPosts Widget { ...
0
votes
1answer
1k views

Query posts by views on category page

I'm having trouble trying to create a second query on the category.php pages, what I'm trying to achieve is displaying the most popular posts from the current category archive page being viewed. ...
2
votes
5answers
1k views

Best approach to create Hot and Trending sections

I am going to implement a Hot and Trending section on a website. I have seen such sections on many popular websites but can't really figure out how exactly this works. Although I assumed Hot section ...
5
votes
1answer
5k views

Show the most popular post per week

The plugin Most Popular Posts doesn't support WPML and therefore I have tried creating my own. I have found this tutorial in creating your own code for showing the most popular posts on my site: How ...
2
votes
1answer
2k views

Show most popular post of last 12 months

I use the Ribbon theme that has a nice tabbed widget showing the most popular and most recent posts. I would like to limit the most popular posts to the last 12 months. I would rather not use a plugin ...
0
votes
3answers
2k views

How to show a popular post in wordpress in last 24 hours?

I have the query_post on my codes. This will display the popular post of all time. But I want to dispaly the popular post in past 24 hours. How do I do that? <?php query_posts('orderby=...
0
votes
0answers
75 views

How do I display the popular post and again display another set of popular post after sometime including the 1st sets of popular post?

What I want to do is I want to display the popular post as a page. I have created a template page to display the popular post. But it is not working as I want it to. The thing that I want it to do 1. ...
2
votes
1answer
130 views

How to make two pages in wordpress to display recent pages and popular pages

I am creating a new wordpress blog. I want to make two pages on the blog. One page to display the popular post and another page to display the recent post. Popular post should be affected according to ...
0
votes
1answer
5k views

Popular posts by view with Jetpack

I'm using Jetpack to retrieve the number of views for each blog post. Is there a way to use this to generate a call to the most viewed posts and list them? I've been wanting to do that for a long ...
1
vote
2answers
1k views

How to display popular posts in page?

I'm trying to create a "Start here" page on my blog. I use a template for that, but the content for it is created using the "add new page" wizard in WordPress. I know how I can display the most ...
2
votes
1answer
1k views

How to install Wordpress Popular Posts plugin twice?

I've installed Wordpress Popular Posts plugin but found that it displays popular posts only from category. I want to display popular post for custom taxonomy. I found some hack in that plugin. Plugin ...
2
votes
2answers
473 views

Most commented / popular posts and offset

I am using this code to show 3 most popular posts based on number of comments : <?php $pop_posts = 3; $popularposts = "SELECT $wpdb->posts.ID, $wpdb->posts....
0
votes
1answer
368 views

Adding popular posts by category in single posts?

I have been trying out several popular posts plugin but I can't seem to find the right one. I have a page where I want to insert popular posts (in between the textual content). I am looking for a ...
0
votes
1answer
239 views

Get the most commented posts for the last x days

I want to get the most commented posts for the last x days,I have the following code: <?php global $wpdb; $weekstart = date('Y-m-d', strtotime('-12 days')); $query = $wpdb->prepare(" ...
1
vote
1answer
1k views

How to display most viewed post in my sidebar?

Hey i wanted to display the 5 most popular post by view count in my sidebar, but i don't want to use a plugin, i want the php function so that i can edit it manually such as adding thumbnails next to ...
0
votes
1answer
234 views

How to display the top 5 popular links in the header?

I want to display the top 5 popular links in the header. How will I do this? Also want to display the page hits in the brackets with the links. Any one who can help?
2
votes
2answers
819 views

How to get popular post from across a network?

I have a multisite network on WP 3.3.1. I now need to get all popular posts from across this network (preferably based on the amount of views). Is this possible, and how do I do that?
2
votes
3answers
2k views

How do I get a list of popular posts by views?

I am using the Jetpack plugin to get 'site stats' which shows the number of views for blog posts/pages. So I'm no expert or anything but I'm guessing there is a table that stores these views. Is there ...
0
votes
1answer
3k views

How to show Best Selling WP E-Commerce Products

I'm trying (but failing) to create 'Best Sellers' and 'New Releases' pages for my website. I'm using WP-Ecommerce 3.8.4 with WP 3.1.3 and I've gotten close but can't seem to get it right. Any help on ...
0
votes
1answer
207 views

Show tags of currently popular (by views) posts

I'm after a sidebar widget that will show the tags of my site's currently (within the last day) most viewed posts, in order to achieve a rudimentary 'trending topics' widget. Does this require a ...