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

22
votes
1answer
11k views

Create custom page templates with plugins?

Is it possible to make custom page templates available from a plugin?
8
votes
4answers
1k views

Is there a WordPress plugin that registers a plugin file as a custom page template?

I need to create a plugin that makes custom page templates available in wp-admin. I'm wondering if someone has tackled this already, as it seems like a pretty typical process?
0
votes
1answer
1k views

Custom meta box shown when template is chosen [duplicate]

Possible Duplicate: Toggle admin metabox based upon chosen page template Is this possible to change editor screen immediately after someone picks some template from the drop down? I need a ...
8
votes
6answers
4k views

How to *remove* a parent theme page template from a child theme?

I'm using the TwentyTen theme to create a child theme, but I can't seem to get rid of the 'One column, no sidebar' page template that is in the TwentyTen parent theme. I thought just copying it over ...
2
votes
1answer
1k views

How to quickly switch custom post type singular template?

I have a custom post type called movies and I need to quickly switch the template that displays the movies cpt on the front end via a link. How can this be done? Files I have: single-movies.php ...
3
votes
1answer
909 views

Dynamically link to the latest post or simulate request of specific post in page template

I want to have a link in the wordpress menu pointing to the latest post of a specific category. Because I am not able put a dynamic URL in the wordpress menu, my approach was to put a page with a ...
3
votes
2answers
183 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
980 views

Custom post type archive and single.php files not working

Hi I've created a custom post type called shows. here is the code for it. <?php add_action('init', 'show_register'); function show_register() { //arguments to create the post type. ...
2
votes
2answers
621 views

Create built-in pages without creating actual pages

For example: site.com/contact (or site.com/?page=contact if not using permalinks) when someone goes to that page I want to load a theme template, like page-contact.php But I don't want to create a ...
3
votes
2answers
3k views

Multiple areas of dynamic content in a page

I am new in Wordpress and what I really can't find how to do is the following: I have a new Page created from the CMS. This pages have different modules with text. Take for example this template ...
2
votes
1answer
473 views

Listing Parent, Child and GrandChild Categories and then the PostTitles on Page Template !

What I want to do is a loop like this is something like this I'm really sorry but its hard to format here! I going to put this short url http://pastebin.com/dEdKzgJz so you can see it better... Can ...
5
votes
3answers
3k views

Is it possible to stop selected plugins from loading on certain template pages?

I have a template page that has form on that is only used once in my site. The form uses form validation using jquery validate plugin (such a great plugin). Once the cart66 Plugin is loaded, the form ...
1
vote
3answers
150 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: ...
0
votes
1answer
416 views

How to create custom home page via plugin?

I want to code a plug-in that creates new custom home page. Note that I have never coded any plug-in before. 1) After activation of plug-in user needs to go to the options of the plug-in and set up ...
0
votes
2answers
470 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
47 views

Recents posts pulling from different post type

This blog page is pulling from a Page Template called full-width-blog.php. The left of the content is where the supposed general posts should appear. On the right is the sidebar. How could you make ...
0
votes
1answer
114 views

How to show a post single post in page template

Currently I've divided posts into 5 different categories, based on the categories I've created 5 page templates. all of the pages are listed into the home page navigation menu. in my home page I'm ...
9
votes
5answers
2k views

How can I add an option to the Page Template list from a Plugin?

I've been looking around for the past couple hours for a way to create a custom page template from within a plugin but haven't had any luck yet. What I am specifically trying to do is add an option ...
4
votes
1answer
562 views

Creating a Custom Post Type for Inserting Preset Content into Post & Pages?

In response to Mike Schinkel's comment (see below) on my post about how to pre-populate content (essentially using a content template)... @Scott B I mean why did you support a file on disk ...
3
votes
3answers
795 views

Setting a custom sub-path for blog without using pages?

Warning: fairly pedantic request ahead. I have a design that makes use of posts (I.e., the blog) and a custom post type called "howto". The site front page ("/") has a template that displays the ...
0
votes
2answers
889 views

Authors Page : A page of authors

I'm looking for a way to create a parent authors page and then use the author.php for the individual author pages. I've been out of the loop (no pun) for a couple months and am wondering the best way ...
2
votes
4answers
731 views

How can I dynamically load another page template to provide an alternate layout of the posts?

I have a page that displays posts (4 on each row), with a thumbnail image & title for each. Is it possible to click a text/icon link and dynamically switch the page template? I'm looking to ...
1
vote
1answer
1k views

Control Custom Post Type template from a plugin

I can control the custom template to be used on custom post type pages but the template file would still need to have the markup of the theme. I was wondering if I could make it theme independent? ...
3
votes
4answers
2k views

How can I create an alternative home page?

I'm working on a site which has a fully customized front page. Now I'm asked to add a more classic looking blog type page which will be reacheable at http://domain/blog. I tried creating a custom ...
1
vote
1answer
224 views

Page Templates - this code only works for one Custom Post Type

