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

1
vote
1answer
34 views

Is there a way to set different post templates for parent posts and child posts in the same post type?

After taking a look through the questions suggested to possibly have my answer, I still can not seem to find something that I references the post-template php files. I have two custom post types that ...
-2
votes
2answers
31 views

My homepage's width has reduced and I can´t fix it [on hold]

I am creating a site for a friend of mine and I'm having trouble with the width of my homepage. The homepage is set as a full width page but when you view it it only displays about 60% of the span. ...
0
votes
0answers
19 views

how to add a html page to wordpress using custom page template?

I have created a web page using twitter bootstrap and some javascript functions. Now I have a requirement to add this to WordPress site using custom page templates. But the problem is I don't have ...
0
votes
1answer
18 views

custom page or standalone page?

I'm new to WordPress. I have a requirement to implement a live calculator(results updated as you type) in a WordPress site. The site has a simple theme. What is the best way to implement this? ...
0
votes
3answers
40 views

Displaying posts on homepage - Template Page

I created two template pages: galerie.php and homepage.php. Galerie already displays posts. So Homepage is homepage.php and posts page is galerie.php. Now the problem is that I wanted to display a ...
-1
votes
0answers
32 views

Categories, Sub-categories and single posts

not sure what to do here. I have a client who has a downloads page, on that page they have a list of post categories (manuals, brochures etc.) which are links to their own pages using their own page ...
-1
votes
3answers
21 views

Show page name in browser

I am developing my first WP theme and would like to know how to display page name for every page/post instead of just "mysiteaddress.com" How can I set that all my posts and pages show the tittle by ...
-1
votes
0answers
13 views

How to get registered field values attached to a certain page_template?

I am using this to get all pages with a certain page template $pages = get_pages(array( 'meta_key' => '_wp_page_template', 'meta_value' => 'template_aboutMembers.php' )); echo ...
0
votes
0answers
15 views

My custom template is displaying 2 Home pages

I'm developing my wordpress theme and I have a problem. I have my homepage.php and galerie.php (custom page templates), the problem is that I want the posts to go to the galerie.php page and not to ...
0
votes
1answer
20 views

Custom Post Type & Page Template

