2
votes
1answer
29 views

Filter Media Library by author or post_parent

I am trying to filter the Media Library so only media items that are uploaded by the current user OR children of the post being edited are visible. I've had no problem doing it if the conditions are ...
0
votes
1answer
186 views

Filter post query to only show direct children of category

Google seems all purple on this subject, if you know what I mean. I've searched for this topic forever to find a solution. I want to build a finder/explorer feel to my categories, so when browsing to ...
0
votes
1answer
170 views

Filter Posts by current Month

Ok, I have a client that wants to only display posts by the current month. I've tried a few different variations but none have worked. Here's where I'm at now. Any help is appreciated! ...
3
votes
1answer
1k views

Using query_vars filter

I am trying to link out from the WP admin to view posts in a specific way. The url structure for this is example.com/post123/?my-preview=456 /post123/ is the regular permalink for a post. The ...
2
votes
1answer
279 views

How to implement time filter to show random post 1 month for one category and 3 months for other categories

I started to work on one website after another developer and there is problem with his "popular widget" which is basically showing 3 random posts from category. There is some Switch statement which is ...
0
votes
1answer
98 views

Adding an orderby filter, casting postmeta with multiple keys

I am using this filter to sort my query by a date field stored as text (legacy data) add_filter( 'posts_orderby', 'my_posts_orderby_date', 10, 2 ); function my_posts_orderby_date( $orderby, $query ) ...
1
vote
2answers
161 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
1k views

Custom search page and search by title, content and tag

Can someone review my code , I need to know better solutions or any bug. Okey ! , I made a PHP file to get search results by parameters and search by title , content and tag PHP's head look like: ...
0
votes
2answers
980 views

Using dynamic conditions in 'posts_where' filter

I have the following code which gives be posts that are published in the last 100 days function smbd_cats_by_days ($where = '') { $where .= " AND post_date < '" . date('y-m-d', ...
2
votes
1answer
334 views

Adding posts of custom type into the main feed

I'm having some trouble with a subject that seems to be pretty basic, so I'm starting to feel (a little, only a little) dumb :-) Here's the thing: I want my main feed to include the posts and other ...
0
votes
1answer
362 views

Excluding posts by meta, and also keeping posts without the meta

edit: Think I managed to figure it out, check the answer right under here, or click the following link: http://wordpress.stackexchange.com/a/51175/15809 I've been trying to find a way to exclude ...
1
vote
1answer
399 views

Append a value to a certain page's URL before page load

This particular website is using Tubepress to display a youtube video gallery. Now, Tubepress recommends that, to define which video goes to the front part of the gallery, we should append the id to ...
1
vote
2answers
199 views

What is considered a default query for the request filter?

As stated in one of the answers in this question and in the codex entry for the request filter, said filter gets called only in a default query, such as the main query used for a loop. My question ...
1
vote
1answer
991 views

How to display posts under a specific subcategory of a given category

after a long search online I have decided to post my problem here in the hope of getting a solution to this issue. Well, I have a custom post with various categories (novels, books, magazines etc..) ...
1
vote
1answer
748 views

Wordpress Search Filter Only for Page with Child of Child of Child of Child of Child

after browsing question from this site I found the workaround for this: function SearchFilter($query) { if ($query->is_search) { global $post; $query->set( 'post_parent', 21 ...
0
votes
1answer
745 views

How to query posts by month based on date custom field?

I currently created a custom field for a custom post type that stores a date in the format dd/mm/yyyy is there a way to query the posts by the month? I "kind of" got the functionality I need using ...
0
votes
1answer
283 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
776 views

How to limit search to first letter of title?

I was wondering if there was a way to make the search only look for the first letter in the posts title, basically let's say my search query is www.mysite.com/?s=q I'd like to get all posts that start ...
0
votes
1answer
443 views

Trying to exclude custom posts based on date, while sorting by custom field

I have a custom post type named "performance". I have a custom post query that orders posts by a custom field value (order-date). Now I want to exclude posts that have order-dates that are in the ...
1
vote
3answers
751 views

Possible to filter the posts or categories that XML-RPC users see in their mobile application?

Is it possible to filter the posts or categories that XML-RPC users see in their mobile application? I have a plugin that hooks into pre_get_posts and list_terms_exclusions to do what I need it to ...
0
votes
1answer
3k views

Overriding default calendar to show posts from a category

I'm trying to modify the default WP calendar (get_calendar()) so that it shows posts from a specific category and then use that as a shortcode. Here's what I've done: Copied across the ...
0
votes
4answers
2k views

How to filter post from categories only if the posts appears in one of them, not the other?

The scenario is, some posts have one category, ok. Some others have more than one category. I must create post with content and also slideshow thumbnails for use with Nivo plugin gallery. Ok. I want ...