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

Trying to have a different template for 2nd page of index. - can't get old solution to work? [closed]

I am trying to achieve the same goal as this guy... but i am having problems with the solution. I have my main index and say soon as they click next to view older posts i'd like to use a completely ...
1
vote
2answers
143 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
132 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 ...
1
vote
1answer
120 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' ...
0
votes
1answer
50 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
0answers
64 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
65 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
65 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
1answer
63 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
140 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
82 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. ...
0
votes
1answer
34 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
1answer
399 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 ...
1
vote
2answers
63 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
55 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 ...
1
vote
2answers
215 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
21 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
77 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 ...
1
vote
1answer
327 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 ...
3
votes
2answers
234 views

Get page IDs based on which template they are using?

I have a situation where I need to provide a dropdown of pages in a widget, based on whether they are using a specific template. In other words, for all pages using template 'Foo', get the post ID. ...
0
votes
1answer
120 views

Get page by template?

I'm in a complicated situation. I'll try to explain it as easy as possible. Imagine the following pages: Page 1 Page 2 Subpage 1 Subpage 2 Subpage 3 Each subpage of page 2 lists posts from a ...
0
votes
1answer
106 views

Can index.php take over for front-page.php in template hierarchy on second page?

I'm confused by the template hierarchy in WordPress. I have front-page.php in a theme I'm developing. It looks great and it works, but then when a user clicks 'Older Posts', it just shows the same ...
1
vote
2answers
142 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
1answer
105 views

How to format shortcode's HTML in external file

I need to add a shortcode in my theme and I would like to put the HTML code not in the function which creates the shortcode but in a template file in my theme directory. Now I have function ...
1
vote
1answer
136 views

Why is custom template not seen as page with is_page()?

I created a couple of templates for a project, which is in fact a child theme of the Contrast theme. In the Wordpress CMS, I can select the templates I created: http://i.imgur.com/PYKqK.png (Can't ...
1
vote
1answer
149 views

do_shortcode() doesn't work if shortcode contained in variable, works if shortcode passed as string

I'm developing a plugin, wherein one of the features is to switch out forms on a specific page by changing the shortcode within a custom field. within my plugin file: function getShort() { ...
0
votes
1answer
101 views

Specify template file for custom post type outside the theme [duplicate]

Possible Duplicate: Custom Taxonomy in plugin and template I want to specify a template file for a custom post type in a plugin folder. Commonly, WP would call automatically the ...
2
votes
3answers
306 views

How to display only an excerpt of the content with custom post types?

<?php /* Template Name: second */ ?> <?php get_header(); ?> <?php query_posts(array('post_type'=>'event')); ?> <?php if(have_posts()) while(have_posts()) : the_post(); ...
3
votes
3answers
332 views

Setting a custom sub-path for blog without using pages?

Warning: fairly pedantic request ahead. I have a design that makes use of posts (I.e., the blog) and a custom post type called "howto". The site front page ("/") has a template that displays the ...
2
votes
2answers
117 views

How do I make a wordpress plugin with menu item etc

I've been reading documents, viewing videos, etc. on how to create a Wordpress plugin. I've learned how to filter a post, add txt to a post, use conditionals to see if the page is a single post as not ...
0
votes
1answer
826 views

Two exact templates, sidebar showing in one but not the other

I'm using the Roots WP Theme and for some reason when copy pasting the page-custom.php to create a home page template. The new homepage template is showing the sidebar but not the original page-custom ...
0
votes
1answer
592 views

Add a Second Menu to a theme that only support 1 menu

I am no programmer but I can usually work stuff like this out when I read the code. I have a theme called Infinity which only supports 1 menu. I know how to do CSS etc but I can't find how I would a ...
0
votes
1answer
34 views

Highlight comments made by registered users of the site

How can I highlight comments that have been made by registered users of my blog?
0
votes
1answer
23 views

How can I setup custom templates for a meta-data query

I have a post-meta field for Neighborhood. I want to setup a url like: url.com/neighborhood/NEIGHBORHOOD-NAME I know this would typically be handled by a CPT or custom taxonomy but it has to be done ...
0
votes
1answer
94 views

Any way to insert text on page from a query results?

I'm using Woocommerce and its atributes (custom taxonomies). I have some pages which I query this way: http://example.com/?tax1=term1&tax2=term2 This query gives me the posts from taxonomy 1 ...
0
votes
1answer
217 views

Help Understanding Template Hierarchy

I must be thick, but I could use some help grasping the way template files are chosen to be used. I noticed loop.php is no longer around, and looking at the file structure for twentytwelve there is ...
0
votes
1answer
59 views

How can I include custom category and tag base in template files?

How can I include custom category and tag base names in the category and tag template files? Specifically, I'd like to include in the page title of category and tag pages the custom category and tag ...
1
vote
4answers
418 views

How only display all post related to category

I'm trying to make a custom template for my category pages that only pulls in post under a specific category. At the moment, I am only able to pull in all post and not category specific... My code so ...
0
votes
1answer
126 views

trouble calling different header.php for home.php

I'm making a site that uses the same header.php for all pages except the blog/home.php. For this, I've created blog-header.php and am attempting to call it using the following: <?php if( ...
2
votes
1answer
66 views

How to get full content including template HTML

I'm looking to get the page content between the header and footer (as Wordpress already does) that includes the template HTML (as this is going to be an AJAX request). Is there a function that will ...
0
votes
1answer
35 views

Is there any way to write custom HTML is some .php file and then call it wherever necessary?

I'm an absolute newbie as far as wordpress and php are concerned.So I wanna write some custom HTML and re use it again and again just like 'headers' and 'footers'.I have googled a lot but haven't find ...
0
votes
1answer
66 views

Extending body classes in front- and backend

I want to extend both body classes for the front-end as well as for the admin area. I have seen some snippets floating around, which led me to the following ...
1
vote
2answers
93 views

Is there a way of putting the facebook social plugins into page template php files?

I was wondering if there was any way of putting the features that come with the "Facebook" wordpress plugin, such as comments, recommend and subscribe, on my front page which I created using a ...
0
votes
2answers
248 views

loop not displaying posts on custom template page

I have a site using a static homepage, and a posts page called Press(press.php). The template is being pulled up correctly, however no posts are shown. Any ideas why? Thanks in advance. Live site. ...
0
votes
2answers
64 views

posts not showing on index.php

Live site. I've got a custom theme, wherein the homepage(front-page.php) is static and the "posts" page is Press(index.php). Everything with the theme works great, with the exception of the posts not ...
0
votes
2answers
791 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 ...
1
vote
1answer
63 views

Output menu navigation in php file

I have a WordPress site which generates a menu at the top of the page with this: <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?> This ...
0
votes
3answers
166 views

Dynamic Sidebars based on page name

I would like to do a dynamic sidebar for my WordPress site, so it would pull in the correct Sidebar template based on the page title of the page. So if I had 10 sidebars all named like this: Sidebar ...
0
votes
2answers
29 views

Which template.php for /blog

Hi I have a particular installation of WordPress, and I would like to know what is the name of the .php file to access to the blog. So to sum up : I have a navigation like that : HOME / PORTFOLIO / ...
1
vote
1answer
163 views

Check if password protected post is visible

Is there anyway of checking if a password protected post is visible / not visible? I want some thing that says this; If the post is password protected (that parts fine) and the correct password ...

1 2 3 4 5 12