Pages are one of WordPress's built-in Post Types. You'll probably want most of your website Pages to look about the same. Sometimes, though, you may need a specific Page, or a group of Pages, to display or behave differently. This is easily accomplished with Page Templates.

learn more… | top users | synonyms

0
votes
1answer
232 views

Conditional get template part

My index page look like this... <div id="ad-id">google ad code goes here </div><br /> <div id="post-id">My posts are goes here</div> I use ...
0
votes
3answers
860 views

Dynamic href link to Contact Page

I need a <a href="Something Like <?get_contact_page>">Contact Page</a> Code that always links to the Contact page, no matter what is it's ID There's a page template for contact ...
1
vote
1answer
69 views

Create a loop that gets pages with their template

I am trying to make a template that will be an html5/ vertical scrolling base. I have created an amount of page templates that each would represent a <section> on index.php which mainly all it ...
0
votes
1answer
53 views

Outputting content from page

I'm trying to display a title, featured image, and content from a page into a new template (that will contain content from several pages). I tried to just echo the variables as shown below, but right ...
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
33 views

Find out in which kind of archive am I

in archive.php file, I want to know, which type of archive I i'm in. For example, if I i'm in archive for category Personal I'd like to be able to display it in header of the archive. Of course, I ...
0
votes
3answers
122 views

Display additional page templates and a sidebar on plugin activation

I'm developing a child-theme off of the Twenty Twelve (1.1), using Wordpress (3.5.1) and the Woocommerce plugin (1.6.6). I've noticed that the problem with creating the online shop, single product ...
4
votes
2answers
300 views

Do I need to use The Loop on pages?

