query_post by title?
is it possible to create a loop of posts using WP_Query or query_posts using the title?
is it possible to create a loop of posts using WP_Query or query_posts using the title?
There are two query_posts() functions technically speaking. One query_posts() is actually WP_Query::query_posts() and the other is in global space.
I want to search for posts with WP_Query() and select only posts that begin with a specific letter. I found a bunch of old posts with filters that were pre-4.4, but since 4.4 there is a title search added to the WP_Query function.
I’m trying to get my news page to display content from one category only (number 3) but I cant seem to get it to work. Instead of just displaying posts from category 3 it displays posts from all category’s.
I just did an action on the query using pre_get_posts and it didn’t work. When I removed the $query->is_main_query() it did work.
I would really appreciate if you could help me 🙂 I’m very stuck and don’t know how to proceed.
How do I create a random post but it shouldnt be change when the page is refreshed
I edited my loop in archives.php in order to work with pagination and with the Category Post List Widget. I basically pieced it all together from random code and ideas and am now so far from the default post query that I’m having trouble getting back to square one. The reason I need to get back to square one is that I need two things:
I have a query_posts call in a WP template. Through the use of the More Fields Plugin I can give the site admin the ability to create an event (custom post type) and then enter a date which is formatted: YYYY/mm/dd.
I have an archive page ordered by a numeric value in a custom field. This returns the ordered posts correctly, but does not display posts that don’t have a custom field.