Within the context of WordPress Theme-ing, the term 'template' refers to PHP files used to display content.

learn more… | top users | synonyms (1)

0
votes
2answers
1k views

How to Create Template File for Parent Page of Custom Post Type

After creating a custom post type I made a custom template file for the post (single-customposttypename.php). So the URL structure would be: example.com/page/postname, and postname would be the post ...
1
vote
1answer
1k views

Add custom fields when specific templates are selected

I'm trying to make change to a site where with the current infrastructure isn't great as due to how it's been built over the previous site rather then fresh. I have a section of the site which needs ...
0
votes
1answer
70 views

Template file renders on local install, not on web

I've been building a website that involves a child theme of Twenty Twelve and a custom post type with associated custom taxonomy, "area". I've built a template file (cribbed from code found elsewhere) ...
0
votes
1answer
2k views

How is WooCommerce cart.php template supposed to be used?

I have a fresh install of Wordpress 3.5 and WooCommerce 1.6.6 (WC from now on) and use the default Twenty Twelve theme. I added a Product to WC and when viewing that product and using the Debug Bar ...
0
votes
2answers
70 views

How to create a template for Pages?

In Wordpress, when creating a page, it shows some options for Template under Attributes, such as: Default, Links, One column no sidebar, etc. Is there a way to add more custom templates to show up ...
-1
votes
3answers
426 views

Different header for each category

I'm working on a project where each category should have a custom header page. Any suggestions? I'm just looking for some direction on how to accomplish this.
0
votes
1answer
181 views

Require custom post type if is_admin() - template doesn't show up?

In my functions.php I require PHP files which register custom post types, if I'm logged in as an admin. if (is_admin()) require_once(TEMPLATEPATH . '/custom-post-types/cpt.php'); This works ...
1
vote
2answers
211 views

Retrieve the template directory URI via global or get_template_directory_uri() every time?

One Wordpress function I happen to use frequently is get_template_directory_uri(). While I tried to minimize or avoid its use where I can, I still happen to have more than one call to this function in ...
1
vote
2answers
40 views

Remove Items from Template Homepage

I've never used Wordpress but am considering it for a responsive church website. BEFORE I purchase space froom a webhost here's my question preceded by a scenario I want: Scenario: I want my landing ...
0
votes
1answer
62 views

How do I get a single page navigation depending on the previous page?

I figured this would be a fairly comon thing. But I can't seem to find out how to do it. Or I'm just not using the correct search terms. I've got a website with a hompage that lists all my posts, and ...
0
votes
2answers
465 views

How do I stop the loop from repeating in my category template?

For some reason, when viewing a category, the posts are repeated - basically the whole loop repeats as many times as there are posts for that category. E.G.: If category_a has 3 posts, the page will ...
-1
votes
2answers
276 views

How customizable is a self-hosted WordPress blog compared to a Blogger blog?

I currently have a Blogspot blog and I'm thinking of making the leap to a self-hosted WordPress one instead. Everything I've seems to suggest this is the best way to go for the best possible ...
2
votes
2answers
92 views

Categories Template Assistance

I have found a tutorial online for creating a custom categories template for my archived posts within a particular category. This however is targetting a specific category ID (see below), is there ...
0
votes
2answers
470 views

Remove navigation from header in custom page template

I'm building a landing page and want to remove the navigation menu from the page. The navigation menu is in header.php which is of course in the page template. Is there a WordPress function I can use ...
0
votes
1answer
413 views

Guest author's post not display in author template

I am using this filter to display guest author on post, but i want guest author's posts to appear in the author.php template also. This is my guest author code (inside functions.php). <?php ...
0
votes
1answer
669 views

How to modify/ customise NextGen Gallery's templates?

I would like to customise the "Image browser" template in particular. I'm trying to make clicking on an image redirects to the next image in a gallery, just like how Facebook image browser works. ...
0
votes
1answer
274 views

How to change post template

