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

learn more… | top users | synonyms (1)

17
votes
1answer
26k views

How to change the default registration email ? (plugin and/or non-plugin)

After a new user registration, WP sends out an email with the login / password, and a link to the login page. Is there a way to change this defaut email template? I'd also like to change the subject ...
1
vote
3answers
1k views

Best approach for loading a sidebar Only if the screen max-width is >900px?

I have been playing around with media queries quite a bit lately and I love the concept. It is so easy to display images or change div floats depending upon what the users screen max-width is. I'm ...
0
votes
3answers
535 views

What action hook can I use to add a JavaScript to a page post using a theme template that is not including get_header() nor get_footer()?

So the reason why I am don't want to include get_header() or get_footer() tags is because this page will be loaded as an iframe using the thickbox modal plugin and its content will be a form and I ...
4
votes
2answers
696 views

What are the current recommended best-practices for comments.php?

I'm getting ready to submit a theme to the .Org repo and wanted to make sure that everything is in ordnung. One of the biggest holes left in my design is the comments template. I've taken a look at ...
2
votes
2answers
1k views

How do you check if a WordPress template file exist?

Is there a native function to check if a theme a template file. For instance, if a theme is not using the 'home.php' file, then execute some code...
1
vote
1answer
196 views

Bizarre issue with custom RSS template

I'm trying to create a custom RSS feed template for a site my company manages, and I've encountered a very confusing bug I'd like some input on. First off, as background context, after a lot of ...
0
votes
1answer
3k views

attachment page template? only show attachments for current post?

hey guys, didn't know that, but the attachement page (i'm using attachment.php as template) is actually looping through ALL ever uploaded attachments to my blog! I just want to use it in order to ...
-1
votes
2answers
159 views

Why does my category page display “posted on…” when all I want it to do is display categories?

Refer to: http://blog.studentlife.uiowa.edu/svp/categories/ I just used a blank category template. What can I add to/change the code to make it so that it doesn't put in the category page like it's a ...
0
votes
1answer
1k views

Custom Post Type Template Based on Page Slug?

I have a hierarchical custom post type (missions) setup. I want to create a few child pages for it (discuss, petition, educate), but I want each of those child pages to display a different template. ...
2
votes
1answer
465 views

Possible to use pagename inside get_template_part?

I'd like to grab the current page name and pull that specific template part per page. This way I can just set up a generic tier-1 template that calls in a secondary section based on the current page's ...
6
votes
1answer
3k views

Taxonomy, Terms, and Template Files

I have post type 'product' and hierarchical taxonomy 'types' attached to it. In this taxonomy, I have terms: 'dry-clean', 'washer', etc. With several sub terms on each terms. In my situation, I need ...
1
vote
1answer
2k views

How to hide/redirect the author page

I have a website where I let people subscribe. I would like to only show the author page for actual authors who have written a post. I wrote this code that checks for post the problem is I can't use a ...
0
votes
1answer
693 views

Conflict in function to allow single post template based on category

I've used Justin Tadlock's great function for category specific custom post templates many times, where you can use single-cat-id.php for single posts belonging to a specific category. I just ran into ...
1
vote
1answer
458 views

Toggle Sidebar Display

I'm developing a WordPress theme that allows users to toggle the visibility of the sidebars using Javascript in the same way that wikis allow users to show or hide a table of contents. When a user ...
1
vote
2answers
400 views

What exactly does “Posts page” do in WordPress?

Hay, I'm making a WordPress template, and i have 4 main pages. HOME BLOG CONTACT ABOUT US As you can see "Blog" is a page (i need it to display when i call wp_list_pages()), but how do i edit this ...
0
votes
1answer
156 views

Is it possible to give the user the chance to select between two single template files to use in a post?

Basically, I want to allow the user to select which template files he or she wants to use in a post: single-asc.php: <?php $custom_posts = new WP_Query(); ?> <?php ...
5
votes
4answers
5k views

Dynamic template serving, change theme_root using add_filter from current theme