I have a custom post type : add_action('init', 'dossierinfo_register'); function dossierinfo_register() { register_post_type( 'dossier' , array( 'label' => __('Dossiers'), ...
0
votes
1answer
24 views

JQuery Plugins in Wordpress

I have been able to somewhat piece together how this should be done but I am really struggling with it. I want to use the Table Sorter plugin (http://tablesorter.com) in a custom Page Template to ...
0
votes
1answer
29 views

I want to rel=nofollow wordpress images

I have a default theme. When i add media to wordpress site. By default it use simple "a href" tag I want to add attribute "rel=nofollow" to it. Can anybody please point me in right direction?.
0
votes
2answers
20 views

Posts don't appear on Template Page

I made a Template page galerie.php and I wanted to show posts there. Why isn't this working? It seems that posts only appear at home page for some reason. The code is: <?php while(have_posts()) ...
0
votes
0answers
20 views

Different content in different pages

I'm developing my second wordpress theme and I guess the following question is really basic but I couldn't find an answer. I have different pages with the same header and the same footer. What ...
0
votes
1answer
20 views

Query custom post type and showing its content

I am a newbie in developing wp themes and having troubles showing my cpt. I added new cpt in my functions.php file: // Creates Testimonials Custom Post Type function testimonials_init() { $args ...
0
votes
0answers
18 views

Custom Fields of a custom post within a category list within a page

I need to construct a page containing a list of categories that include a number of posts. Each post has a set of Custom fields that need to be displayed. The hitch: Posts should be selectively ...
0
votes
1answer
32 views

Making images from single.php pointing to an attachment .php template

I am trying to make the inserted images from a post (single.php) to point to (single-attachement.php) an attachment page. So far I checked a post here on stackexchange and added this code on the top, ...
0
votes
1answer
30 views

.htaccess help to a beginner

I have made a custom page template and created a new page which is set to use the custom page template. My URL for the custom page is now: www.domain.no/property The website will have 3 different ...
0
votes
1answer
26 views

Issue On Displaying Pages with Post Name Permalink

I have a simple Theme like below Right now when I navigate to localhost and site root directory I am able to see content from header.php , footer.php and page.php. then, I simply generated some ...
0
votes
0answers
33 views

How to place wp-login.php in page or page template?

I want to place the wp-login.php box or page kind of in the templates of the website. As in I want a page which has all of it in. I did search and found that I can use wp_login_form(). Yes, I've ...
0
votes
1answer
34 views

Customizing Latest Post Pagination

I was able to successfully implement pagination for my "Latest Posts" page. But I want to separate the numbers after the current page and put a separator between them and the last page. Here is my ...
0
votes
1answer
33 views

Enabling permalinks disables custom page template

I have assigned a custom template on a page in wordpress, but it's not working anymore after I enable permalinks. Instead of the custom template, the "post-type-archive-portfolio" template is used. ...
0
votes
0answers
26 views

Using custom fields globally?

I'm trying to use the value of one custom field on multiple pages and posts. I'm a newbie to PHP and custom fields so what I'm trying to accomplish could possible be done using a different method. I ...
0
votes
0answers
29 views

Error Page-Template LOOP

I have this code and I want to create a page under wordpress and apply this code. I save as bcn.php file into Themes folder. I create the page and in Admin menu and apply the bcn template to the page. ...
0
votes
0answers
31 views

Add custom content on a page

I want to add custom content inside my wordpress page. So I am creating 1 page scrolling template using bootstrap. Since I want this to become user friendly. I want to add addition WYSIWYG editor for ...
0
votes
1answer
126 views

Avada Theme - Display results from a specific category [closed]

In the Avada Theme there is a page template called 'FAQ page', this 'FAQ Page' can have categories (faq_category_1) and in these categories there can be unlimited questions with answers. This part of ...
0
votes
0answers
21 views

How to display time when page is created and edited

On posts I use this: Time created <?php the_time('Y-m-d'); ?> Edited (updated) <?php the_modified_time('Y-m-d'); ?> It works fine on posts, but on page template it displays just ...
0
votes
1answer
21 views

Decision about page templates for static pages

I'm developing a WP site where almost all the content is going to be static with the exception of a blog page. Most of the static pages are going to have the same look and feel. I've already set up ...
0
votes
1answer
26 views

Use page.php for front page

For some reason even when I am selecting a static page for my homepage it is still choosing to load the index.php file. I would really appreciate your help on this as I would like it to load my own ...
0
votes
1answer
42 views

get_pages — parent vs child_of?

I'm working with get_pages on a site that has a very clean and hierarchical structure. As part of a template, I wanted to show child pages as part of the template's 'boilerplate'. Reading the Codex ...
0
votes
0answers
26 views

Displaying Custom Post Type on Page with Same Title

I'm building a sports blog. I have a custom post type called conference. Each conference post contains HTML that is displays the team logos horizontally on my team custom posts as shown in the ...
0
votes
1answer
31 views

Why isn't my link attribute getting my css?

<link rel="stylesheet" type="text/css" href="style.css" /> That is the line I am using. The style.css file is in the same directory as the file I am running that from. Tt specifically just ...
0
votes
0answers
27 views

get_file_data to read data for Custom Template File?

I have a plugin in which I'm trying to allow users to create their own variants of the styles, and upload them as custom "templates". Essentially these templates are php files with some HTML in them. ...
0
votes
0answers
19 views

Change page being rendered by custom post

I have a custom post type (Packages) that I want to display a custom page for. The post type is set up like this: public function create_packages_type() { register_post_type('packages', ...
0
votes
0answers
26 views

Separating Custom Template logic

Our site displays athletic race results, and each runner has a specific wordpress user account. We have custom plugin to handle building the html elements. A specific runners page can be seen via this ...
0
votes
2answers
89 views

WP Theme Development, Adding Content Areas to Custom Page Template

I am not sure how to ask this, which is why I have been having trouble finding anything via google searches. I am hoping someone here will understand what I am looking for and be able to direct me to ...
0
votes
0answers
28 views

Single page theme: Can I render other pages with their respective themes within another page?

I'm trying to create a one page theme. I need all the pages created by the admin to show up on one page. I used the following code I found in a similar question in here: foreach ($pages as ...
0
votes
1answer
44 views

latest posts-widget displays all posts on archive page but works great anywhere else

I noticed the latest posts widget in my footer displaying all posts. Anywhere else on my page, it displays only the amount of posts it should. I am using a custom theme and this is my archive.php: ...
0
votes
2answers
60 views

How to create a custom Wordpress front page

I want to create a custom front page for a Wordpress site, which will have an image, some text, an embedded login form, and a metaslider slider, and nothing else (no menu, no sidebar, no footer). ...
0
votes
0answers
29 views

save_post action not firing due to old page_template meta data

I have some functionality hooked to the save_post action that wasn't working for a user on a particular WordPress Page. After some digging I found that wp_insert_post() was returning before getting ...
1
vote
2answers
77 views

Ways to have multiple front-page.php templates that can be swapped out?

I essentially want to create several different front-page.php templates with different loops and layouts and then present an option in the admin panel to select one template on one day and a different ...
3
votes
2answers
46 views

How do I Make a custom post type get a custom post template in a plugin

I am writing a plugin in which I am adding a custom post type(called 'events') using register_post_type. Additionally I want it to use single-event.php instead of the regular single.php. The current ...
1
vote
2answers
52 views

Where can I access my custom page template?

I understand that to create a new page template, all I have to do is create my custom template (in this case, page-custom.php) file, and save it in wp-content/themes/mytheme/. However, where can I ...
0
votes
1answer
37 views

Page templates in subdirectories and auto generator

This might be a shoot in the dark but here goes... I know that starting with wp 3.4 i can put page template aka page-template.php in sub folders. (ref: Page templates in subdirectories) which is ...
0
votes
2answers
24 views

Call a function on every wordpress pages only

I have written a security function.I want to call this function in all pages which are created by wordpress back end only (Does not want want to called by all php files).Is there any hook ...
0
votes
2answers
108 views

Hide Front-End Admin Bar Including 32 px Spacing

I have a custom template and I inserted the following snippet to get rid of the admin bar for the page: function hide_admin_bar(){ return false; } add_filter( 'show_admin_bar', 'hide_admin_bar' ); ...
0
votes
0answers
55 views

How to structure WordPress plugin to display data from API

I am creating a plugin that connects to a remote API that has car listings and displays the data that's returned in that call. The plugin essentially does not need to interact with the WordPress ...
0
votes
0answers
58 views

Is this the best way to complete disable category archive pages?

I wanted to disable category archive pages because content in my blog will be presented via a number of pages for which I have custom templates like this: add_action('page_template', ...
0
votes
1answer
97 views

Function to load correct CSS for Template not working

I have three templates I want to be able to use (Index Page, Main Template, and Default). I was able to add a "if/else" statement into a function to get the correct CSS file to load depending on which ...
0
votes
2answers
89 views

Page Template Won't Load Correct CSS File

I can't get the correct css file to load for my page template. The page is correctly loading the template but still using the default css file. This is the code I'm using to load the page template's ...