Get posts by meta data OR title
I have a working query that calls all my posts that have a certain meta value for one of two meta keys:
I have a working query that calls all my posts that have a certain meta value for one of two meta keys:
This might sound like query_posts with pagination problem number 2103024 but I think this one might be special.
I am trying to add a field to WordPress posts (not pages) which would simply include a label and a checkbox. Something like: Make this the sticky post? If check, the key should be set to TRUE or something that is easily accessible. The problem is, however, that I only want one post to have possibly the TRUE value. This means, when I have checked the field in post-1, and afterwards I check that field in post-2, post-1’s field value should be set to FALSE so that only one post can have TRUE at the same time.
This has me stumped for a while already. Either I am missing something very obvious or something very not obvious. I am also not entirely sure if this has something to do with WP or purely PHP mechanics at work.
I am running a website with WordPress 4.2 and have changed the way draft posts or posts in review status are displayed to non logged in users (these posts are, too, visible to anyone who visits the website).
Hi I’m trying to pull posts using the wp query. Just one problem–I am trying to sort the posts alphabetically by a certain meta_value. Thing is that this meta_value is a serialized array. Is there an easy way to do this without having to unserialize it? Thanks!
I want 3 post with one loop iteration, so I’m using the_post() to achieve this: (html removed)
I have the following code which gives be posts that are published in the last 100 days
I have an example basic wordpress theme template here for you. First, please take a quick look at it to get an idea.
With the following code (in functions.php) my posts (of CPT event) are ordered by _end_date instead of _start_date. What’s the proper solution to this as of WP 3.1.3? Of course I’d like to avoid using deprecated meta_key.