0
votes
1answer
413 views

Multiple templates for custom post type

This is my setup: I have one post type called "products" and a page (page X) where I use wp_query to list all products, the_permalink(); returns the link to single-products.php. The goal is to use ...
0
votes
0answers
10 views

Pagination on custom template doesn't work [duplicate]

I have a custom template for my blog homepage and for some reason the pagination isn't working. I am using next_posts_link and previous_posts_link for the pagination. The main blog page is located at ...
1
vote
1answer
1k views

Ensuring sticky posts are retrieved first (without using two queries)?

I need to maintain pagination for use with infinite scroll. Is there no way to tell query_posts to retrieve sticky posts first? It seems to be default behaviour on a standard wordpress blog on the ...
0
votes
1answer
2k views

Paginate WordPress Category Pages

I am using the following query on my category.php template: <?php $paged = (get_query_var("paged")) ? get_query_var("paged") : 1; query_posts("posts_per_page=2&paged=".$paged); ?> ...
0
votes
2answers
1k views

Display all posts from specific categories on a page

I want to display all posts from specific categories on a single page. Therefore I edited the page.php file in my theme folder. I added an 'if-clause' to check which page currently being displayed and ...
0
votes
1answer
2k views

List all posts in a category with query_post() function

I'm a C programmer, konw little about PHP. I built a Blog with wordpress. Yestoday, I try to create the page www.abc.com/server, this page would list all posts which belong to server category. I ...
1
vote
2answers
303 views

Page template with different page and post content

I am using a wordpress theme which has a page template named roomtypes. I am not a php pro but as far as I understand this template gets the posts. When I add a Room type, it is created as a post with ...
0
votes
1answer
379 views

Problem with different query loops (and “main loop”) on category template page!

so, heres the problem: i've created a category-template (category.php) with two query loops and the main loop (in which the content from the category should get looped in). if i now click on a ...
1
vote
1answer
134 views

Schedule Sticky Posts

I'd like to display the most two recent published sticky posts by modifying the primary loop. A simple affair with the following loop. However, if I schedule a sticky post to be published in the ...
0
votes
1answer
191 views

Having trouble using this post category query on multiple pages?

I have three pages on my site (Listen, Read, Watch) which each query a different post category: "listen", "read", and "watch" respectively. I created three separate php files with their own unique ...
0
votes
1answer
46 views

odd behaviours from template tags

Some of my template tags are playing up, and they have left me confused. On one site, that has been live for over a year without any of these issues, on all the pages that have custom query loops, ...
0
votes
2answers
2k views

Why this code causes infinite loop?

Hi all I have this template page which get the page's post and then a list of posts from the category news. <?php /* * Template Name: News & Info */ get_header(); ?> <div ...
0
votes
1answer
237 views

How to setup blog page to render blog posts minus afew categories

I have set my home page to use a static template. So I created a Blog page to use a blog template to render my blog posts. The problem is it just renders the page content. I want it to render blog ...