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

learn more… | top users | synonyms (1)

2
votes
1answer
998 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
330 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
13k 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
3k 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
2k 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
247 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 ...
1
vote
1answer
150 views

I want to add a custom “all posts by author” by authors name. How?

I have a custom display of meta-info (authors name, date and categories). So, I want to display a custom link to all posts by author. By theme default I have this <?php the_author_posts_link(); ...
0
votes
2answers
560 views

How to have two different versions of a tag/category/taxonomy archive page?

I have a site that has two different bodies of content: more formal content (using various different custom post types) and a blog (using a blog post type). These two different bodies of content use ...
0
votes
1answer
931 views

Make Permalink go to specific template

I have a single post page that contains an audio player. I need place a link on the page that will open up the player in a pop up window. Simple right? My thoughts were that I have an additional ...
1
vote
3answers
791 views

Programmatically change post templates?

I need to change the template on several hundred pages on my site. Does anyone know if there is a command to do it programmatically? See the following code snippet; I'd like to replace my comment ...
1
vote
3answers
717 views

Is there a way to check which template file is being loaded, if it is not a page template file?

I don't see any way of testing which template file is being loaded, if the template file is not a page template. Otherwise I would use is_page_template(). For instance, I am using a home.php template ...
1
vote
2answers
273 views

How can I get this request to use the Custom Post Type page template instead?

I read the answer for this post which says you can do something like this: http://example.com?post_type=car&color=red When viewing $wp_query everything seems to be working fine. That is, I'm ...
5
votes
3answers
4k views

Is it possible to stop selected plugins from loading on certain template pages?

I have a template page that has form on that is only used once in my site. The form uses form validation using jquery validate plugin (such a great plugin). Once the cart66 Plugin is loaded, the form ...
3
votes
2answers
1k views

Need to give custom page template for each language in WPML

I need to give each page a custom/different page template for every language page in WPML. eg: Let i have a test page in English and french. Is there any way out so that in English i give sidebar ...
1
vote
1answer
301 views

Different Template based on HTTP Referer

He Guys, i've been looking for a way to show a different Page-Template based on HTTP Referer or maybe the User Agent or what ever. I'm planning an Image-Gallery which should be shown in a Fancybox. ...
1
vote
2answers
522 views

Easiest way to show total number of subpages

I am making a portfolio site where each portfolio entry is a subpage of "Work". In my template, I am trying to say something like: worked on 15 projects and counting, where 15 is the total number of ...
0
votes
3answers
411 views

Using the same database on another Subdomain

Hi i am currently replacing my blog run on wordpress with another neat theme. I tried the preview template feature and everything is fine, just that i don't trust everything so easily when it comes ...
3
votes
2answers
11k views

Can I assign a template to a custom post type?

can I assign a template file to custom post types? I have created a custom post type called items, and I would like to assign templates to the items like you can do with pages.
0
votes
2answers
1k views

Why is my taxonomy template not shown?

I have created a custom taxonomy for my site called projects with a matching template called taxonomy-projects.php. The problem is that when I browse to http://mysite.com/projects the template is not ...
0
votes
1answer
340 views

A problem with date archives

I downloaded a widget for my blog, which works just like the calendar widget but displays a custom post type instead. It correctly marks my CPT-posts and creates links, such as ...
0
votes
2answers
163 views

Catch all taxonomy template

I've created a custom taxonomy and I'm trying to get Wordpress to display the taxonomy template when no term is defined. Currently Wordpress is only showing the template when a term is defined on the ...
0
votes
1answer
65 views

Getting a WordPress tag to print inside of a traditional php echo

