Linked Questions

3
votes
2answers
1k views

Archive by Year

After some searching I haven't been able to find a answer to what I'm trying to archive. I'm trying to set up an archive page with accordion panels that hide/show posts from a given year with links. ...
0
votes
2answers
972 views

Custom posts per page does not work with pagination

I have one page in my template where I would like to set a custom posts_per_page. Here is the code I have used: <?php global $query_string; query_posts($query_string . '&posts_per_page=4'); ...
2
votes
1answer
932 views

Is it necessary to reset the query after using get_posts()?

Is it necessary to reset the query after using get_posts() ? I have been looking at this page and I don't see any reference to get_posts() ... I can't make it out for sure from this page either. I ...
2
votes
1answer
1k views

WP_Query vs get_posts

I have read a number of questions on SE regarding these but I still can't figure the exact difference wrt usage. Would it be true to say that I would probably use WP_Query for the majority of ...
4
votes
2answers
4k views

query_posts() in function makes global $wp_query out of sync?

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 ...
0
votes
1answer
410 views

Pagination not working in category listing [duplicate]

I can't get pagination inside categories listings to work. I'm using a custom query, with the get_query_var('paged'): $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args=array( ...
0
votes
2answers
349 views

How to order different custom post type in category or tag template page?

I have 3 differents custom post type : "Projet", "Notice" and "Disque". I want them to appear in a specific order when they are listed in the category or the tag template page. Like that : 1 - ...
0
votes
1answer
79 views

If Query Post Returns 1 Post

I have been using Query Post for a newsticker which I have created so that the user navigate through the number of news by simply pressing Next & Previous buttons. But in case if there is only 1 ...
1
vote
0answers
188 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 ...
1
vote
1answer
392 views

Possible to display posts containing a short code ?

i have some posts with a certain shortcode in them. unfortunately these posts are in different categories and contain different tags so i am not able to query them. is it possible that i run a query ...
3
votes
1answer
168 views

Add 20yrs to post date, and then query

I would like to know if anyone knows a way of adding a timeframe (say 20 years) to the datestamp on a set of posts, and then running a query on the loop which uses the new date? Basically what I want ...
7
votes
2answers
1k views

Looking for WordPress System Diagrams

I am looking for WordPress chart/diagram system design. I found only the template hierarchy diagram, but it's only part of the system. source: ...
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'=> ...
0
votes
1answer
177 views

templates with page teasers Or Featured Items

I've been given a design for a WordPress site which will be mostly made up of pages rather than posts. However, at the top of each page there needs to be three featured items in a row. Each featured ...
0
votes
1answer
51 views

Radom post image/link based on custom taxonomy

How would I make a widget to display a random post's image and permalink? I would like it to pull from a specific custom content type and only posts have set the custom field of "featured" to "yes".

15 30 50 per page