0
votes
1answer
18 views

using posts_where for meta data on pre_get_posts

Let's say you have some code which filters posts by using pre_get_posts e.g. add_action( 'pre_get_posts', 'be_exclude_category_from_blog' ); function be_exclude_category_from_blog( $query ) { ...
1
vote
1answer
224 views

Get Posts updated or published within the last x hours

Okay, I'm trying to get posts that have been published within the last x amount of time, options being 8, 24 or 72 hours. I have the variables being passed to my featureHandler.php via ajax, then ...
0
votes
2answers
982 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', ...
4
votes
0answers
136 views

Custom query incorrectly returning everything [closed]

I'm missing something somewhere, but I cannot connect the dots. Everything outputs properly except that the query returns everything from the DB, not just posts. Can anyone spot a reason for this ...