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
0answers
20 views

Wordpress Page doesn't load the template selected

I've created a new page called Work and I've added it on the navigation bar; after that I've created a file called work.php in which I want to style the page mentioned above. The problem is that the ...
-2
votes
0answers
17 views

Styling Elements [on hold]

I want to create a theme for a standard non-blog website. How best can I create a template-page such that different elements in a page are styled differently. The users of a theme will be able to ...
-2
votes
1answer
47 views

Trouble with conditional tags

I've got some code I want to run on every page other than the blog page and the archive page. If I use <?php if ( !is_home() ) { ?> The code correctly doesn't show on the blog page. If I ...
0
votes
0answers
12 views

category results within page template

to paint a clear picture of what i am trying to achieve, i will describe my current wordpress theme setup: in my theme, i am making use of the following content types: posts, pages and custom content ...
0
votes
1answer
30 views

Cleaner way to define multiple variables for is_page_template()

I need to so some stuff only when specific templates (homepages) are used, I couldn't think of any better solution than this since is_page_template() do not handle arrays: $home_1 = ...
0
votes
0answers
16 views

How custom Wordpress Page Builders work?

I wonder how custom page builders work. I want to create page builder in my theme's control panel. Currently i created simple system which creates Page Templates with generated HTML for each layout ...
0
votes
1answer
25 views

Loading custom page template on a one page website

For a one page website, I have modified the homepage to index all pages instead of posts. For some of the pages I want to create a custom template (like page-slug.php). But, these template only get ...
0
votes
1answer
23 views

Make a page (url) not cacheable [closed]

How to setup a wordpress-page in wordpress as non-cacheable in wordpress? I have made up a form manually for a page(wordpress) and I want to make that page not cacheable by browsers. How can it be ...
0
votes
2answers
27 views

Why in the static pages of my theme are showing these information?

I am working on a WordPress theme and I have some problem with the pages\posts layout. For example if you go here: http://lnx.asper-eritrea.com/lassociazione/ This is a static page that show some ...
0
votes
0answers
37 views

Passing query variables to a custom page template

On my website I have a custom post type called 'theme'. I wanted the homepage to display an archive of themes. For this the only approach that I could think of was to create a page template with a ...
0
votes
2answers
27 views

WordPress fetches the archive page instead of my custom template

I'm using WooCommerce and it created a page called "Shop" which I've attributed to my custom template "Store" through the "page attributes" module in the dashboard. <?php /* Template Name: Store ...
0
votes
0answers
21 views

Include Entire Custom Page Template On Another Page

I am trying to create a "one page slider" where I am creating a custom page template to display multiple pages that I specify. (yes I know there are themes for this- I want to customize it myself) I ...
0
votes
1answer
65 views

How to use different jquery function of idangero swiper dependant on page template?

I have struggled with adding the idangero swiper jquery plugin to my site, but have managed to produce the code below. This works very well but only on the one custom page template defined in the ...
0
votes
0answers
40 views

Conditional tag to check if 'page.php' is being used?

I'm trying to check whether the page.php template is being used or not. I've tried is_page_template( 'page.php' ) but it doesn't work. I also can't use is_page() because I only want to do something ...
1
vote
1answer
26 views

How to Set a Custom Template for Blog Posts

I am trying to set a custom template for my blog posts page using the Template box on the Page Attributes section of the page. However, the template does not get used on the site. Is there a certain ...
0
votes
0answers
27 views

$post->ID not working but the get_the_id() is [duplicate]

I created a custom post type from a Plugin. Then in a function like show_data() I queried the post type along with its post meta data (Custom Fields). Then in Page Template I used the function to show ...
0
votes
0answers
21 views

Template for Custom Post Types nested under normal pages (dtbaker 'wiki' pages)

I got stuck trying to display the custom type using dtbakers code (https://gist.github.com/dtbaker/5311512). I guess Im using the wrong single-custom.php This is the hypothetical url: ...
0
votes
1answer
19 views

Specify parent page template

I don't want to define a template from admin because I have lot of page and so if I change it I might forget my selected template. So I want make that template in page. Here is my page structure ...
0
votes
0answers
19 views

WP Template Hierarchy - Need help choosing the correct templates

Please see this image to get a better understanding of what I would like to achieve. Please pay attention to point #3 and #4 (notice the permalink structure). The "Homepage" is static ...
0
votes
1answer
47 views

Change page template programmatically inside foreach

i have been trying to attach multiple pages, eash to its page-template using a foreach loop... Manually meaning writing each page code works but inside the foreach loop it wont work. I have several ...
0
votes
0answers
20 views

How do I enforce a 404 status for an EXISTING page?

I was able to replace the main query for 404 pages with pre_get_posts but as soon as I point to an existing page, the error changes to 301. What function should I hook to to change the status to 404 ...
0
votes
2answers
61 views

Display custom meta box in my template file

Need help displaying my custom meta boxes on a template file. Following a tutorial Here's the code from my functions.php: function get_custom_field( $value ) { global $post; $custom_field = ...
0
votes
1answer
60 views

Include php on a specific page template

I'm using a 'specialized' page template called 'page-courses.php', following the codex: http://codex.wordpress.org/Page_Templates#Specialized_Page_Template In my child theme's functions.php I want to ...
0
votes
0answers
39 views

Plural/singular URL schema challenge for section Page template combined with single Custom Post Type template

I'm coming back to WordPress after quite a hiatus (and it's not my normal CMS framework), and I'm working with custom post types for the first time. I'd like to have 2 page templates that support ...
0
votes
0answers
31 views

Load new Posts on Scroll on Page

See this reference site: http://alwaysjudging.com/archive/ It's loading new posts on scroll down, similar to Infinte Scroll plugin. (But I'm unable to get the Jetpack Infinite Scroll plugin to work on ...
0
votes
0answers
33 views

Creating a custom page with certain categories and display relevant content

I don't really know how to explain it, but I want to create a page where I can display a certain number of categories on a page and display content on the right side. Something like this Im finding ...
0
votes
1answer
36 views

How to set title from page-template?

We store the data for the user profiles on our site in a mongodb and provide them via a REST API. So i added a page template page-profile.php. In that file we call the REST API and fill the template ...
0
votes
1answer
30 views

Can I make Wordpress use a custom template for a child page

I have a custom post type called communities. Then I have the appropriate single-community.php page. Works great! So we want to use some of these "communities" as parent pages. Then underneath them ...
0
votes
4answers
103 views

Getting page ID inside loop

I have a page template which has a loop to show blog posts. Inside the loop, there is get_template_part('content', 'custom') function to include the template (content-custom.php) which shows blog post ...
0
votes
2answers
93 views

the_content of template page

When I use the_content in the page-template doesn't show anything. Loop to call the page-template in the index: index.php <?php /** * Main template file * * This is the most generic template ...
0
votes
0answers
17 views

Page template for blog not working

So I have a general template called home.php for displaying all blog posts. All fine. No I've wanted to add the same thing with sidebar, so I've copied it, added sidebar, called home-sidebar.php, ...
0
votes
0answers
71 views

How to get/display specific WP page with beloning page template in DIV (fullPage.js)

I've recently been trying out the really neat JavaScript snippet for fullPage-design from Alvaro Trigo. http://www.alvarotrigo.com/fullPage/. I use it togheter with WordPress with the purpuse of ...
0
votes
1answer
194 views

Use created page as search results page and custom template

I want my client to have control over the look of the Search Results page by being able to select one of the templates I have created for them (page-two-column.php or page-three-column.php) so they ...
0
votes
2answers
48 views

post_class not working with css

through the codex I read about how to use the post_class() function to create a css hook for styling the content. Here is the code I have, PHP: <li class="<?php post_class();?>"> ...
1
vote
1answer
39 views

Custom Plugin theme filter

I am creating custom plugin and in my plugin file I have this: add_filter('page_template', 'load_tq_templates'); function load_tq_templates() { if (is_page( 'transport-quote-1' )) { if ( ...
0
votes
0answers
71 views

How to show blog post details on a different page?

I have currently made a template to list my blog posts <?php /*template name: Figures */ get_header(); ?> <?php nectar_page_header($post->ID); ?> <div class="container-wrap"> ...
0
votes
2answers
28 views

