The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
47 views

How to display total views of all posts of one category?

Is there any way to display total views of all posts of one category? How to show that number on archive page? I have used this code to count views of each post: function getPostViews($postID){ $...
0
votes
3answers
10k views

How to display number of page views on a post?

Is there any currently supported plugin to display the number of page views on a post? wp-postviews seems to be the most commonly used, but it requires modifying the theme (which would require ...
2
votes
1answer
64 views

Double count view in archive.php

I'm having a hard time using this snippet I'm getting double views each time the post is queried. This is in my functions.php file: function getPostViews($postID){ $count_key = 'post_views_count';...
0
votes
1answer
4k views

WooCommerce Grid / List view

Is there any experience with Woocommerce Grid / List view plugin, I set to automatically start the list view but the problem is that while the page is loading initially opens a grid view and instantly ...
0
votes
1answer
31 views

To remove rendering of menus and header, plugin or theme?

I need to create a view of my website which does not render the header (where I see my user name) and maybe display just one menu on the side. Do I achieve this through a plugin or through creating a ...
0
votes
2answers
810 views

Embed PDF into wordpress

is there's a way to show a PDF file inside Post in wordpress ? i used tag but if someone have Internet Download Manager , Dialog will appear to Download the PDF file if visitor click cancel they ...
0
votes
1answer
59 views

How can I make post view count editable? [closed]

In the admin panel, under posts, I see all posts with their view counts next to them. How can I make the view count editable? I am working on certain things that will kick in when a post reaches 100 ...
2
votes
3answers
3k views

Hide the post count behind Post Views (Remove All, Published and Trashed) in Custom Post Type

I need to hide/remove the numbers behind the Edit screen in the backend. All (30) | Published (22) | Draft (5) | Pending (2) | Trash (1) As I am running a multi author blog and each author has just ...
1
vote
0answers
31 views

Tinymce shortcodes within shortcode contents

I am using wp.mce.views.register to create a simple view for my shortcode in the tinymce editor, this works fine but i am looking for a way to have "nested" shortcodes e.g. [column_3] [info_box] ...
0
votes
0answers
529 views

How to display most popular post by views count in WordPress?

I tried to display the most view post in last 30 days in my WP page, how to do this? What I did is: <div>Most Read Blog Posts Over Past 30 Days</div> <?...
0
votes
0answers
37 views

Why are wp.mce.views re-created each time?

If you look in the mce-views.js of Wordpress you'll see something interesting - it references views by the text shortcode and looks them up in an array: /** * Get a view instance. * ...
0
votes
1answer
126 views

Get total views of all posts by author

I would like to display the total amount of views per author for all posts. What would be the best way to achieve this without causing too much load on the server?
2
votes
4answers
10k views

How to Change Loop to Order Posts by Views (using wp-postviews plugin)

I hope somebody would be kind enough to help. I currently have a page that orders all of the posts by comment count, but I want to change the loop to order the posts by view count. I have installed ...
0
votes
1answer
311 views

Post Views / Hit Counter Problem?

I have decide to use WordPress as a CMS to my 5 moths old website. I have already added all previous posts to my new site ( WordPress ). But now I need to change view counts to previous views counts. ...
0
votes
1answer
64 views

Searching for meta_key returns 0 posts

I am currently on a client project and I am stuck with the meta_key search in WP_Query. I am querying some other parts of the homepage successfully with the WP_Query class, but when I am passing array(...
-1
votes
1answer
236 views

Display (custom) post number of views

I'd like to display at the top of every post (actually those are custom posts) the number of times it was viewed by users. Is there a way to do this ?
0
votes
0answers
20 views

Pageview all of sudden not working

I am not sure how to explain it. MY page view count is not working all of sudden. Here is my code: $output .= '<div class="mainpageview fa fa-eye">'; $views = get_post_meta( $post->ID,...
0
votes
1answer
25 views

Showing “0” pageview when there is no view

So, I have the following code to display pageview: <div class="mypageview"><?php echo get_post_meta( $post->ID, 'pageview', true );?>page view</div> For example, if there is ...
0
votes
1answer
110 views

How get top post view for today for today post

I insert today 20 post for example. And i need to get top post that show today from today post. I try this code but its show me top post view for all time. But I need only for today post. $day = ...
0
votes
1answer
3k 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 ...
0
votes
1answer
2k views

How to show total view count across all posts for an author

I'm using wp-postviews to track views for posts by authors on my site. It stores the view count in the post meta field $views. I'd want to show on their profile a total count of views for all their ...
-2
votes
1answer
350 views

Updating post_views_count on publish [duplicate]

Upon publishing a post, I'd like the post views count to be a random integer between 829 and 1013. Could you please tell me what code I need to add to functions.php in order to achieve this? Thank ...
1
vote
1answer
542 views

WP Admin default view mode for Custom Post Type

To change it globally to excerpt for every post type I can use: function my_default_posts_list_mode( $default ) { return 'excerpt'; } add_filter( 'default-posts-list-mode', '...
-1
votes
1answer
383 views

Increasing post view count automatically [duplicate]

I am testing a ranking system for posts, and I'd like help with the below: Upon publishing a new post, I'd like the post view count to immediately have a random number between 829 and 1013 added to ...
0
votes
1answer
743 views

Getting shortcode attribute values and shortcode content with JavaScript regex

This is an example shortcode: [boutique_banner title="Loyalty Program:" link="More" linkhref="/"]Earn 1 point for every $5 spent[/boutique_banner] I have created a custom mce view to display this ...
-2
votes
2answers
117 views

Post rank by views

I want show: Post id 5 has 100 views and rank is 2nd, post id 6 has 90 views and rank is 4th, post id 7 has 1100 views and rank is 1st I try: $query="SELECT u.*,um.post_id, FIND_IN_SET( ...
2
votes
1answer
2k views

Creating a custom MCE view for your shortcodes [closed]

How to create a custom MCE view of my own WordPress shortcode?
0
votes
0answers
50 views

Count how many posts a user has viewed

Seems this is quite a new question, as I found it nowhere. I was wondering if it is possible to count how many posts a registered user has viewed (entered) on the frontend. So basically when a user ...
3
votes
1answer
575 views

Writing a view count with w3 total cache

I am trying to develop functionality which counts how many times a post is viewed however I am also using page caching (APC possible memcache in the future) via w3 total cache. The "view count" value ...
0
votes
1answer
62 views

Custom view counts not updating correctly

I'm trying to add some custom views/filters to the list of posts for a custom post type in the admin. However, the query that counts the number of posts is updating the number of posts for all filters ...
0
votes
1answer
672 views

Sorting posts according to view counts not working

I use the code snippet below to get views count of each post on my sidebar.php . everything works but the sorting does not. also it does not get 4 posts, it only shows 1 post although I've written '...
2
votes
4answers
2k views

Counting pageviews on high-traffic cached sites

Our site is quite high traffic and we use both nginx and w3 total cache to handle the load. We've previously been using wp-postviews to count the page views, but it seems to be locking the postmeta ...
0
votes
1answer
132 views

Show number of views in the last 48 hours

I have now the most popular views on the posts I have. But I want to show the most viewed in the last 48 hours. How can I achieve that? Someone helped me and I placed this in single.php file. $...
-1
votes
1answer
226 views

Changing comment_count to views

I have a plugin installed to show the latest popular posts based on number of comments. But comments are disabled on my website. How can I change it to number of views? And do I need to install ...
0
votes
1answer
353 views

Count post views in loop

I'm trying to show the post views for every post on a blog page (so in a loop). I tried it with the following code in the functions.php: // function to count views. function setAndViewPostViews($...
-2
votes
2answers
2k views

Show post titles only on the homepage

Is there any way to show a list of all posts without any preview of the content on the homepage?
1
vote
2answers
3k views

WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term

OK so I'm about 90% done, the only part that keeps breaking is when I try to exclude a specific taxonomy term. Break down: Sorting: ('v_sort' => 'views') This is being done via the popular WP-...
0
votes
1answer
432 views

count the number of views of a post excluding own views

I am using WP Post Views plugin to display the post number of views. To do so, I use: <?php if(function_exists('the_views')) { the_views(); } ?> This plugin gives 3 choises in its setting : ...
0
votes
1answer
86 views

an action hook when a post reaches a certain number of views

I am using WP Post Views plugin to display the post number of views. I use: <?php if(function_exists('the_views')) { the_views(); } ?> I am creating a badge system for my wordpress site. My ...
-1
votes
1answer
81 views

Integrating CSS Into a WP Function Call [closed]

Below is a code I use to display post views. It is integrated with an options panel which allows users to choose whether to display it. I would like to integrate the div class .postviews directly ...
0
votes
1answer
61 views

Posts being viewed

I am looking for a way to list posts being viewed but I can't find anything online. Is it even possible? I've seen some websites that have these loops, "What other readers are currently reading". I'...
0
votes
1answer
50 views

how can view all three subcategory in same line(found ex: and code)

i use the code to view subcategory on category page <?php if(is_category()) { $breakpoint = 0; $thiscat = get_term( get_query_var('cat') , 'category' ); $subcategories = get_terms( '...
0
votes
1answer
93 views

Post Views Code Hacks

// Post views function getPostViews($postID){ $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ ...
0
votes
2answers
569 views

sort post types by amount of views

I have a custom post type that I want to do a type of news feed for, but I only want to show the ones with the most views. I know I can do a query for an "archive" of my post types, but my question is ...
0
votes
1answer
238 views

how to localize the number of wordpress post views?

I want to display post view in localize number. I add these function in function.php to do so function make_bangla_number($str) { $engNumber = array(1,2,3,4,5,6,7,8,9,0); $bangNumber = array('...
0
votes
1answer
2k views

Display posts from Last 24 hours and order them based on most views

I am trying to display the posts of last 24 hours and order them by most views. I call the most views by this code: query_posts('meta_key=post_views_count&orderby=meta_value_num&...
0
votes
1answer
1k views

Check if post id exist in table than only update instead of inserting new row

I am trying to add simple view counter for my advert and everything seems works fine with below code but only it is inserting each time new row on post "Update". What I want if the post id is exists ...
1
vote
2answers
179 views

Is there a way to have the view link on manage posts page to open in a new window or tab?

Hi I am trying to figure out on how to get the "view" link on the manage posts / custom post types and pages to open in a new tab or window. I know it is probably possible to do via the functions....
-1
votes
1answer
2k views

Remove 'portfolio' from URL

I was trying to remove portfolio-view from url and followed instructions to remove its name from highlighted section. This works but has left me with 'portfolio' now even though field is blank. What ...
0
votes
1answer
737 views

How to sort a loop after most viewed

I have a site and i'm almost done with it. It have teached me a lot about wordpress, although i'm still a noob who doesn't know anything about php or programming (besides html). I have managed to ...