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
2answers
61 views

Create custom template in plugin and display it into post template section?

Right now i am developing a plugin for one of my client according to their need. But I want the plugin hold all the functionality itself including the custom template. I mean my plugin holds the ...
0
votes
1answer
49 views

How can I put a custom field as the link of a button shortcode?

I have been working on a custom page template, and cannot seem to figure out how to have a custom field for URL's as the link for a button in the loop. Here is my code <?php echo ...
0
votes
1answer
33 views

Display articles related to a custom field on a page

I have a little problem to display some articles related to a parent page. I explain. On the first hand I have a page with a model template. On the wordpress editor part, I create a custom meta field ...
0
votes
1answer
146 views

how to show single post in a custom template

hi i used the below code to list out the posts in a particular category. <div class="wrapred"> <?php if ( have_posts() ) : ?> ...
0
votes
1answer
60 views

How to check if a specific page uses a page template?

I'm trying to get a page which uses a specific template. I have the page_id. Here is my code : $pids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_author ...
0
votes
1answer
211 views

Custom Archive with Content for Custom Post Type

I'm doing a corporate site migration into Wordpress, and need an extremely custom archive page for a custom post type. I know all about the archive-{post type}.php thing, but it needs to be more ...
0
votes
1answer
28 views

how bbPress and buddypress add their own page templates to the page template drop down on the page editing screen

Im writing a plugin and need to know how to add a page template in the edit page screen from within a plugin. bbPress and Buddypress both add page templates to this drop down and I can't figure out ...
3
votes
2answers
553 views

Full width layout for custom post type pages

I'm trying to remove a widget area called 'Primary' from a certain page on a site. This is the function where I manage the sidebars: //ADD CATEGORIES IN SIDEBAR OF SINGLE POST TYPE add_action( ...
0
votes
2answers
199 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
0answers
17 views

Pagination custom category page template [duplicate]

I want to display product categories on separated pages. Should be 6 posts of 1 category on a page, and if we have more than 6 postings in this category, - so I want to display a pagination. I googled ...
0
votes
0answers
27 views

create page for listing custom post type comments

I have a custom post type and I want to create a page which will automatically list all the comments posted under my single-{my-post-type}.php. What is the best practice for creating something like ? ...
0
votes
1answer
53 views

Edit different parts of a page seperately

I'm an experienced PHP developer without a lot of wordpress knowledge (yet!). I have to put together a fairly simple Wordpress page in the next few days. To get started I need to create a custom home ...
1
vote
2answers
93 views

How do I display the text inside the WP editor for a page with a custom template?

I am working in a Child theme on a page with a custom template. That custom template is not displaying any text that I enter into the wordpress editor. How do I "call" that text and display it in my ...
-1
votes
1answer
352 views

How to create a page template using custom plugin

I am building a plugin. I just want to create page template whenever i install plugin. Page template like full-width template. I have used codes after searching but not able to get success. So please ...
0
votes
2answers
285 views

pagenavi shows alot of pages calculated from all posts in the site with query_posts

I need to excute posts from 2 seprated keywords using s=keyword with get_posts, but only searching in titles. I found this answer. I created a custom template to use it in single page. Then I used a ...
0
votes
1answer
42 views

Modifying and Displaying URL's in a Post Template using parse_url

I have a Custom Post Type with a template named single-posttype.php. I'm using the Advanced Custom Fields plugin to display certain information (price and links to the actual product). All that is ...
0
votes
1answer
62 views

Display Custom Taxonomy of custom post type

I am stuck on trying to create a template page that displays a list of the names in a specific custom taxonomy of a custom post type I created. The custom taxonomy is locations and clicking on a ...
0
votes
1answer
234 views

Problem: ( kriesi ) pagination doesn't work in homepage [duplicate]

When I set this template as homepage, pagination doesn't work. I see the buttons, but when I click the button for page 2, nothing happens, doesn't go on page 2, it still remain in page 1. What is ...
1
vote
1answer
84 views

Get_template_part inside a folder

So I've the following code in order to search for templates inside a custom theme I'm working on: <?php $my_theme = wp_get_theme(); get_template_part( 'masthead', $my_theme->Template); ?> ...
0
votes
1answer
126 views

Custom Page Template Category loop not functioning correctly

So after several attempts to correct this - It seems the pages not load but don't pull in the correct posts from each category. It just seems to pull in the same default posts whenever I click each ...
0
votes
1answer
41 views

How to Featured content with images in home page?

Today i saw a WordPress blog which is using Featured Articles in its home page. can any one tell me how to add that code manually to my blog only in home page. Here is the screen shot and blog url ...
0
votes
2answers
157 views

Create Template for Custom Post Type same like for Page

I'm making my first custom theme using custom post types and I've encountered one problem. I'd like to make some templates like you can make for Pages (i.e. page-fullwidth.php page-noslider.php etc.) ...
0
votes
1answer
39 views

Show content based on page number

I have a post that I would like to split in to 5 pages and depending on which page the user is on the image at the top of the page needs to change. So page 1 of the Post displays the image in custom ...
0
votes
1answer
362 views

How to use a dedicated template for the Custom Post Type from a plugin?