I'm writing my first WordPress theme and have a question about the use of The Loop in page templates. The page templates I've looked at all follow basically the same pattern (example from Twenty ...
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
1answer
224 views

Removing the TinyMCE editor for a given page template

I was looking for a way to remove the TinyMCE Editor for a specific page template in a theme (in my case it's page-home.php). I found the following code, which works, however, I was wondering if this ...
0
votes
1answer
87 views

The $post variable – Did I get the grasp of how the Backend actions get parsed?

I was looking for a way to attach a custom meta box to the edit screen of a page at a specific template. I found and tried this here and from my actual point of view this can't work that way. Let me ...
0
votes
1answer
286 views

Loop and add Specific Categories and Products Images

Thanks to Rafael Marques I have a list of Products and Categories organized based on different created categories. I also have 5 different Custom Page Templates. Now I would like to display the ...
1
vote
2answers
1k views

Custom-Posttype & Custom Taxonomy WP_Query

I add a custom post type with custom taxonomy and i wish to get all postings into this by a template, but the result is 0 $args=array( 'post_type' => 'contents', 'post_status' => 'publish', ...
2
votes
2answers
240 views

What content should go in index.php?

I'm developing my own theme and came up with an issue that' I am confused with. I have two files that I'm trying to figure out. page.php and index.php. I know that page.php is used for pages, of ...
0
votes
1answer
55 views

How to show one page with two different templates

I have a page template that I want to be able to show in two different modes: a regular mode and a bare-bones mode, where there is no header, footer, sidebar, etc. My hope is that I can get this done ...
0
votes
1answer
425 views

How to make page template with admin able to select NextGen Galleries to be part of the layout?

I'm trying to make a product page template, editable by client, which will have 3 different NextGen Galleries per page. In the product page admin area, I want the client to be able to select which 3 ...
1
vote
3answers
481 views

How to sort list of custom posts to get view like a tree of posts under categories and their children's categories?

I'm new here and my english isn't perfect so I'm sorry for this :) I'm here because I'm workin on site with post list sorted by category and I have problem with sort out my posts in categories and ...
0
votes
2answers
76 views

How to create a template for Pages?

In Wordpress, when creating a page, it shows some options for Template under Attributes, such as: Default, Links, One column no sidebar, etc. Is there a way to add more custom templates to show up ...
0
votes
1answer
196 views

adding GET variables to a header() location in a page template

header('Location: /page-name/?var1=' . $_GET['var1'] . '&var2=' . $_GET['var2'] ); exit(); The result of the above code ends up redirecting the site to: ...
0
votes
5answers
722 views

Proper way to create custom static page

I'm fairly new to WordPress. I'm creating a page with a form. It works, but being so new, I'm wondering if I'm doing it in the best way. I'll use Twenty Twelve as an example theme. copy 'page.php' ...
0
votes
2answers
920 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
2answers
126 views

Organize template parts and page templates in folders in regards of template hierarchy

Hello and happy new year Suppose one has a large theme composed of several post types, page templates and a bunch of custom loops and template parts which is best keeping in separate php files. ...
-2
votes
1answer
36 views

How can i display a 4 diferent themplate for the archive page

How can i display 4 diferent themes for an archive page When i click on the right in corner i want to display another theme, another Css style (my own) Something like this. ...
0
votes
1answer
361 views

Assigning certain pages or posts to use the template of the parent page or category

I created a website that's using Wordpress as its CMS. There are parent pages -> sub categories -> content within each sub ...
0
votes
1answer
145 views

E-Commerce Products Page Sidebar Formatting

I inherited a wordpress e-commerce website from a developer that only half finished the project. I do not know alot about css or php, but I have been able to play around with the coding enough to ...
0
votes
3answers
507 views

Showing sidebar-2 on custom template page

Environment: WP 3.5, Twenty Twelve child theme. I created a custom template. Now, I'd like to display the built-in sidebar-2 in this custom template page (instead of the default sidebar-1). sidebar-2 ...
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 ...
0
votes
2answers
603 views

Remove navigation from header in custom page template

I'm building a landing page and want to remove the navigation menu from the page. The navigation menu is in header.php which is of course in the page template. Is there a WordPress function I can use ...
0
votes
1answer
183 views

Prevent menu from loading in a page template [duplicate]

Possible Duplicate: Remove navigation from header in custom page template Is there some way to remove wp_nav_menu in a page template? I can't find anything related to page templates other ...
2
votes
1answer
133 views

Create second custom 404 page for selected post type

I created a new custom post type called event, which works fine. I also created a custom 404 page template, which is shown if a event/page/post is not found. But now the hard part, i want to create ...
0
votes
1answer
1k views

Remember form field values with page navigation

I have a form on a page template that controls which posts show up on the page and how those posts are ordered. You can see what I mean here: http://www.theseattlevine.com/the-vine The questions I ...
0
votes
1answer
69 views

ajax page template

I am creating a wp theme that gets all its data via ajax (using ajax-admin.php). Now, I've set a div that would have the html of the page there (in the index.php file). My index.php is a simple one, ...
1
vote
2answers
299 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 ...
2
votes
3answers
402 views

What are the differences between “Latest Posts” and “Static Page”?

WordPress has an option to pick "Latest Posts" and "Static Page" under "Settings" in Admin Panel. My questions: What page template is getting loaded in each of those modes? Why paged stops working ...
0
votes
1answer
48 views

How to set up conditionals in page templates?

I have created custom template page like this with a custom query on page showing only details fetch from my custom table not any post. /* Template Name:product */ <?php get_header(); ?> ...
1
vote
1answer
121 views

Custom page sidebar using Template dropdown box

i am wondering how i go about making a Template for some of my pages to use a different sidebar? I have created the widget like this: register_sidebar(array( 'id' => 'ourPat-sidebar', ...
-2
votes
2answers
442 views

Page.php vs Single.php

I have a page.php and single.php template that are 100% identical. Yet, when I render page.php the div don't get nested in the same way as single.php and the layout gets broken. I've even diff'd the ...
6
votes
2answers
4k views

Getting only direct child pages in WordPress with get_pages

I am trying to fetch all direct children of a page. But I am getting all children and grand children as well. Any ideas? PHP Source: $args = array( 'child_of' => $post->ID, ...
1
vote
1answer
195 views

How to dynamically save a selected option from page “Templates” selectbox?

When I select a template for a page from the "Templates" selectbox, the selected item gets “value=selected” only after I hit save draft/publish/update. <option value='template-gallery.php' ...
0
votes
2answers
324 views

custom post template ignored after altering permalinks

I've built a site with a custom post type called Testimonials and am using a custom template to display the posts edit: template name is page-testimonials.php. All is working as expected with the ...
0
votes
1answer
86 views

How to move from page template to page template

I have created two pages each using a different page template. I have a form on the first page and when I click on the submit button I want to move to my other custom page. This should be so simple ...
0
votes
1answer
364 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 ...
0
votes
1answer
280 views

Blog page won't show Blog template

I set my "Blog" page to a Blog template I created in Pages (in the dashboard). Also, in Settings > Reading, I set my Home page (home template) as my Front page and my Blog page as my Posts page. ...
0
votes
1answer
105 views

How do I paginate a custom post type listing on a custom template page?

I've got a page template called tpl-memos.php which is attached to a page called 'Memos' with a parent page called 'About', the permalink for the page therefor is example.com/about/memos. On this page ...
0
votes
1answer
116 views

Lead Generation with Cookies in Wordpress

New Edit I would like to show the_content BEFORE the more tag when the cookie is not set and the_content AFTER the more tag when the cookie is set. I could not answer to my own question because ...
0
votes
1answer
502 views

load more portfolio on page end reaching

i like to add an automatic load more link on the bottom of the page, so when a user reaches the end and starts scrolling the next recipes (in this case) will be loaded. ...
0
votes
1answer
21 views

link a custom page into menu

Ok i have a file which named, page-allpost.php now I have a menu item called "all post" and in that menu I want to call the page-allpost.php which will display all the post. how to do that? hope ...
1
vote
2answers
118 views

How to display non-page / post content

I have a custom made Twitter stream on my site. I want to have a permalink for each tweet which would go to a page which would display only the tweet - no other content - surrounded by my custom ...
0
votes
1answer
297 views

Limit page template choice by page title or ID?

I'm developing a multisite and creating my own themes for it. All the themes will feature some standard pre-defined pages eg. homepage, about, blog, contact us etc. Each page will also have a number ...
1
vote
2answers
454 views

Single page theme that uses pages for the content

I'm making a one page site. On the page I want to run WP_Query three or four times to pull in those 3-4 pages. The page looks a bit like this: <div class="row"> <?php $args = array( ...