Questions tagged [count]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
2k views

Comment Count for each Comment Author

In WordPress 3.4.1: I am trying to add the Comment Author's total number of comments beside their info. (name + date/time) in the comment's list. Here is the SQL that I am using: $count = $wpdb->...
0
votes
2answers
821 views

Set font size automatically according to number of words in post

By submitting a post for publication will be made a count of the number of words in the post and will add a div with font-size pre-set according to the number of words. If the post contains up to 50 ...
0
votes
1answer
287 views

Display Notification Bar on Header on Certain Post Count

I want to display notification bar on header in my Wordpress theme when user submit certain number of post. I want to notify my author once they are submit amount of post. e.g. if (authorpost === 50){...
2
votes
1answer
994 views

wp_count_posts, wp_count_terms and wp_count_comments for specific user?

Is there a way for the functions wp_count_posts, wp_count_terms and wp_count_comments to return their results only for a specific user, possibly by using a user's ID? I'm making a custom "Right Now" ...
0
votes
1answer
282 views

Displaying number of drafts in Posts section of admin sidebar [closed]

Is there a WP plugin to show the number of drafts in the Posts section of the admin sidebar in the same way that the number of available updates is shown? I’m looking for something like the following ...
1
vote
0answers
287 views

How to display users with posts published between two dates (Sorted by Post-Count) [Multisite]

I'm trying to make a list of users who have published posts within two given dates. My attempts using WP_User_query just work for one blog ID and takes time to load because it runs through a lot of ...
17
votes
5answers
3k views

How to mark every 3rd post

I'm working on a WordPress site for my band and I'd like to mark every 3rd post on our blog page to have a special class applied to it, anybody have any pointers on how to achieve this? Any help is ...
1
vote
2answers
3k views

Custom Post Type Category List & Post Count

I'm looking for Cutom Post Type Category List & Post Count. Here is my code.. <?php $taxonomy = 'project-tags'; $tax_terms = get_terms($taxonomy); ...
0
votes
1answer
4k views

How to limit the number of posts a user can publish based on user type

I am creating a member only wordpress site that will restrict the number of custom posts a user can publish (Custom post type = contacts) based on their role. I will have 4 roles: Role 1 = 25 posts;...
4
votes
1answer
8k views

How to display 2 equal columns of li based on the count of items in wp_nav_menu divided by 2?

I would like to display a custom 3.0 menu in my sidebar. I want the list to be in order of name, and the list to be sequential down the list of the left column and flow down, then into the right ...
0
votes
1answer
518 views

Retrieve IDs from custom field, count and display results differently according to count

The function below is inside a single post loop. I have an array of IDs in a custom field. Such IDs represent related posts. I'm using Advanced Custom Fields (ACV) plugin and I manage the custom ...
0
votes
1answer
1k views

wpdb->get_var - count author posts, meta value

In an author.php template, i count the author post in a custom post type with $wpdb->get_var, $post_author = $curauth->ID; //author id $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->...
0
votes
1answer
265 views

RSS Subscriber count

I'm looking to retrieve an RSS Subscription count. How do I return the number of subscribers without use of Feedburner or use of a plugin?
0
votes
1answer
469 views

Insert html after certain amount of posts?

Is it possible after a certain amount of posts to close of a list and start a new one, like so... Particularly after 6 posts... <ul id="carousel"> <li> <ul class="inner-items">...
4
votes
3answers
5k views

Taxonomy count per Post type

Below is the code i use to output the post tag (taxonomy) count/number. I want to be able to split the count based on post type that the taxonomy features in (rather than the total number). So i ...
0
votes
2answers
2k views

Having a variable based on $post_count increase when i move to the next page of results

I couldn't figure out the best way to write the title, so first of all I hope you understood what i was trying to get across. I have a snippet of code on my template page that fires after the wp_query ...
2
votes
4answers
6k views

How to count get_users query?

I have been searching high and low for a way to count the amount of results from a get_users query. Most of what I found is to count the total number of posts in a post query, but nothing for ...
1
vote
1answer
137 views

How can I make the loop not count special post formats towards the post count?

I have WordPress set to display 5 posts per page, which is what I want. However, I'm now starting to use the new post formats (link, status, quote etc.) but I would these to not be counted towards the ...
0
votes
1answer
626 views

It doesn't matter if I have more than one comment. get_comments_number still equal to one?

It doesn't matter if I have more than one comment. get_comments_number still equal to one. single.php: <?php get_header(); ?> <div id="content"> <div class="container"> <div id=...
0
votes
1answer
264 views

Order taxonomy terms by the frequency of use in the last 30 days

I would like to know how to order the terms in some taxonomy according to their frequency of use in posts in the last 30 days. What I am looking for is the most optimal method how to add "orderby" ...
0
votes
1answer
508 views

How include comment and post count of user in this custom query

This is a listing of members with pagination <?php $total = "SELECT ID, user_nicename from $wpdb->users ORDER BY user_nicename DESC"; $totalposts = $wpdb->get_results($total, OBJECT); $ppp ...
4
votes
2answers
2k views

Total word count for posts by one author

How can I get a total word count of one author's posts? I would like to be able to see what the total word count of their output is, summed across all of their posts (ideally with a breakdown by ...

1 2 3 4 5 6