I'm working through this tutorial on Custom Post Types (in a plugin) wherein the author demonstrates how to force the use of a dedicated template for the Custom Post Type. The author states thus: ...
0
votes
2answers
423 views

Page Template Dropdown For Custom Post Types

I am using the following code to create a dropdown on the edit post screen which will allow users to choose page templates for the post type. The code is working but when I try using it multiple times ...
0
votes
3answers
292 views

Only show content if current page is NOT one of 2 page templates [closed]

I've been using this if conditional statement to only show content if the current page is NOT using a certain page template; if (! is_page_template('template-custom.php')) { <!-- show some ...
0
votes
1answer
86 views

Using custom templates for post_is_in_descendant_category

I'm using this function on functions.php and the goal is to call a specific template for any post inside a main category but this isn't working when I need to call a generic template for any other ...
1
vote
1answer
385 views

Define page template in wp_insert_post

How can I set which page template this page, created using wp_insert_post, uses? I want it to use template-blog.php This is my current function; add_action( 'admin_init', 'mytheme_admin_init' ); ...
0
votes
1answer
114 views

change top banner content on specific page

I have a static top banner on my website build like this : <div class="row-fluid top-banner"> <div class="container"> <div class="banner-overlay"></div> ...
0
votes
4answers
390 views

how to move <img> from content and place them elsewhere on a page template?

An existing website have many images placed within the content of pages. I'd like to redesign the template, separating the display of text and images. How could i do that?
0
votes
0answers
25 views

How do you create a default template?

I have several custom templates. When I create a new page, custom templates (Thesis Skin Custom Template) shows "No Custom Template". There are several to choose from in the drop down. The problem ...
0
votes
2answers
403 views

Load page template with custom content using a plugin

I want to load the page.php template with the content I specify (using variables and not from the database) if the request contains a particular query string. So lets say a user requests ...
0
votes
1answer
133 views

Custom Post Type Template Insert not working properply

I am trying to insert Custom Template file through the plugin that handle a custom post type. Rest of the plugin working great except the template including part. class ClassName{ public ...
0
votes
1answer
433 views

Multiple single templates?

Lets say i have a custom post type called 'event' that has several custom meta boxes for images, docs, etc.. Would it be possible to have two different single templates? For example: i have a page ...
0
votes
1answer
38 views

Adding pages to the Admin panel

Instead of going to Pages on the Admin panel nav bar on the left to see all the pages that are created. I would Like the pages to show up on the Admin panel nav bar it self. Like a custom post type. ...
0
votes
1answer
18 views

Cannot display default template after switching to custom

I'm having a strange issue with a page. The site has a Default Template (page.php) and several custom templates. A page was created using a custom template (page-services.php), but then later switched ...
0
votes
2answers
518 views

index.php template is used instead of blog page

I am trying to set WordPress so that home page is static, and the blog page is a separate page. So, I created two page templates in my theme., lets call them home_template and blog_template. Then, I ...
0
votes
1answer
121 views

JQuery multiple toggle values

I'm trying to hide/show metaboxes dependant on the page template chosen. This has been working fine until I have come to show a metabox on more than one chosen page template. The below code displays ...
0
votes
1answer
23 views

How can recognize post's category?

I want my plugin to recognize post's categories before post is loaded. i wrote this code but it works in category page not in post's page with the category is specified from me. function checkUser() ...
0
votes
2answers
880 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
416 views

Custom taxonomy subcategories template page

I want to create template page on which i could list and display all child categories of my custom category parent! That's the first level, and when those child categories are displayed i would like ...
0
votes
1answer
520 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
412 views

excerpt not showing up

I have a custom template for homepage and in it, i want to display excerpt from some category. but not even the simple the_excerpt() isn't working. i tried the_title and the_content, but only title ...
0
votes
1answer
3k views

How to add “Template” option in page attributes panel?

I am new in WordPress. In my theme, I do not have "Template" option in 'Page Attributes panel'. I want to add this option. I tried to solve this problem from the following post. But It did not work ...
0
votes
2answers
49 views

Stuck with conflicting loops on page template

I'm really new to WordPress and having a problem with my page template and a sidebar loop. I made a block that displays posts in a category in the sidebar, it also displays a custom field below the ...
0
votes
1answer
61 views

How to remove/replace current page template?

I am writing a plug-in that creates new front/home page from scratch. Below code works nice and it outputs the text before the themes outputs anything. So the question is how can I remove the theme ...
0
votes
1answer
283 views

How to set custom cookies in Wordpress after a form is filled on a page

I have built a custom template for page in Wordpress: page-xyz.php This page has a some content. I want to check cookie. What I want to do is: If cookie is set: //show page content else //don't ...
0
votes
1answer
750 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
0answers
89 views

A simple form submission but notice : Trying to get property of non-object

after 3 hours... I give up and I request the wordpress developers community. I have to create a contest on a site based on Wordpress. There are 3 steps : user enters his information if all the ...
0
votes
1answer
36 views

Remove comment section from new page

I am taking over a wordpress website at work. All of the pages currently do not have a 'Leave a Reply' comment section. When I make a new page, this section exists on the new page. How do I remove it? ...