Linked Questions

2
votes
1answer
161 views

reference the current category being used in the category.php page

I have this code in my category.php file <?php query_posts( array('post_type'=>'featured' )); $featured = new WP_Query( array('posts_per_page'=>1, 'tax_query'=> ...
1
vote
1answer
207 views

Create Pop-Up Box with Custom Field Content Inside the Loop

I tried this using ThickBox first, then tried using some code I had that worked on another website... Total failure. The Goal: I have a custom post type (product) with a ton of custom fields. I also ...
0
votes
1answer
204 views

Multiple Query_Posts

I am trying to put a query_posts inside a WP_query. Anything after my query_posts doesn't work properly. Here is my code. What am I doing wrong? <?php $args = array( 'post_type' => ...
1
vote
2answers
44 views

All posts are still shown when adding category argument to query

I've got the following code in my team-type.php file which I'm using to create a custom taxonomy for a member information: function create_team_taxonomies() { $labels = array( 'name' ...
0
votes
2answers
121 views

How to Loop with the final result formatted differently?

I need to list post_title's in this specific format (note the last title in the list must not have a comma) "post_title","post_title","post_title" I thought a mini-loop might work. Here's what ...
-1
votes
1answer
120 views

Making current_page_item work with wp_list_pages in sidebar on post pages

I'm working on a website where we have a menu in the sidebar that pulls the list of the parent for the current page, and all the children of that page. The problem is that, on pages where there's a ...
1
vote
0answers
198 views

Custom post type pagination - always return first page

I have custom post template archive-product.php for custom post type "product". In this template paging does not work: numbers are displayed all numbers links redirect to first page ...
2
votes
3answers
116 views

Explanation of WP_Query

Why am I able to use WP_Query methods without using an object of this class? Sometimes I see examples that are using the object: // The Query $the_query = new WP_Query( $args ); // The Loop ...
0
votes
1answer
143 views

Using Wp_Query without the loop?

I want to query for posts with a certain meta value. I would use the WP_Query but when in a loop (correct me if i am wrong.. I am learning wordpress; is it only when in loop? is the the_post() that ...
1
vote
2answers
133 views

Trying to find a way to query post like normal search would do. within search.php page

I have a costume search in a site i am making. When a user search a certain term, i want to display category list with a count of how many posts are found with in that category. I thought of a way ...
0
votes
2answers
62 views

Wordpress: Loop Help

I was working on this site this morning and I ran into a bit of an issue with my static page. I have a "featured" post section and I use: <div id="featured"> <img src="<?php echo ...
0
votes
2answers
130 views

How to display a number of posts based on a Advanced Custom Field (ACF)

I have the following code working fine in my theme: <!-- Modify query object --> <?php query_posts('showposts=5&post_type=news'); ?> <!-- Start the Loop --> <?php if ( ...
-1
votes
1answer
212 views

Sticky post for all pages and categories

I want to have a sticky post for all my pages and categories. The choice of "sticky post" in the edit post, didn't work. I found many pieces of code but I haven't the result that I want. I prefer to ...
2
votes
1answer
126 views

Can ordering post list by meta_value cause performance issue?

For some code refinement and to add new features to my plugin, I want to display posts ordered by specific meta column value like this; query_posts($query_string . ...
1
vote
1answer
121 views

It is possible to encounter horrible bugs if I place a main loop that uses `query_posts` right above the main bbPress loop?

This is the code: <?php get_template_part( 'pagination', 'bbp_replies' ); ?> <?php query_posts('gdsr_sort=thumbs&post_type=bbp_reply&posts_per_page=2'); ...

15 30 50 per page