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

2
votes
2answers
49 views

A check for if is parent page, if has children, if has grandchildren

I have one default page template that I wish to use for two scenarios. I'd prefer to use only one page template for the sake of simplicity for my client. Here's what I'm trying to accomplish: if ...
1
vote
0answers
38 views

Page Template as Custom Post Type Archive

My goal is to have the slug www.domain.com/resources used by a Page Template rather than an Archive Page, and have single CPT posts as children of that slug, such as www.domain.com/resources/post. ...
0
votes
0answers
10 views

attaching multiple templates to page on plugin installation?

I want to create multiple pages on plugin installation and attaching a different template to each of those pages. I have done a lot of "googling" and haven't gotten any positive output?
0
votes
2answers
31 views

How to Use index.php file for “Blog” Page And this is Not a Home Page

I Created a Page(from Pages -> Add New) Called "Blog" when click the "Blog" menu in header I want to display the posts from default post not Custom Post Type How to do this ?
1
vote
1answer
9 views

Why is the Page Template dropdown menu using the wrong file name?

This is strange. I have a file, page_market.php, that is named "Market Main Page". It WAS being used when I chose that page template, but now it is not working at all. Instead, it looks like I'm ...
0
votes
0answers
7 views

Unable to use template modules while creating page

I am trying to create a product page and wish to use a custom template that I built. I selected the template in the Template Option but none of the template modules were imported the page edit ...
0
votes
0answers
12 views

Using empty page template - calling index.php into a template

I am building my first theme and I would like to have it in one index.php, which includes header, sidebar and footer, which i don't want to use via get_sidebar() etc. My sites don't need post-types or ...
0
votes
0answers
34 views

WooCommerce Shop Page Category Display with multiple category per product

In my woocommerce store all of my products are organized in two categories. My problem is on the shop page, the category is displayed above the name of each product, but it displays the category that ...
-1
votes
1answer
32 views

How can I get parent term from a child term

I have a custom post type and a taxonomy, when adding a post if I select a child term and not the parent term then I cannot use get terms as the parent term wont be in the array as it wasn't selected ...
0
votes
1answer
19 views

How do I change the scan depth for page template files?

I want to move my template files to a file sub-directory like ./tpl/page but it seems to only scan one directory deep. Is there a way in my theme that I can set it to scan deeper?
0
votes
0answers
27 views

Why Wordpress gets old templates code instead of the last updated ones

I recently finished building my WP theme (child theme of twentyfifteen). My friend started updating content and accidentally added content to a page which don't have a function that gets and displays ...
0
votes
1answer
22 views

How to add page under a custom post type?

I would like to add a page that uses a custom template (page-coffee-about.php), so it will appear under a custom post type called "coffee". The URL of the custom page should be ...
1
vote
2answers
41 views

Custom post type archive page template

I am trying to implement an archive for a custom post type: http://mywebsite:8888/about-us/client-news/2015/03/ The problem is that it keeps serving me a 404 page and I cannot work out what page ...
0
votes
2answers
52 views

Dynamically generate child-URLs for posts or custom posts

How can I have a post (or custom post) with a definite URL: www.test.com/category/post-name and a child-URL referring to a specific section of that post www.test.com/category/post-name/sub-url ...
0
votes
2answers
31 views

Dynamically change page that loads

I'm trying to figure out how I can change the page that loads. Let's assume I'm just using the default permalink and I have a URL with a page_id. I want to be able to override the page that would ...
0
votes
1answer
13 views

Custom form not showing in correct place on page

I have a page like this: <h2 class="subHeader contentSubHeader">Are you already a member? Don´t miss your next career opportunity!</h2> <p class="subHeader ...
0
votes
1answer
29 views

Adding secondary featured image for page_for_posts

@Howdy_McGee helped me sort out adding a banner image to page_for_posts, however I need to resize images showing up in the blogroll for page_for_posts so it doesn't use the featured image banner ...
0
votes
2answers
37 views

How to make an archive page displaying posts in a date range

I'm trying to make a couple of Page Templates for different Pages that should act as an archive to display posts (a Custom Post Type actually) in a certain date range. The website it concerns is ...
1
vote
1answer
43 views

Inconsistent `body_class()` function

Here's my scenario: I'm using body_class() in my <body> tag as per the Codex instructions I've created specialized page templates (as described here) for the following pages: Home: ...
0
votes
0answers
20 views

Remove action added from class

