Articles of groupby

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 can I do this? I have not yet chosen how groups will be created, but I know that […]

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 categories into genres? Cause in the most basic structure, we group posts into category. Now i want group categories into genres Then be able to display the […]

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 executed, looks a little like this: SELECT wp_posts.* FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id […]

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 needs to be grouped based on the meta value. For example this is my data listing […]

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 $wpdb; if( is_search() ) { return $wpdb->posts.’.post_type’; } } Before adding the filter I had 9 results, however after adding the filter I only have 3 […]

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.

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 means that multiple posts can have the same number. Now I’m trying to select only the latest entry […]

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 following code but it is not working. For some reason, it returns posts with status “revision” First, I […]

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?

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 starting with “A” are grouped and have a heading of “A”, then all posts starting with “B” are grouped and […]