How to edit a HTML list in WordPress?

I'm new to WordPress and what I want to do is to edit the HTML of a specific page in WordPress. For example, a page in my website shows in the source code (in Chrome) a list, that I can see in the ...
1
vote
1answer
24 views

How safe is renovating $wp_query when doing WP_Query pagination in Page Template

With a lot of search and trial&error, I's unable to do the pagination in a custom page template. I's not actually tired, but frustrated, why the most common err issue is not explained in a way so ...
0
votes
0answers
49 views

How to divide posts (custom post type) content on multiple pages?

I have a custom post type called artist and each artist have some custom fields such as extra text fields and images. I do not want to display all the info about each artist on the same page ...
0
votes
1answer
137 views

Change wp-signup.php Page Template

I am using anti-splog on a multisite network with the randomly changing signup URL feature. Under the hood, it is pointing to wp-signup.php file. I created an override file the plugin looks for by ...
1
vote
2answers
86 views

Define custom Page Template without its own .php file

Is there any way of defining a Page Template from some function/filter/hook, without having any .php file containing the comment at the top of the page to declare the Template Name? For example, ...
0
votes
1answer
44 views

Ajax Call in page theme not working?

Ok, i am VERY new to wordpress (2 Hours new). I am creating a page template, which works fine, but this is the issue i am having: In the template.php file, i have this code: <script ...
0
votes
1answer
81 views

Custom Filter using meta_value in wordpress admin list not working

Hello I was trying to filter the pages using a custom filter in admin post listing of wordpress, but after selecting in the dropdown it returns nothing like its just showing all the posts and the ...
0
votes
1answer
44 views

Widgets not showing on sidebars

I have registered two sidebars in my theme using the function below, but none of the widgets shows up in the sidebars even though I can manage them in the dashboard: // register sidebars add_action( ...
0
votes
0answers
25 views

Image X or Image Y Based on Meta-Box Input Value

I have a meta box for a film review test site I'm trying to build. I have 3 fields in my meta box, they are $director, $starring and $rating. I want to take the rating, and put it into a page ...
0
votes
1answer
28 views

I want to duplicate homepage for all my pages

I want to duplicate my homepage then call the pages A. page b & c. - So that I can edit just a few things on all the pages. I already have some pages but I can't get bits exactly the same.I copied ...
0
votes
2answers
29 views

Special 404 header page

I wonder if there is a specific way to create a custom 404 header template. This can be done for secondary page, but creating a header-404.php doesn't do the trick. Am I really supposed to create ...
0
votes
3answers
324 views

How can I conditionally show different home page templates based on whether or not the user is logged in?

How can I conditionally load HTML for the home page based on whether or not the user is logged in? Currently my theme has an index.php file. In that file I tried to create: <?php ...
0
votes
1answer
223 views

How to create Page templates for showing Blog posts in different layouts?

I'm creating a Wordpress Theme, and I want to create few Page Templates for creating Blog pages with different layouts. So for example, I want to have blog-4-column.php, blog-3column.php and ...
0
votes
1answer
35 views

loop not showing up when using a custom page template

Okay So I want to create a Custom Page Template that displays my posts exactly the same as my index.php does. You can see the code of my index.php at the bottom. So I create a .php file named ...