I have a post featuring a product that I've created using advanced custom fields. I would like to have a link on the post that opens in a new window and displays the same product, just with a ...
0
votes
3answers
258 views

wordpress - modifying template to show more posts

i'm getting myself pretty confused. i'm trying to modify a template to show more than one post from the loop. here is the code from the template <?php $wp_query = new ...
4
votes
3answers
436 views

How to control output of custom post type without modifying theme?

I have a custom post type 'properties' that I'd like to control the HTML output for. For simplicity, let's focus on the archive view. As a basic example, here is what a loop looks like in an ...
2
votes
1answer
128 views

Create second custom 404 page for selected post type

I created a new custom post type called event, which works fine. I also created a custom 404 page template, which is shown if a event/page/post is not found. But now the hard part, i want to create ...
1
vote
2answers
1k views

Using a different template per Custom Taxonomies for single term archive pages

I have 2 custom taxonomies, each with a number of terms: tax1 term1_1 term1_2 tax2 term2_1 term2_2 term2_3 I am trying to have each taxonomy usea different template file for each its ...
0
votes
1answer
1k views

How to Display an Image Uploaded through a Meta Box in a Template?

I am just learning to create a meta box to upload a file in wp-content/uploads folder through this code: //display image meta box function display_image_box() { global $post; wp_nonce_field( ...
0
votes
1answer
23 views

How do I add a new template to my site

I am in the template editor for my WP site, and I want to upload a new file, but I can't find that option anywhere. I want to make a new php file for a custom portion of the site. Where can I find ...
-1
votes
1answer
109 views

if and else statement not working on the iframe php page

i want to use if and else statement on iframe but it's not working if and else statement not working on the iframe php page <?php if("p=947"){ ?> <iframe width="820px" height="1200px" ...
0
votes
3answers
2k views

Recommend an open source, template driven website builder UI that produces a working WordPress site [closed]

I'm a programmer at a domain registrar and web hosting company. In the past year or so we have branched into custom web design for individuals and small businesses. Currently all our solutions are ...
0
votes
1answer
959 views

Translate custom template with WPML

I have custom template that is used by ClassiPress and it is working fine on default language, but when I enter the page language selector won't work since it's not translated. How can I translate ...
1
vote
2answers
964 views

A shared custom taxonomy between two custom post types

I have two custom post types: event and contact: http://acicafoc.josoroma.com/contactenos http://acicafoc.josoroma.com/eventos Both of them uses a custom taxonomy: country I just created a ...
1
vote
1answer
567 views

Query post for 'selected category' in archive.php

I'm trying to figure out how to display a 'featured post' on a selected category archive. My website uses the category-based navigation for different types of posts (text only post-blog, and image ...
1
vote
2answers
299 views

wordpress 3.4 template files in subdirectories

i've been organizing my sites template files into a sub directory, which is now possible with wordpress 3.4. but when i move a custom post-type single file (ie. single-news.php) into the sub ...
1
vote
2answers
346 views

Multiple templates for a custom post type

As new user to wordpress I'm finding that the preset templates structure a little restricting coming from the flexibility of other template routed CMS I've worked with. Saying this, I know there are ...
-2
votes
2answers
329 views

Page.php vs Single.php

I have a page.php and single.php template that are 100% identical. Yet, when I render page.php the div don't get nested in the same way as single.php and the layout gets broken. I've even diff'd the ...
0
votes
1answer
68 views

Choose template depending on URL

I have the following basic page setup: xxx.net/ -> static homepage xxx.net/blog/ -> blog page with loop showing all posts xxx.net/gallery/ -> gallery page with loop only showing posts that are ...
1
vote
1answer
184 views

How to dynamically save a selected option from page “Templates” selectbox?

When I select a template for a page from the "Templates" selectbox, the selected item gets “value=selected” only after I hit save draft/publish/update. <option value='template-gallery.php' ...
1
vote
0answers
98 views

