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...
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';...
Can anyone help me please. i want to show custom post type count by month of taxonomy in archive page for current year. Example: January 24 February 43 March...
On a page listing terms from my ‘source’ taxonomy, I loop through foreach term… foreach ($all_source_terms as $source_term) { // some stuff echo $source_term->count; } When I echo $source_term->count;,...
Unless I’m missing something, it seems that none of the APIs I’ve looked at will tell you how many objects are in an <S3 bucket>/<folder>. Is there any way...
How can I count words in posts + tags + comments and display the number of total words used by each author ? 1 Answer 1 Run a couple...
I have assigned a custom taxonomy named Highlight to posts and I have added a term to it named Featured. Whenever I want to feature a post, I simply...
I have this code, but it shows the total number of posts published by post type ‘code’. <?php $count_posts = wp_count_posts('code')->publish; echo $count_posts; ?> I have 2 post types:...
I have a very simple SQL query: SELECT COUNT(DISTINCT x) FROM table; My table has about 1.5 million rows. This query is running pretty slowly; it takes about 7.5s,...
How can I determine the number of cases in a Swift enum? (I would like to avoid manually enumerating through all the values, or using the old “enum_count trick”...