Tagged Questions

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
1answer
34 views

create template for one page

I want to create a one page template here and this is the content of page-contactWohnsinn.php: hello world So the php file only contains hello world and is stored in ...wp-content/themes/mytheme I ...
0
votes
2answers
387 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
461 views

Filtering posts by category name based on page's slug

I've created a page template and the goal is to create a loop that gets all posts by category name. The category name is passed from the slug of the page name. I haven't been able to get this to work ...
0
votes
1answer
30 views

Setting a new default template for the creation of a page

Right off the bat I would like to say that I am a WordPress noobie, so I'm really sorry if I infuriate you. I've recently taken over the management of a clients website an have been sent a request to ...
0
votes
1answer
209 views

get_template_part() to render single page Theme

I´m developing a single page theme and want to render all pages with their respective templates on a single page. I know I could make a query and write the markup for the respective page, but I prefer ...
-1
votes
1answer
41 views

How do I create a page template that doesn't show URL, sidebar, nav menu, footer?

How do I create a page template that doesn't show URL, sidebar, nav menu, footer? In Rupununi.org if you click on "Atta Rainforest Lodge" image, it will bring out a lightbox which displays the page ...
0
votes
0answers
65 views

Is including the loop necessary for page.php?

QUESTION: Is it necessary to include the wordpress loop in page.php? If it is not necessary, why do many themes (including the wordpress 2013 default theme) include it? I noticed this discussion on ...
0
votes
1answer
45 views

retrieving page content per AJAX [duplicate]

I am currently working on a single page website. I am trying to retrieve the page content via AJAX. The page URL is http://mylocalserver/sad/wp/clients. $.get( ...
1
vote
2answers
32 views

General advice on addressing content-centric pages

I'm looking to port a site into Wordpress that contains not just an About page, but an entire About section with various pages highlighting particular details about the company. Each of these pages ...
0
votes
0answers
58 views

Wordpress Programmatically create subpages when a certain page template is used

I've been fiddling for quite some time now but can't seem to figure this out. What I am looking for is this: One creates a page and set it to use a certain page template, say: "Shop Owner" WP ...
0
votes
1answer
443 views

get comments by current user inside page template

I want to add a page template inside my custom post type and retrieve inside that page the comments posted by current user. I have this code for getting the current user: <!-- GET CURRENT USER ...
0
votes
1answer
108 views

Removing or Restricting Access to Page Templates for Editor Role

I have a question about restricting access to page templates for blog editors who may create new pages in the future. During my buildout, I had to create specific templates to add custom features for ...
0
votes
0answers
12 views

How do I automagically use <!--nextpage--> in custom page template? [duplicate]

I have searched a lot now and not found a real solution that helps me with this: I am creating a custom page template for an archive page. This (static) page will show all my blog posts ordered by ...
0
votes
1answer
166 views

Get content from other database table based on an ID and rewrite URL

I am currently using WordPress with SEO friendly permalinks. One page of my website is a special one though, let's call it http://example.org/locales. It is using a custom page template that loads ...
0
votes
1answer
165 views

Mixing Custom Post Types and Page Templates in Wordpress 3.7.1

Overview I have a Custom Post Type called Locations. When the user visits /locations, I would like them to see some general information about all the locations. When the user visits ...
0
votes
2answers
63 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
52 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 ...
1
vote
1answer
162 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
66 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
223 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
29 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
570 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
209 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
1answer
55 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
98 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
366 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
300 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
43 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
259 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
93 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
137 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
168 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
399 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
457 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
332 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 ...
1
vote
1answer
415 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
115 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
444 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
428 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
135 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
451 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
562 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 ...