Questions tagged [groupby]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
57 views

Group and list posts by custom taxonomy

I'm trying to list posts from a CPT named "exposition" and group them based on a custom taxonomy called "date-exposition" (which are meant to be years such as 2010, 2015, 2017,...) ...
user avatar
0 votes
0 answers
22 views

Mutlipe Custom fileds order by , i reload the page , result different every time

I’m writing a query_post() like this. $args = array( 'post_type' => DEBBING_TYPE_SLUG, 'post_status' => 'publish', 'meta_query' => array( array( '...
user avatar
  • 1
0 votes
1 answer
119 views

Allow members to create groups on my site

I am currently building my first Wordpress site. I want to be able to do the following: User arrives on page listing all the available groups User joins group if he finds what he likes If he doesn't ...
user avatar
1 vote
1 answer
1k views

Multiple taxonomy And acf filter group by

I have a widget that must display my custom post type. I don't display title or content, but just the values of 3 custom fields (acf) : start date, end date and city. Here is my loop. I grab all the ...
user avatar
  • 137
1 vote
0 answers
135 views

Use posts_groupby filter with part of string in wp_query?

I am using posts_groupby filter to group by a custom field my wordpress posts. Is there any way using wp_query and posts_groupby to group my posts using part of a string of the custom field? Any help ...
user avatar
  • 133
0 votes
1 answer
252 views

SELECT TOP 1 in wp_query for each groupby meta value

Is there any way using wp_query class to execute SELECT TOP 1 sql command while using groupby for each meta_value results. I need the wp_query to select only the first one of each groupby meta_value ...
user avatar
  • 133
0 votes
1 answer
2k views

How can I group posts by months and years?

I have posts under a custom post type which I like to display in a page grouped by Year and Month. In the page template that I create, I managed to separate them by month, but still without grouping ...
user avatar
  • 109
0 votes
1 answer
123 views

ACF pro: Group teaser by datepicker year and display custom sub fields [closed]

I want to group my custom post types into years. I should look like 2019 Post 1 Post 2 Post 3 2018 Post 1 Post 2 2015 Post 1 YEAR Post 1..n Following this example here: Order and group posts by ...
user avatar
1 vote
0 answers
105 views

Group custom post listing in admin section

I am trying to alter the listing results in the admin section for a custom post type. I am using Custom Post Type UI plugin to create custom post types and data is saved with meta keys. The listing ...
user avatar
1 vote
0 answers
574 views

Optimizing Wordpress Queries - Removing Group By ID

I'm looking to transform a few queries that I'm running through get_posts into direct MySQL queries, in the hopes of optimizing them further. I see that my initial get_posts query, once built and ...
user avatar
  • 111
5 votes
1 answer
2k views

Select All in Parent Category, Group by Child Category?

I am trying to format a custom post type for a "series". Each post is an Episode, each Episode belongs to a Season, and each Season belongs to a series (just like a TV show). I have the following: ...
user avatar
  • 261
2 votes
1 answer
5k views

How to search for posts IN OR title OR content OR author?

I have looked at many posts and questions regarding searches for custom meta, but I want to search for posts and include those if the search query matches an author name. I have come up with the ...
user avatar
  • 1,077
0 votes
0 answers
116 views

Grouping parent categories into sections

I have the following post categories: Personal Care Jewelry Health & Fitness Automotive Gadgets Health & Fitness and have two sections: Men and Women, what I'm trying to do is to group the ...
user avatar
  • 121
1 vote
3 answers
4k views

How to create user groups and allow custom posts and plugin modify/access to specific group?

I am looking for plugin or is there any method/function to create user groups and give an access them to modify/access.
user avatar
  • 11
0 votes
3 answers
919 views

New register email notification sending some fields blank on site admin emai id

Working on real estate project.Here i am facing a problem with new email registration when user register with site admin getting some fields blank.i am using Group but plugin and also in back end ...
user avatar
0 votes
1 answer
774 views

How to group posts by months and add pagination?

I want to group by posts by months. Like this: January 2014 Post name Post name December 2013 Post name November 2013 Post name Post name Post name Post name I need to have 10 months per page, ...
user avatar
0 votes
2 answers
2k views

How to register a user to a group by an invitation code?

I'm working on a site where I'd like anyone to be able to sign up, but people who sign up with an invitation code would automatically be registered to an existing group associated with that code. How ...
user avatar
  • 1,081
0 votes
0 answers
36 views

Wordpress Group By Problem

i have a custom post type called "events". in this post type, i have a metabox with the date of the event. saved as timestamp. my problem is, i want a whole year with every month. current only the ...
user avatar
0 votes
1 answer
496 views

Show related posts on single.php, grouped by taxonomy terms, with Advanced Custom Field post object selected

I have posts of custom taxonomy called Areas with terms such as Articles, Presentations, News etc. These terms are applied to the normal post-type "post". Under a custom-post-type called &...
user avatar
  • 55
0 votes
2 answers
2k views

Grouping categories by genre

My wordpress video blog have several categories. Lets say the category can belong to several genres e.g actions,horror,mystery and another category belong to actions,horror,romance How do I group ...
user avatar
  • 523
2 votes
1 answer
261 views

Arrange and separate posts

On a particular archive page I've created, I'm listing a number of posts by post name and they're listed in alphabetical order. Is there away to have them separated even further? As in all posts ...
user avatar
  • 717
1 vote
1 answer
2k views

posts_groupby problem

On my search page I want to group the posts by post type. To do this I've got the following: add_filter('posts_groupby', 'group_by_post_type' ); function group_by_post_type( $groupby ) { global $...
user avatar
1 vote
2 answers
673 views

Distinction on meta value on pre_get_posts

I've got a special "position" meta field for posts which can be between 0 and 37. 0 Is ignored, and everything else can have obviously any number between and including 1 and 37. But this of course ...
user avatar
7 votes
1 answer
7k views

Display category posts grouped by taxonomy

I'm working on a project where I use the default posts as "Products", default category as "Application" and a custom taxonomy called "Groups". I want to list "Products" by "Application" (category....
user avatar
  • 308
3 votes
1 answer
2k views

What's the easiest way to change the default landing page for BuddyPress groups?

I'm looking to have the default view for Groups be the Forum component instead of the Activity component. What's the best/easiest way to alter the default landing component/page?
user avatar
  • 1,640