This has been asked before and I know how to do this but im having trouble removing a specific action added by the easy columns plugin. The action is added similar to below: class EasyColumns { ...
0
votes
1answer
30 views

Injecting pre-defined text from custom page template to editor

I am creating a custom page template: < ?php /* * Template Name: sliding content * Description: Sliding category contents */ get_header(); ?> <div id="primary" class="content-area"> ...
0
votes
1answer
35 views

Multiple get_posts() queries on one page

I'm building custom page template, which has some content editable through proper articles/posts. Below are those code blocks: <?php $contact = new WP_Query(); $contact = get_posts( array( 'slug' ...
1
vote
0answers
25 views

how to setup custom content structures

I have some custom pages I need to develop, and I want them to be easily edited by my client. The problem is that the markup is fairly complicated, I want to be able to give them the ability to edit ...
0
votes
0answers
46 views

custom post type archive slug vs. custom page template

I registered a custom post type for events and now I asked myself how to handle upcoming events and events in the past properly. By now, I'm displaying upcoming events on a custom page template I ...
0
votes
0answers
31 views

Post gallery as carousel

So I have this idea in mind: I would like to create custom page template, and whenever in post gallery is between tags, for example: Lorem ipsum somethinginkgsd.... [carousel] Gallery here ...
0
votes
0answers
44 views

Custom template of page with blog posts list for multi-blog page

I need to use (on my theme) multi blog pages (Posts page). My idea is using page template for it, but I have a problem with getting all posts in template file. Regular loop the_post() from index.php ...
-1
votes
1answer
36 views

Adding css tweak based on page template

I have a parent page that is listing out all of it's child pages. This is done using the below: <?php $query = new ...
0
votes
1answer
20 views

Can you create a custom page with content in the center already defined?

Is this possible? So for example, you select from the templates a page called "custom-blog-home" and on this page in the centre you have two section, one is a set of blogs being pulled in and styled ...
0
votes
1answer
45 views

page.php not displaying content

I am using a page.php template I have used on about 400 Wordpress websites, and all of a sudden the loop decides it doesn't want to display any content. Code is: <div class="text-content"> ...
0
votes
0answers
44 views

Why doesn't a custom template page with pure html work?

I've tried to create a landing page on my website from an HTML template I have. Everything worked fine until I copied the contents of HTML into the custom page file I created. So, the problem is when ...
0
votes
1answer
11 views

Content template when adding a new page

Is it possible to have predefined chunks of code that can be inserted into the editor/textarea when making a new page? On my site i have a listing of local people, and although each page has ...
1
vote
2answers
51 views

Create a page template with No Footer

I want to create a page template that doesn't use footer. Removing get_footer() will not work in this case. Because my theme adds the stylesheets and scrtipts after the footer (before /body) and if I ...
1
vote
1answer
65 views

Custom Post Type with Templates using Meta Boxes?

I have this issue where I need a CPT to have several layout options and use templates. Originally, WP does not support templates for custom posts, however I know its possible to do it manually via ...
0
votes
1answer
29 views

How can I get Wordpress CPT archives and page templates to work with prettified permalink settings?

I'm having very weird issues with my permalinks and template files on this site I'm building. I've created several Custom Post Types. These all have archive pages in my template structure named ...
0
votes
1answer
35 views

Can not get shortcode content in function

I use a shortcode on my page like [homepage_featuredproducts]test[/homepage_featuredproducts] In my functions.php function homepage_featuredproducts( $atts , $content = null ) { ...
0
votes
1answer
23 views

Will placing custom templates in sub directory break any native WordPress functionality

I have, on an existing project, created a folder named templates in the theme root directory where I have put all my custom template files, all the files that have the Template Name: BlahBlahBlah in ...
1
vote
1answer
165 views

How to handle a missing page.php?

I'm using the free Wordpress theme Stargazer by Justin Tadlock. I'm trying to integrate a plugin (WooCommerce) with it and after reading the documentation, I need to find the page.php file, copy the ...
1
vote
0answers
37 views

How to use multiple archive templates for a taxonomy?

I have created a custom post type (product) with a taxonomy (brand). I need to have the basic archive pages (type A) and then custom ones (type B) to create a product comparison page which esentially ...
0
votes
0answers
44 views

How to add custom post type taxonomy select to template page?

i have a custom post type "location" that have custom taxonomy "continent" (Asia,America...) i also have a page template "Loacation map" that i want it to show only loacations from specific continent ...
0
votes
0answers
72 views

Custom Post Type Pagination Not Working or Single Posts Displaying?

I want to create a page to display all the 9 recent posts within that custom post type. (this is where I'm getting confused) I've called the page template page-podium.php ( my custom post type is ...
0
votes
1answer
22 views

How to create a custom template for this custom post type?

I've created this custom post type. /* custom post - traveller posts */ add_action( 'init', 'traveller' ); function traveller() { register_post_type( 'traveller', array( 'labels' => ...
0
votes
0answers
255 views

Add a title to ACF form from frontend

I'm using ACF to make custom posts from the frontend. I created a page in my theme, with the code: // generate post title on submit function auto_title_insert( $value ) { $value = ...
0
votes
2answers
40 views

Custom permalink structure for remote content pages

I'm trying to create a WordPress site that integrates with a very specific CRM in a remote server. The CRM holds a number of entries that should be displayed on the site, but if possible I'd like to ...
0
votes
0answers
17 views

Separate page template with menu

I'm having an annoying issue and am struggling due to being new to WordPress. I needed a page template which was full width, would display the site's menu, and would allow for the input from the "page ...
0
votes
0answers
30 views

What is the best way to create very custom campaign pages?

Currently I am working with company that has very specific campaigns and each one should have its own very custom presentation page. Since its very different from usual WordPress theme design ...
0
votes
1answer
38 views

Templates list in “Page Attributes” metabox is inaccurate

This may be a simple fix but I've spent a few hours trying to resolve it already. Template names that no longer exist are listed on the Page Attributes templates lists in the Wordpress Admin under ...
0
votes
1answer
86 views

Pagination is not working on custom query inside a custom home page template

I know this is a duplicate question. But to comment on existing question, I dont have enough points. So here we go.... Pagination is not working on custom query inside a custom home page template. ...
0
votes
1answer
59 views

Execute php in pages

I need to execute my personal php code in wordpress to print data from a mysql database. I've to execute it only on pages. My idea is to create a file page-pagename.php, copy the body of the page.php ...
1
vote
2answers
73 views

Loading page content into a variable in template

On one of my custom templates, I need to do some work with the content before displaying it. Is there a way that I can load this content into a variable rather than just outputting it to the page? ...
0
votes
0answers
34 views

Page Templates Used in Custom Post Type

The same question was asked here with no real response. They claim it's not possible but I have used plugins that accomplish this. In WordPress I am having a problem figuring out how to use the ...