0
votes
0answers
12 views

Filter terms bases on multiple taxonomies - operator not in? [duplicate]

Building a function for filtered taxonomies. How to use 'operator' => 'NOT IN' or 'operator' => 'IN' inside the query to only show tax_query terms that are connected to all taxonomies instead of ...
0
votes
1answer
30 views

relation OR instead of AND - Filtered term ID's in loop

Question not related anymore.. First I tought about the relation OR/ AND for results, but I believe I should work with 'operator' => 'NOT IN'. I would like to query the results that meet multiple ...
0
votes
1answer
98 views

How to get the post excerpt using post object?

I'm trying to show post excerpt as in navigation. I'm trying this in plugin, does it make any sense? i don't know. I used $nex_obj = get_adjacent_post(false, '', true); for next post and it returns ...
0
votes
1answer
81 views

Buddypress Group Activity Loop Filter activity type

I'm using Buddypress 1.8.1 When the group home page load I want to show only 'activity_update' and 'joined_group' activities in Activity Loop. Here is my Activity Loop code. It is standard loop ...
0
votes
0answers
40 views

Suppress the_content filter in a nested loop

I have some layout changes that are being applied to the_content. I need to do one of two things, but neither is working as expected... either: Pass data to the filter so that it knows if it is a ...
0
votes
1answer
63 views

get_posts and wp_autop (remove filter)

I just transformed my query_posts function in a get_posts function. Here is my old function: <?php // The Query query_posts( 'cat=170&showposts=4' ); remove_filter('the_excerpt', 'wpautop'); ...
1
vote
1answer
44 views

How do I run through a Wordpress loop called from a filter function?

So I'm trying to populate an Advanced Custom Fields selectbox with a nice complicated array based off some post data. I've been trying to do this by doing a custom query and loop through the returned ...
0
votes
0answers
48 views

Show post when both categories are present but not one of them

I'm having issue filtering posts by category. There is the A category for posts (which is the default and also applies when no category has been set explicitly) and B category with subcategories for ...
1
vote
1answer
250 views

Custom search form to display users only

I'm trying to build a custom search form for one of my pages. I need the search form to be able to search for users. Not only will it need to search for users, but by first name, last name etc.. ...
0
votes
1answer
165 views

add <div> to end of post in the loop with plugin

I'm looking to add a <div> with some more html content to the bottom of specific posts in the loop. The the_post action can be used to add the <div> to the beginning of the post in the ...
1
vote
2answers
135 views

Query reset problem or flawed code to enable custom post type query

After reading through here and trying various options, I am finally able to get my custom post types 'testimonial' (created with product 'Toolset') to show along with my standard cat/tag queries ...
1
vote
1answer
548 views

How to filter posts that belong to a specific category only if that is the only category

I need to filter posts that belong to a category only if that is the only category. For example if my post A belongs to cat1 and I don't want to display posts that belong to cat1, post A won't be ...
0
votes
1answer
230 views

Why does apply_filters behave different inside and outside a loop?

What I want: the array of posts returned by creating $query = new WP_Query($args); Why: to return specific content as a sort of API request in json format, ready to display on another site What I ...
1
vote
1answer
1k views

ajax for filtering posts by category in wordpress loops

I've been looking around for a way to filter my posts on http://www.waziproject.com/wazimagazine/ without reloading the page. So my question is if anyone can help me out to turn the following into a ...
0
votes
1answer
179 views

How do I filter a custom post type loop by a field?

OK, very simple task, I'm just not good at PHP. I have a page where I want to list some staff using a styled list. Here is the page all working fine, I just need to divide the results - ...
0
votes
2answers
67 views

Way of getting queried loop before the query with a filter hook?

Is there a way to get the results of a loop with a filter before the code for the loop is performed in the structure of your code? My markup is something like this: <body> <div> /* ...
2
votes
2answers
460 views

How to order posts tag by tag?

I want to order my posts by tags with only one WP_Query() In my WP_Query I would like to display 2 posts with tags portrait 2 posts with tags paysage 2 posts with tags portrait 2 posts with tags ...
-1
votes
1answer
154 views

Applying a filter to multiple loops for days ago

I'm trying to use a filter that limits the days ago loops pull posts from. My problem is that I need different day limits for certain loops on the index page and when I duplicate the filter over a ...
1
vote
1answer
313 views

How to remove a plugin filter's priority on specific loops (custom queries)?

So I have a review plugin that is automatically sorting all my site based on the score rating. It seems here are the filters the plugin is applying globally: //Post sorting $sort = ...
1
vote
1answer
177 views

Combining action and filter?

I tried to set up different video oembed size for content and sidebar. I can set up video size with embed_defaults filter. But this filter works for the whole site and I need to have smaller video ...
0
votes
1answer
277 views

Help with add_filter('the_content', 'some_function') and multiple matches

I have a site where a user can insert slideshows into a post by entering the shortcode in the content box. He can also add videos by adding the video code in the same box. I need to separate these two ...
0
votes
1answer
278 views

Get current taxonomy and display query accordingly

Okay i'm having a bit of a catogorisation/taxonomy/filtering problem here and am at loss on how to solve this. I hope someone could help me on the way a bit. Say I've got a blog about food, with a ...
1
vote
1answer
557 views

Filtering post-formats from the loop using new WP-Query();

Hi i am currently building upon a theme that i have build previously for my blog. The following code is to point to the latest post (the featured post). As this will have a different styling than all ...
0
votes
2answers
766 views

Filter or order based on custom field

I have added a custom field to some posts called 'frontpagerank' The plan is to order the posts by this value but first I just want to filter out any that don't use a front page rank. I have achieved ...
0
votes
1answer
669 views

Exclude posts without category from loop

I'm trying to exclude all the posts that doesn't have a category assigned to from the main loop, i searched everywhere and i found a billion ways to exclude some categories or filter from specific ...
1
vote
2answers
307 views

How to track post number on the_loop

I have a need to customize some posts from the loop. Here's the deal: My site is set to 10 posts per page. On post #2,#5, #7 (on every page), I want to display specific background. What's the best ...