I want to get the template path to print in this echo of a form in the admin. Here is what I got: < ?php echo of_get_option('splash_img_transition', ...
1
vote
3answers
3k views

Display page content AFTER a loop of posts

This is probably easy once you know but I'm having trouble getting the static page content to appear AFTER a list of posts. I'm using a named page template which displays posts as a slider and I want ...
3
votes
1answer
3k views

How to make wp-signup.php a 1-step process [closed]

I'm developing a multisite for Real Estate agents. Wp-signup.php used the wrong page template from my theme (homepage instead of full width page template), so I took the meat and potatoes from ...
3
votes
2answers
1k views

How to get Images included in Post

is possible to get images added to a post programmatically? I am working on custom template (my first) and I need to display Images added to a post in specific way.(first image as title image and the ...
0
votes
1answer
98 views

problem with the loop

Hello I am working with my own template, and also using the post-to-post plugin, I am doing the following, <ul> <?php global $post; global ...
2
votes
1answer
211 views

Subpage template

I've had a look around already but couldn't find an answer to this. Is there a way to create a template that applies to all pages that have a parent? something like sub-page.php without having to ...
3
votes
2answers
727 views

Create built-in pages without creating actual pages

For example: site.com/contact (or site.com/?page=contact if not using permalinks) when someone goes to that page I want to load a theme template, like page-contact.php But I don't want to create a ...
2
votes
4answers
665 views

Template files missing after moving site

I just moved a site (by exporting & importing all posts & pages, and copying theme files over), and on the new site the various page and post templates are unavailable for selection on post ...
2
votes
2answers
406 views

What code do you use to generate the text to go into the HTML title tag?

The question title says it all. Myself I just stick with the default code from one of the packaged templates that comes with WordPress out of the box: <title><?php /* * Print the ...
0
votes
3answers
272 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 ...
0
votes
2answers
2k views

Wordpress Shortcode wrap around div

Is there a way to wrap a wordpress shortcode around a div in a template file? Here is my code: <div id="subscription"> <?php do_shortcode('[subscribe]');?> <p>This is subscription ...
0
votes
1answer
346 views

Load template inside a parent template

Inside of my current theme directory, I created a folder called "mobile" which contains a separate set of template files, all optimized for mobile. Now, say I setup a function that detects a mobile ...
1
vote
3answers
2k views

wordpress - load a template based on the URI

I have a number of custom of post types - i.e. 'windows', 'doors', 'garages' and I want to load a custom template (special.php) whenever my wordpress site has a url that looks like this: ...
2
votes
1answer
2k views

Generic taxonomy-term template page

because of my taxonomy hierarchy, my taxonomy-type.php template is already used, is there a way to have only one taxonomy-type-term.php template ? I've got 13 sub terms, do I need to create 13 ...
0
votes
2answers
2k views

Pagination problem (plugin wp-pagenavi) with a custom post type?

I am currently developing a WordPress website with a custom post_type called "music". I use the plugin wp-pagenavi to paginate content "music". When I link on the first page, it's OK (see link below) ...
2
votes
1answer
61 views

Adjust which tempalte a page uses with a function?

I know if I had a page that had a permalink such as /stories/ then I could create a page in my template called page-stores.php and it would load in place of the default page.php when that page loaded ...
0
votes
1answer
204 views

Wordpress function.php on ZendFramework CMS

I'm working on a CMS based on Zend Frameowrk and I'm triying to get the mos usefull features from wordpress. One of these is the use of functions.php in the template directory and I think I could do ...
1
vote
1answer
2k views

Getting template_include to work when allow_url_include is off?

I'm working on a plugin that creates a custom post type and I would like to display a custom template without modifying the theme. Here's the simplified code I'm working with: ...
0
votes
1answer
761 views

What's the purpose of $wp_did_header?

It is referenced in load_template but Wp does nothing with it ?!!! so what's the use ? 1105 function load_template( $_template_file, $require_once = true ) { 1106 global $posts, $post, ...
1
vote
0answers
131 views

[Plugin: DukaPress] Modifying template output [closed]

I'm building a catalog of publications for a Research Center with DukaPress plugin. http://cea3.iscte.pt/publicacoes/occasional-paper-series/ Some publications are available for order, others are ...
0
votes
1answer
438 views

Calling the_excerpt from inside a plugin template file

Im trying to use the_excerpt form inside a plugins template file, plugin is wp-favorite-posts by default the plugin only lists and displays the saved post title, i have manged to get it to show ...
1
vote
1answer
129 views

Create a page for a theme only

I am in the process of creating a wordpress mobile theme for one of my wpmu networks. I have created 2 + pages that show our other sites and a custom login form. Right now i have labeled them ...
1
vote
1answer
686 views

Custom excerpt function re-factoring

This may be more of a php best practices question, but here goes... I am using a custom excerpt trim function: function new_wp_trim_excerpt($text) { // Fakes an excerpt if needed global $post; ...
0
votes
2answers
489 views

[Custom field template plugin] Upload limited to 20 inputs file

am running the CFT plugin version 1.9.2 on a 3.1.3 wordpress site and in the admin i did set up 30 input file fields related to a custom post type. It all works fine until the 21st field (and beyond) ...
3
votes
3answers
3k views

How to fix a theme with page.php Default Template that accidentally deleted?

I am having a quite odd case with WP today, and after spending about an hour searching on google and forums, can't find any answers. I hope posting here might allow me some chance to get help from ...