WordPress Not Using Template Files After Permalink Update

I have a really weird issue that just occurred on a client site. I updated the permalink structure from /%category%/%postname%/ to /%postname%/ and suddenly my pages don't respect templates and are ...
0
votes
1answer
161 views

List Category Posts plugin - underline links

I want to underline links in the default template for the List Category Posts plugin. I can't find where to do this in the template & styles. Any assistance would be gratefully accepted.
0
votes
2answers
3k views

Custom reset password template after forgot password request

I've made a custom login template where you can login or request a link that sends you to the reset password form. What I need to do is make that unique link redirect to a custom reset password ...
0
votes
1answer
106 views

Is there a better way to pull in custom content without querying posts?

I have a custom page template that pulls in media files via advanced custom fields, as well as query posts. Now, the client wants there to be three sections by default... each one populating with the ...
0
votes
2answers
128 views

Using locate-template & shortcodes doesn't appear to work

For organisation, I'm trying to split up the functions.php file into separate files. In particular the functions for shortcodes in a separate file, with the shortcodes being defined in functions.php. ...
0
votes
2answers
742 views

Single post as homepage?

I'm wanting to set a single post as my homepage. I have a photographer's site. There are a few galleries (weddings, portraits etc). Each gallery is a wordpress post with attached images. The post ...
0
votes
1answer
92 views

How do i create a list-posts-page?

I'm trying to create the actual "blog" page that lists all the posts. It seems like such a basic thing, but i can't find out how to do it. Do i create a page and assign it a special template? If i do ...
1
vote
3answers
364 views

how to create template path for external (include) .js file

from my header file i can create template path easily for any .js file: <?php $templateDirPath = get_bloginfo( 'template_directory' ) . '/'; ?> <script type="text/javascript" ...
0
votes
1answer
227 views

Blog page won't show Blog template

I set my "Blog" page to a Blog template I created in Pages (in the dashboard). Also, in Settings > Reading, I set my Home page (home template) as my Front page and my Blog page as my Posts page. ...
1
vote
1answer
646 views

roots child theme can't override header.php

I made a child theme for roots and it worked as expected. I can override everything, including footer.php, but not header.php. My header.php looks exactly like the one from roots at the moment, except ...
0
votes
1answer
59 views

How can I use a file in my plugin as a replacement for single.php on custom-post-type query?

I am creating a Custom Post Type using a custom plugin. One of the requirement of the custom post type is to be presented in a table layout for print / email purpose. It seems that the logical ...
1
vote
2answers
131 views

How to check if searchform.php is being included as widget?

I'd like to put something like this in searchform.php: <?php if($widget){ ?> //load serach form for sidebar... <?php }else{ ?> //load different search form for page content (404 ...
0
votes
2answers
137 views

How do I define a lookup table that will work across all PHP elements of the template?

I'm using a lookup table to define a few things for the qTranslate plugin Table $trans_home = array('en' => 'Home','it' => 'Home','de' => 'Home','zh' => '首页','es' => 'Página de ...
2
votes
1answer
542 views

How to set a fall back template for a custom post type in a plugin?

My custom plugin creates a custom post type, and I want to theme my own "single-my_custom_cpt.php" file. However, I want to store it in my plugin folder, and allow that it be over-written in the ...
2
votes
2answers
677 views

Different templates for parent and children categories/taxonomies

I would like to know what is the best way to create a different template for parent and children categories and/or taxonomies. Example: I have a taxonomy called region, which I want to divide in ...
1
vote
1answer
24 views

Template for slug

I am using the "Edit Author Slug" plugin to provide public profile pages on my site using the following structure: mysite.com/users/username. Now, I want to show a list of all users on ...
0
votes
1answer
97 views

JQuery Issues With Wordpress Theme Interface

I'm having a back-end script issue with a recently installed theme. I took it up with the theme developer, but they are of no help (that's another story for another time). I apologize if this is ...