Questions tagged [groupby]
The groupby tag has no usage guidance.
28 questions
1
vote
1
answer
1k
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,...) ...
0
votes
1
answer
22
views
How do I group results from wp-query
I've got a custom post type for staff. The fields are first_name, last_name, job_title, telephone, email, and notes. All staff are categorized by location using WP core Category. I need to output the ...
0
votes
1
answer
863
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, ...
-1
votes
1
answer
99
views
This plugin helps create custom buddypress group tabs but it is producing a 404 error, how can it be edited, is it the screen_function?The code is i
<?php
/*
Plugin Name: Custom BuddyPress Group Tabs
Description: Adds custom tabs to BuddyPress groups
Version: 1.0
Author: Bing
*/
// create the custom database table upon plugin activation
...
0
votes
2
answers
286
views
How to put posts with some taxonomy on top of others in `pre_get_posts`
The following tax_query returns only matched posts (with 'matchedstring' IN taxonomy array):
function only_returns_matched_posts( $query ) {
if( !$query->is_main_query() || is_admin() )
...
0
votes
0
answers
28
views
Group episodes by seasons
So i have 2 custom post types, Shows and Episodes. I want when im on example.com/show/better-call-saul, to group episodes by seasons for example:
-Season 1
.Episode 1
.Episode 2
.Episode 3
-...
1
vote
3
answers
6k
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.
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 ...
0
votes
1
answer
221
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 ...
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 ...
1
vote
0
answers
261
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 ...
0
votes
1
answer
445
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 ...
0
votes
1
answer
4k
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 ...
0
votes
1
answer
237
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 ...
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 ...
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....
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?
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:
...
1
vote
0
answers
120
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 ...
1
vote
0
answers
600
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 ...
2
votes
1
answer
6k
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 ...
0
votes
0
answers
118
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 ...
0
votes
3
answers
1k
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 ...
2
votes
1
answer
264
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 ...
0
votes
1
answer
512
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 &...
0
votes
0
answers
37
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 ...
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 $...
1
vote
2
answers
717
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 ...