Some plugins use the 'template', 'option_template' and 'option_stylesheet' to dynamically serve (alternative) wordpress templates. For example, Nathan Rice's ServeDefaultToIESix. For Example - ...
2
votes
2answers
838 views

Preventing index.php?category_name=something from redirecting

I'm trying to filter posts in a category by the year of the post's date. I also want to do this without being redirected to the year template so my ideal URL would be ...
0
votes
2answers
891 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
516 views

Add a preview to a Wordpress Control Panel

I'm trying to create a new wordpress template and inside it I added a Control Panel, inside this control panel there is an option that allows user to choose where he want's to place a on a map, I try ...
1
vote
1answer
3k views

Enable page templates. How?

Basic question, but I want to enable page templates. I have one theme which has page templates enabled. I switched to another but there is no option to change the template, even when creating a new ...
-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 ...
3
votes
2answers
783 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
1k views

How to have dynamic sidebar content per post

I am setting up a site for a client and have included a dynamic sidebar in the template for certain types of posts. I would like the client to be able to add a text widget to that sidebar for a post ...
4
votes
3answers
2k views

Creating a default Custom Post Template that a Theme can override

I'm in the midst of building a Wordpress Plugin that adds a custom post type, for which I'd like to include a default template to display. Essentially, this is an event management plugin, and the ...
0
votes
2answers
1k 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 ...
0
votes
2answers
658 views

Output Title of Post's Current Category

How do I output the current category title for each specific post? <?php query_posts('category_name=group&posts_per_page=10'); ?> <?php if (have_posts()) : ...
1
vote
1answer
115 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 ...
2
votes
2answers
196 views

Need some templating advice for templating with custom post types and taxonomies

I'm setting up a "Design Show Winners" section for a design organization that runs it's site off WordPress. For ease of use, I'd like it to be a custom post type of "Design Show Winners" with ...
3
votes
3answers
2k views

Loading template files from a subfolder in my theme?

I am working on a site that will have up to 30 templates in it. I don't want to have all those templates at the root of my theme folder cluttering up everything. I know how I can modify the ...
0
votes
1answer
289 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 ...
1
vote
2answers
965 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 ...
11
votes
2answers
6k 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
1k views

Custom Fields to Category edit page, then displaying them in a template correctly

Seem to be having a few issues with this project lately so sorry for spamming questions! I needed to give the category edit page in the admin a few additional fields to allow my client to manage them ...
2
votes
1answer
804 views

Can I apply a WP theme to a specific custom page template?

One section of my website is going to be completely different visually than the rest of the pages, is there a way to apply a WP Theme to specific page templates ?
0
votes
1answer
166 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 ...
0
votes
2answers
520 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
2answers
165 views

Possible to make a subdirectory that loops through a single category?

I'm trying to separate the main part of my blog (the informational portion) from more commercial parts. WHen you load my homepage, I purposely exclude a category because I don't want my normal ...
1
vote
1answer
272 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
711 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 ...
2
votes
1answer
2k 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 ...
23
votes
9answers
23k views

get name of the current template file

I've found this to display the current name of the file used in template: function get_template_name () { foreach ( debug_backtrace() as $called_file ) { foreach ( $called_file as $index ...
0
votes
2answers
885 views

Display only deepest category on a single post?

I want to display the direct category ancestor of a given post. An illustrative example: These are the categories I have: Cat1 Cat2 Cat2.1 Cat2.1.1 Cat2.1.2 Cat2.2 Cat2.2.1 Cat2.2.2. Cat2.3 ...
0
votes
2answers
316 views

Is there any tool to find lines of codes responsible to generate front-end HTML elements?

Dreamweaver CS5 is very useful to design or modify a Wordpress theme. It inspects CSS elements in Live view (after seting up a test server), but its unable to trace original wordpress code responsible ...
0
votes
1answer
186 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
324 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
180 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 ...
1
vote
1answer
294 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
1answer
387 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. ...
1
vote
2answers
2k views

Load post with a different template?

Let's say I have a single.php file with a certain layout (graphic intensive). I want to create a sort of plain-text version of the same page that is only called when the user clicks the provided ...