Linked Questions

0
votes
4answers
1k views

Trying to display posts by authors in with specific user meta

Ok here's the solution: <?php $wp_user_search1 = new WP_User_Query( array( 'meta_key' => 'state' , 'meta_value' => 'NM', )); $listers1 = $wp_user_search1->get_results(); $lister_ids1 = ...
2
votes
1answer
232 views

Some doubts about how the main query and the custom query works in this custom theme?

I am pretty new in WordPress theme development and I'm not so into PHP (I came from Java and C#) and have the following situation in this custom theme As you can see in the homepage I first show a ...
1
vote
2answers
139 views

Why is the first query affecting the second query, even after wp_reset_query() and wp_reset_postdata(), but not on the second page?

I am literally clueless as to why the code does not function properly on the first page, but functions as expected on the second page. I have already tried running the second query via another ...
0
votes
3answers
293 views

how to “not” display new posts with a specific category on the main page?

I've read this and this but I'm just a basic user. I have a "technical" blog that more and more people visit. I'm a freelance, and now, when someone hears about me, he/she wants to search for me, ...
4
votes
1answer
354 views

Limiting query_posts to 1, regardless of sticky post?

As part of my homepage template, using the standard query_posts I'm pulling out 1 post (styled using a different content_part), then an ad, then the rest of the posts. This works fine, except for when ...
0
votes
1answer
739 views

A two column loop with one lead post

I got a loop from internet (I forgot the site) for two column post view. It has a nice CSS for it too. But skipping that for the question now. <?php $counter = 1; ?> <?php ...
2
votes
1answer
721 views

How to dynamically build a multiple taxonomy query loop within a post type's single loop?

This question is a little different then the others floating around here. The most similar one is "How to get the parent's taxonomy ?". I have a music cms setup that utilizes two post types: album ...
2
votes
2answers
555 views

How to generate a list of posts published on current day?

I want to create a page labeled "Today's News" which displays a simple bulleted list of all posts published on the current day and grab the current date based on the server's date/time. Is this ...
0
votes
1answer
542 views

get_posts() and global variables

I was reading this post: When should you use WP_Query vs query_posts() vs get_posts()?, which seems to have become the go-to post for understanding the difference between the different functions for ...
1
vote
1answer
894 views

Query get post,how to add comment box

Hello I have a query that gets a post with id=x and it works but it leaves out the comment box. Is there a way to add "get comment box" to the query? <?php $post_id = 104; $queried_post = ...
0
votes
2answers
689 views

Show a Category X's custom post type on Category X archive page?

I created a custom post type "landing_page" to hold content I want to display on the top of category archive pages. So for each category, I have one landing_page entry tagged with that category. What ...
0
votes
1answer
681 views

Custom Post Type Query for Sidebar Doesn't Work on Front Page

Interesting issue here. I have this: $args=array( 'meta_key'=>'_simple_fields_fieldGroupID_1_fieldID_8_numInSet_0', 'post_type' => 'stores', 'post_status' => 'publish', ...
2
votes
1answer
313 views

Determine if more posts are available than was asked for in `query_posts()`?

I'm getting products (from a specific category) using a custom query_posts() function. I limited the showposts parameter to 25, so how do I know to activate pagination if there are still products ...
4
votes
2answers
240 views

Show the First Post from Each of 3 Different Post Types on a Web Page?

I have 3 different custom post types: 1.) "events", 2.) "winners" and 3.) "offers". How would I go about retrieving the first (latest) post in each of these post types on a single web page (i.e a home ...
1
vote
3answers
180 views

Single page theme

I am trying to create single page theme. What i have trouble with is understanding this whole wordpress query logic. There is query object and supposedly i get all published posts like this: ...

15 30 50 per page