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

learn more… | top users | synonyms (1)

3
votes
2answers
3k views

Searching multiple custom post types and pages

I'm using bainternet's method for searching custom post_types and it works great. However, I've recently been requested to return more than one "specific" post type and perhaps individual pages for a ...
3
votes
2answers
900 views

Modify CSS via Theme Control Panel

Hi to all I'm trying to create an advanced control panel for my first Wordpress template but I'm not able to add a function that I will need. The function that I'm trying to add is the possibility to ...
1
vote
1answer
317 views

List Category Posts rewrite necessitates rewrite of customised templates

I just upgraded the List Category Posts plugin from .17 to .18.3, and it broke my customised template :(. My setup: WP 3.0.4 multisite network enabled, local installation with MAMP, PHP 5.3.2. LCP ...
0
votes
2answers
2k views

one category template for multiple categories

i have category-events.php to list my posts tagged 'events' but it wont work for 'events' child categories. ie i have some posts tagged 'events' and one of events' children 'exhibition'. I thought it ...
1
vote
1answer
119 views

Code to pull in a PHP file named after the category ID

I use this code to pull in an image based on a post's category. Images are named after the category they represent, so a post in category 50 pulls in 50.jpg. <?php foreach((get_the_category()) as ...
0
votes
1answer
446 views

Correct way to add a block element to sidebar layout

First time experimenting with wordpress and looking for advice on the correct way to add a block of html to a sidebar. This doesn't seem like a custom widget to me as there is no functionality ...
19
votes
2answers
12k views

Get custom post_type's archive URL

It seems like stupid question. But, I can't figure it out :(. I need to display button at home that goes to custom post_type's archive URL (archive-{post_type}.php). How do I do that?
0
votes
2answers
544 views

Custom post_type search pages

So I have a section on my site that specifically searches a custom post type for YouTube videos. I'm absolutely able to search the custom type. However, I'm unsure how to create a search page that has ...
0
votes
1answer
268 views

Update template without undoing all my edits?

I want to edit a wordpress template to have a look and feel more like I want. With things like my flair on it. After I change the template, does this mean I can no longer update it without reverting ...
1
vote
1answer
285 views

modifying a template and adding jQuery to it

There is a page template called "All Bookmarks" for displaying all links grouped by category. I want to modify it 2 ways: each category of links should be collapsible/expandable by clicking on the ...
0
votes
1answer
815 views

where can I see my custom post type archive template?

I am working with wordpress 3.1 and have custom post type of whitepaper. My single-whitepaper template seems to be working. But the archive template (archive-whitepaper.php) is not. And this after I ...
5
votes
1answer
3k views

How to find the posts page (home page) programatically

What php code can be used to find the page object that hosts the blogs? Note that this may not be the same as the first page of the web site. In the admin section we can specify in which page to ...
0
votes
1answer
197 views

How to make post templates to include shortcodes only?

I used to post same shortcodes every time (shortcodes loads dynamic contents). So, I want to pack these shortcodes in a template for my posts. How can I do this?
0
votes
1answer
375 views

What's a good way to unenqueue all scripts for a single template page?

I've found that my attachment templates are inheriting the enqueued scripts for single posts. My first instinct was to unenqueue these scripts one-by-one or to do an is_attachment() check before ...
0
votes
2answers
188 views

Function Reference Documenting Template Tags for use in Custom Theme Templates?

(Moderators Note: Original title was "custom template / wordpress functions?") I'd like to use a modified WordPress theme template and was wondering where I can find a reference for the .PHP ...
0
votes
1answer
459 views

Custom Page Template [closed]

Could somebody help me make a custom page template? I'd like to have a basic page (with sidebars, header and footers) and a table for data. I'd like the data to be taken from custom fields. ...
0
votes
1answer
552 views

Run a jquery script on on a certain template page

All I want to do is basically this: wp_register_script( 'jquery_zebra', get_bloginfo('stylesheet_directory') . '/library/scripts/jquery.zebra.js', array('jquery')); wp_register_style( 'css_zebra',...
9
votes
4answers
2k views

Is there a WordPress plugin that registers a plugin file as a custom page template?

I need to create a plugin that makes custom page templates available in wp-admin. I'm wondering if someone has tackled this already, as it seems like a pretty typical process?
1
vote
1answer
788 views

Custom post type content using custom fields without template

When I first heard about custom post types I thought it would solve an old "problem" I have, so I was thrilled. But when I tried to setup something I couldn't achieve what I want. So I'd like to know ...
3
votes
2answers
4k views

display different template based on post type

Hay, i have a custom post type "Events", however this is basically a post type, so it inherits the post.php template page. Is there anyway to use a different template (i.e events.php) if the content ...
0
votes
1answer
224 views

Displaying categories in different template problem

Greetings! Sorry for the vague title decription - Couldn't word it any different. In my index.php page I have the following code: <?php if (is_category('6')) { ?> <?php include (...
1
vote
2answers
223 views

Using wordpress template tags within an array

A bit of a noob PHP question coming up. I am trying to create a generic archive style view for my custom post types. Ideally I want to create one generic template that can be used for all post-types. ...
0
votes
1answer
139 views

Removing comment option

I am working on a theme that I found here: http://top-wordpress.net/ The theme is Terapy. I turned off comment option in the admin panel, but the blog posts show that "commenting is not allowed". I ...
0
votes
1answer
466 views

front page won't change templates

I have tried changing the template of the attached page and changing which page is attached as the home page, no effect for either. The front page remains the same. I am at my wits end with this one!!
0
votes
1answer
1k views

Custom Post Type, Custom Taxonomy Template: How to get current taxonomy name?

Ok so i have a custom post type called 'profile' with a custom taxonomy called 'company'. The site has many profiles and companies defined, with profiles being associated with companies as necessary. ...
4
votes
1answer
564 views

Outputting Canonical Resource URLs Across a Multisite Network?

Say a theme "foo" is used on across a network of sites. In each site, all the theme resources (.css, .js, etc.) will have distinct URLs: http://network/siteA/wp-content/themes/foo/style.css http://...
2
votes
2answers
179 views

How to control template resolution if both Author and Category filter in place?

The following url resolves to the category template: http://localhost/author/myusername/?category_name=somecategory I have a category-somecategory.php template and just a generic author.php template. ...
0
votes
2answers
5k views

Footer.php not showing?

Here is my index.php file, for some reason the footer.php isn't being loaded through really weird, its in the directory of my theme, what could be causing this? <?php get_header(); ?> <...
5
votes
2answers
5k views

How to customize the default HTML for Wordpress Attachments

I'm using Wordpress 3.0.1 (most recent as of now) and working around the Whiteboard theme. It seems that for attachments (images, specifically), Wordpress generates the HTML automatically and it ...
1
vote
4answers
2k views

How to display nothing (instead default) when no user gravatar is present?

Is there a way to show no gravatar in comment list for the commenters that are not registered at gravatar.com? As much as I saw, gravatar.com doesn't return a special code when no avatar is ...
0
votes
1answer
732 views

Using shortcode in template file

this is shortcode in template: function shortcode_frame_left( $atts, $content = null) { return '<span class="frame alignleft">'. do_shortcode($content) . '</span>'; } add_shortcode('...
1
vote
3answers
396 views

Advanced templating / Wordpress as a CMS questions

I have a Web site that consists of several pages, with different layouts, and also a blog. I would like all these page to be editable through Wordpress, rather than having them as custom pages ...
1
vote
2answers
760 views

How to support custom templates on a custom post type?

I'm stucked at some point developing my theme. I created a custom posts types to support an image gallery. So far, it's working great (have a look on 'galeria' on psaikali.com). I registered this ...
2
votes
3answers
172 views

What is a good way to present templated content in WordPress?

I'd like to be able to add a template for a page that will present pages with similar data in the same style. For example, I want to be able to create a "Person Profile" template so that all personal ...
1
vote
1answer
284 views

Need Category RSS Feed that shows all posts

How do I go about making this? I've been trying to get add_feed and such but have had no luck.
5
votes
5answers
385 views

Updating WordPress overwriting customization tweaks - strategies?

Twice now I've updated wordpress, only to realise that (facepalm) it overwrites some changes I've made to the custom template - to sidebar or something similar. Obviously I don't HAVE to update, ...
2
votes
2answers
325 views

How can I make my custom templates respect permissions?

I use the Members plugin to manage permissions on my site. For standard templates, it works great - when the user doesn't have permission to see a page, they get the following message: Sorry, but ...
0
votes
1answer
333 views

Is there a way to upgrade a theme without losing custom templates?

I recently updated the main theme of a production site. Unfortunately, the upgrade process deleted all our custom templates. Is there any way I can prevent this happening again?
0
votes
1answer
156 views

Why does blog page not reveal it's template?

I've got a CMS style setup. The blog part is not on the home page. I'm trying to add certain things to the side-bar according to which template the page is using. That all works fine, except for ...
0
votes
2answers
121 views

Automatically going to the first page in a hierarchy?

Let's say I have a website about different types of cars. The structure is a little like this: -Home -Cars (shows a submenu with a list of cars, ie Volvo 850, Porsche 911 ) -Volvo 850 overview (the ...