I have the code below in my functions.php file, it works great and allows me to use page templates in my custom post type 'services'. I have defined which 'type' to use on the first line with ...
1
vote
1answer
93 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 ...
5
votes
2answers
2k views

How to Change 404 page title

i have try many methods after searching on internet but unable to ramove Nothing Found from my 404 page title how to do it please help me even i have us this in my 404 page header if( is_404() ) ...
4
votes
1answer
921 views

How to get IDs for objects in menu branch?

Is it possible to print content of all menu items, when displaying menu (or branch of menu as in question about displaying menu branches) ? Once I click on About Us I wish for new page to display ...
2
votes
2answers
405 views

How do I modify this page template to show subpage excerpts (not post excerpts)?

I have made a page template which shows linked subpages using this bit of code: <?php $mypages = get_pages( array( 'child_of' => $post->ID, 'sort_column' => 'menu_order', 'sort_or ...
2
votes
1answer
392 views

I put my blog on a subpage, how do I get page title?

I've got my blog setup on a subpage (not the front page) and I'm using the template file home.php, how can I get the contents from the page editor onto this subpage? If I change the title of the page ...
1
vote
1answer
455 views

jQuery Ajax() doesn't work when the page is accessed as a WordPress template page

In one file (test_ajax.php) I have a which on change loads another page (registration_form_race_type.php) with a short message via jQuery Ajax(). It works fine when "test_ajax.php" is accessed via its ...
1
vote
2answers
4k views

Create a new template for twentytwelve

Twenty Twelve comes with some page templates: Front Page & Full Width. These are in the folder /page-templates. I've created my own template and saved it into this folder, but it is not ...
1
vote
1answer
472 views

How to remove a parent theme template from Quick Edit?

I was looking for a way to hide the parent theme's templates and found this answer which works perfectly to remove the parent templates from the pages edit screen - How to *remove* a parent theme page ...
1
vote
1answer
1k views

How to retrieve $_GET variables from rewritten URLs?

I need to receive some special $_GET parameters for a custom page I'm making, i know how to receive this through a simple $_GET like mysite.net/products/?id=1 , but I wanted to use the URL style of my ...
1
vote
1answer
76 views

Template plugin for blog posts?

can someone recommend a plugin to do the following? My wordpress CMS has two types of users: administrator and editor, both of whom are not technologically savvy, so they need things to be super ...
1
vote
1answer
2k views

Pagination on a custom page template

I have set up a custom post type called 'Events'. For reasons that I'm not going to get into, I chose not use archive-events.php as the archive template for my Events. Instead, I decided to create a ...
1
vote
1answer
664 views

Posts archive index pagination in a static page custom query

In WordPress, I have a page for News that is using a specific page template I created. This page is populated by news posts assigned to the news category. I need to show only two of the latest news ...
1
vote
1answer
1k views

Created custom post type but selected template not staying selected

I have registered a new post type called Resources. I specify 'page-attributes' as a supported feature. When I go to create a new Resource post I see under Template that I can pick from a number of ...
1
vote
1answer
1k views

WordPress custom post type Single.php?

I have a WordPress custom post-type setup. I've created single-[customposttype].php However instead of displaying only the requested custom-post-type it goes to the URL, then displays all of the ...
0
votes
2answers
75 views

page template within custom post type

I have registered a custom post type and created a file called archive-myCPT.php and another one for single posts called single-myCPT.php. What I want to do is to create a page where I will show just ...
0
votes
2answers
148 views

page template for custom post type

I'm trying to build a debates-like system. It will work like this: A page will display the post with a countdown timer, so user will be able to submit comment till a specific period of time. (this ...
0
votes
2answers
548 views

Post formats template

I would like to know what template wordpress uses to display post formats archive pages? What is parent template file that is used when there is no specified template file and what is specified ...
0
votes
1answer
274 views

page shows 404 on form submit

I have creating a template page in which i have a form, upon testing it gave a 404 error. should i putting something else in action? `<form action="results.php" method="post"> <!--my ...
0
votes
1answer
252 views

Build dynamic page from cURL (HTML page) response with plugin

I feel like I am missing something simple here, but can't figure it out I need to have my plugin build links to a page that is built entirely via a cURL response. I am building a plugin that ...
0
votes
2answers
8k views

How to display page content in a page template?

In my WordPress site, I made a custom page template, which contained a custom query [using WP_Query()]. With that query, I can perfectly get the posts of a certain category. But I want to show the ...
0
votes
1answer
195 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
2answers
457 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
244 views

How do I create a custom post type for a training CMS in WordPress?

I need to create a custom post type based on the existing 'Page' type, for a WordPress based training CMS. I have no problem simply creating a new post type, but I would like to offer some kind of ...
0
votes
1answer
1k views

Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category

I'm trying to get the terms of a taxonomy (kind) and the number of content they have but only for a specific category (get_parent_page_slug() = city name = category slug). This is what I have so far: ...
0
votes
2answers
541 views

Featured Images on Front Page

I currently have a static front page and a /blog. My goal is to have the front page be a grid of hand selected images (similar to a portfolio). I would like to be able to easily switch the images are ...