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
3answers
149 views

Single page template

I am trying to create a template for a custom page type that will put the same data on every page of this type. The only problem is I see examples of custom page types but only using loops. Do I have ...
0
votes
1answer
128 views

Differnt page template for page 2 of blog feed

Is there a way I can use one page template (A custom page template for example) for the first page of my blog and then another template (Index.php for example) for page 2, 3, 4, etc.?
2
votes
2answers
3k views

When calling wp_title(), do you have to create some kind of “title.php” file?

... or does wp_title() already handle the various contexts in your blog? This could clarify for me how I can achieve a reusable index.php file without having all the conditional statements inside it ...
2
votes
2answers
165 views

Why are theme templates organized as multiple point of entry PHP files instead of reusing your theme's index.php?

I've started to develop my own theme in the past couple weeks (and extracting WP functionality here and there in the past year), and I'm finding the structure of the WP templates awful redundant. ...
0
votes
1answer
486 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
42 views

How can I abstract code out of a template by using functions.php

I'm creating a template, and one of the files is getting overloaded with pig-ugly mixed html and php. At first I thought that maybe I should cut out chunks of the code, and call them using ...
1
vote
2answers
1k views

Category template to show different categories based on parent

Ok so i've got categories like setup like this. Products Category A Sub Category 1 Sub Category 2 Category B Category C What i need is to have the Products category page ...
5
votes
3answers
1k views

Print WordPress template filename(s) for debugging

I've taken over the maintainance of a large WP-MS powered site. The site has ~200 templates, many page specific, and with no standard naming procedure. It would save a lot of time if while surfing ...
0
votes
1answer
231 views

Create a blank test.php

Sometimes it's necessary to figure out CSS errors or whatever and then it's great if you have a minimal test page where you just insert the specific code you want to test. How can I create such an ...
1
vote
2answers
370 views

new page sidebar-template by default

Using twenty-eleven theme, need to change default template for new page from standard to sidebar. anyone?
1
vote
1answer
60 views

URL / Templating system advice [closed]

I am trying to set up my blog so that the following URL pattern: http://myblog.com/category/somecategory/ Will use the template file category.php I have created the template, however, when I ...
0
votes
2answers
139 views

How can I make different page templates for one category?

I need this for menu "red car", "blue car", "green car". Information is retrieving from a single category (cars). But the output on pages depending on the values ​​in the metaboxes (colors). On the ...
2
votes
1answer
1k views

Make “sidebar template” the default template for new pages

On Twenty Eleven or on its child themes the default template for new pages is a template with no sidebar. I don't know why this is like this; it seems to me that the designers of Wordpress are still ...
0
votes
1answer
178 views

How To make Custom page of every Category

Hii i have seen many blogs which posted thing in the same design for example if you see this http://www.songs-pk.info/2011/nayika-malayalam-2011/ there page create alwayz in the same style download ...
4
votes
1answer
1k views

Is there a way to parse shortcodes in PHP?

Many plugins don't provide a documented way to access their functions from within PHP (e.g. when building a custom theme), but only shortcodes to insert in posts. Is there a standard way of executing ...
0
votes
2answers
924 views

Add a submenu to wp_nav_menu

I literally don't know where to begin with this. The only wp_nav_menu() documentation I found was http://codex.wordpress.org/Function_Reference/wp_nav_menu and all submenu docs reference a different ...
0
votes
2answers
173 views

How do I create a template page with a specific widget as the content?

I have installed a widget so that I may add testimonials. This widget cycles through the testimonials in the sidebar and everything is fine. What I now want to do is create a testimonials page that ...
1
vote
3answers
6k views

Page template query with WP_Query

I'd like to query only pages with a certain page template with WP_Query or a function that would return the post object, but I can't find any information about that on the officiel codex.
0
votes
1answer
436 views

No three-columns template in TwentyEleven?

I am just jumping into the TwentyEleven bandwagon, and I am a little puzzled by the apparent absence of a 3-columns template file... It is advertised in the theme description though. Am I missing ...
1
vote
2answers
202 views

Login page theming?

is there a way for me to add a page to my template directory to customize my login.php page? I couldn't find much on the subject so I decided to post the question here.
0
votes
1answer
1k views

Prevent 404 of Author pages without posts

How do I prevent author archives without posts from 404ing?
0
votes
1answer
2k views

Simplest Way to Build Custom Archives Page?

I am looking to create a page in Wordpress to output links to all of our posts from every month since we launched the blog. I have seen the archive.php template file in Wordpress, but this seems to ...
0
votes
1answer
73 views

Most appropriate way to display CPT's by children terms of custom taxonomies while retaining desired permalink structure?

Im currently building a small store section on a site of mine with the use of CPT's & Custom Tax's for the first time. So far Ive successfully got my CPT's & Tax's working as expected however ...
1
vote
2answers
10k views

Display a specific dynamic sidebar widgets on a specific page

I have had a wordpress site handed off to me halfway through completion. It's been at least a year since I last used wordpress and there are a lot of things I'm finding different. The way I am used to ...
0
votes
2answers
157 views

Include home page template in specific category template

I have a specific category who's page I'd like to look like the home page of my site, with all the nice sliding featured stories, etc. If I create a file category-slug.php, can I do some sort of ...
0
votes
2answers
225 views

What is the advantage of using home.php over index.php for the front page

