Should we trust the post globals?
@toscho left a comment to this answer which had me thinking again. How much trust should we have in the global scope, specially regarding the post globals like $post?
@toscho left a comment to this answer which had me thinking again. How much trust should we have in the global scope, specially regarding the post globals like $post?
My question is simple, I’m using WP_Query to retrieve some custom type posts filtering by a taxonomy using tax_query.
Is there an easy way to query for any posts that is tagged with any term from a particular taxonomy?
I’m using a couple of custom wp_query loops on my page, the first one retrieves news from a certain category then displays a small excerpt from it with the permalink.
How do I query by meta_value or title?
I got a paged loop that pulls in 4 posts per page from custom post type. It works great, with the only downside that the pagination wont go over the page/20 everything after that is 404, and the posts_nav_link won’t show the next arrow at all. Like the pages just aren’t there.
I was reading Stephen Harris‘s excellent answer to this question regarding the use of WP_query(), query_posts() and pre_get_posts.
I have a small problem with WP_Query. I want to get the posts filtered by category and with similar project name (like query), so I’m trying this code:
I noticed that there are bunch of operator can be use for compare in meta_query.
However, I am not quite sure what operator I should use, it is somehow confusing like = and LIKE operator.
I’d like to use a custom post type archive as a site’s front page, so that