I am building a theme and wondering whether or not to include a home.php file or not. The theme (which will not be available to the public) will be mainly used with a static home page and separate ...
0
votes
1answer
140 views

Add a field to just ONE page

I discovered the 'More Fields' plugin which allows an editor to control which fields appear on which types of items in WordPress. Problem is, I would like to control which pages appear on just ONE ...
4
votes
4answers
4k views

Consuming an external API in WordPress?

I have a client who has a WordPress website, and he want to extend it to add new functionalities. These functionalities are included in a website I have already done (a kind of search engine over a ...
0
votes
1answer
773 views

Redirecting posts in Wordpress to a specific page

I created a page so that it would appear in my navigation menu. This page would however be my posts page (i.e. all posts would go here) and would also be my front page. I am unable to find anything ...
0
votes
1answer
241 views

Taxonomy Parent Name

Was just wondering how I would modify this piece of code: <?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo $term->parent; ?> ...to display ...
1
vote
1answer
3k views

tag.php doesn't work with tags on a custom post type post?

here's another stumper. I have a tag.php page. It works fine, unless you click a tag that is in a post associated with a custom post type. Then it doesn't work. Its like that tag, doesn't exist. But ...
1
vote
1answer
154 views

Plugin settings page template

When creating plug-ins for WordPress, there are times when you need to make a settings panel. Sometimes, you need more than one page, and they can be quite complicated. So far, I have been ...
0
votes
1answer
124 views

output custom Posts on a Page

I'm trying to write a function that will output a set of posts on a page. Because I want to display more than just the post titles, wp_get_archives() won't do (I think). The function to add the post ...
1
vote
3answers
942 views

if statement in sidebar.php checking page id or template or title

I have the following code in my sidebar.php file: <ul class="list-posts"> <?php $lastposts = get_posts('numberposts=5&orderby=date&cat=-52'); foreach($lastposts ...
0
votes
1answer
46 views

odd behaviours from template tags

Some of my template tags are playing up, and they have left me confused. On one site, that has been live for over a year without any of these issues, on all the pages that have custom query loops, ...
0
votes
1answer
240 views

Form post to Wordpress page = wrong template

I'm using permalinks and I have a page with a slug like this: http://www.mysite.com/jobs/ The page uses a specific template for itself. On another page I have a form that I submit as POST to ...
1
vote
1answer
446 views

Why are 404s not triggering my 404.php template?

404s are not triggering my 404.php template. The header status code, checked in firebug, is a 404, but the page that gets displayed is like a loop with 0 items (as if this were simply an archive page ...
0
votes
1answer
154 views

Show Homepage (only) Hits Count

I need a counter to put in my theme (using php) or widget to show homepage view counts I've tried "Cystats" but i couldn't get 'only' homepage hits by it how can I do this ? (there is a idea to show ...
0
votes
2answers
3k views

get_query_var() and permalinks

I have a permalink structure that looks like this, %category%/%postname% I have a category.php template coded up and and trying to pull of the post of a certain category, so for example my URL may ...
0
votes
1answer
400 views

Creating / Editing a post from within site template

I am developing a website that will allow multiple users to author short posts (Kind of like a job board) and I want to know how they can author or edit these posts from within the site template (Ie; ...
2
votes
1answer
1k views

Creating a wordpress plugin where users can override templates

I see plugins where users can override the plugin templates by creating files inside of their own theme folder, how does this work? Is this a built-in part of wordpress or does it have to be written ...
0
votes
1answer
343 views

Force WordPress to NOT display the manual excerpt

I'm forced to use manual excerpts on a number of my posts to integrate them with a shortcode plugin. However, this is interfering with how they're being displayed on an archive page (using a page ...
11
votes
1answer
15k views

How to create custom URL routes?

I have a very peculiar requirement, hopefully I can explain it without being too confusing. I created a page template where I list some properties I get from an external XML file, so far no problems, ...
4
votes
2answers
2k views

Use [embed] filter in template files

WordPress autmatically embeds a youtube video's if I use: [embed] http://www.youtube.com/watch?v=Xog1T5dUxcw [/embed ] This is great, but it doesn't work if I use it in an template file. I have a ...
0
votes
1answer
63 views

which template does wp_ tag_ cloud point to?

This is very embarassing. If I add wp_tag_cloud to my navigation in list form, it shows as I need it (like a sub nav). If you then click a tag what template is then used? I've tried adding ...
1
vote
2answers
3k views

Include a specific page in your template

How do you include specific pages into a template? Like for example on my websites main page I want to have about 3 different content areas that the client can regularly update as he needs to. I ...
3
votes
1answer
4k views

How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy

This answer provides the code for a query that returns an OR match on a taxonomy term: global $query_string; $args['tax_query'] = array( array( 'taxonomy' => 'status' ,'terms' ...
2
votes
1answer
2k views

Why does my short code get executed before other content?

I have the following text in a page. As you can see my shortcode is right at the bottom but somehow when the code runs, the out put of my shortcode is inserted at the top of the page instead of ...
1
vote
3answers
3k views

Add a #hash to the links in my custom menu

I have created a static frontpage where I load in the content of all my pages. Now I have a normal custom menu, but the links refer to the pages, for example: http://mysite.com/about Now the I want ...
1
vote
2answers
266 views

Get link to a specific template file [closed]

I was planning on creating a custom "Archives" template to create a detailed Archives page for my blog, including lists of posts by category, tag, date and author. Rather than use a static link ...