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

learn more… | top users | synonyms (1)

1
vote
2answers
255 views

On this day PHP code

I'm working with this code snippet for an "on this day" type post. However it is only showing 1 year in the past. I'm looking to automate this so it shows on this day in 2009, 2010, 2011... and as the ...
1
vote
1answer
530 views

Mass update excerpt

I'm using a photoblog theme which upon creating a new post it takes the post attachment and saves a modified "img src" string into the excerpt field. It then uses <?php the_excerpt(); ?> to ...
0
votes
3answers
290 views

Wordpress -> PHPBB look a like

I want to create an online forum. From my server settings I have two option of smf and phpbb. I hate both of them!. Is there any solution to turn the wordpress to a full blown online forum?
0
votes
1answer
424 views

Tag template not returning posts [closed]

I have the following code which SHOULD print out the title of all posts with the associated tag (in this case the tag is 'icon'): <?php $tagname = get_query_var('tag'); ?> <?php ...
0
votes
2answers
1k views

How does WordPress choose archive type template?

I can't find a comprehensive list of criteria for how WordPress determines which archive type template it chooses. From what I understand it uses URL forms for this purpose, like: ...
-1
votes
1answer
4k views

How did you incorporate WooCommerce in your own WordPress theme?

This has most probably been asked before, but I really need to show WooCommerce products in my template, but I don't know what hooks to add where. It's my first time working with WooCommerce. Can ...
0
votes
1answer
885 views

wp_nav_menu doesn't show on index page

I'm using calls to wp_nav_menu() in my header.php file. They're conditional, based on whether a user is logged in. This is in header.php: <?php if ( is_user_logged_in() ) : wp_nav_menu( ...
0
votes
2answers
134 views

Category Template - Show Last Entry as Featured

I am working on my category template. Here is how I want the page to display: Category Name - this is done The latest post for each category be on top (then styled which I can do). The Category ...
0
votes
1answer
239 views

Set generic reservation form for custom post type

I want to create a simple reservation (reservation.php) form for a custom content type (houses), i have created the reservation.php in the theme directory. The question is: How can i link to this ...
0
votes
1answer
1k views

Use template of parent category for single post sub-categories

I have single post templates in a folder in my child theme marked "single". I need the sub categories to use the same template as their parent. I've read a dozen tutorials all of which were more than ...
1
vote
3answers
402 views

Template for custom post with custom taxonomy

The theme that I'm developing is basically a portfolio, where the projects are custom post type and they are divided in categories (custom taxonomies). Here is how I'm defining both: $labels = array( ...
0
votes
1answer
508 views

Default taxonomy template in plugin, override in theme

Building off of this question/answer, I've sucessfully implemented the single view for my custom post types, but I'd also like to offer the same thing for taxonomies. I've looked through the docs and ...
1
vote
2answers
957 views

display comment form for specific post id

I have three pages, and I want them all to display the comments form from a post with id=343. What code would I use within the pages to make that happen? Here is what I've tried: <?php $id=343; ...
7
votes
5answers
3k views

How to rearrange fields in comment_form()

Im using a custom filter to change the fields, but can´t figure out how to change the order of the fields in the comment form. Desired order: comment field (first/top) name email website This is ...
0
votes
1answer
107 views

How to display a certain template element only for posts published within certain time range?

I recently migrated a blog from sub.domain.com to blogs.domain.com/sub/. Because I'm using Facebook comments, all the posts published before April 25 need to reference sub.domain.com/blog-entry-title ...
2
votes
2answers
1k views

Custom Taxonomy in plugin and template

I have a plugin that I am developing that is using custom post types and taxonomies. My question is this. How can I load the content/theme data from my plugin on to the page when the go to the custom ...
1
vote
1answer
895 views

Passing variables to templates (alternatives to globalizing variables)

I want to make my WP code simpler (there's some mess within header.php, page.php etc.). So, for example, I want to set something like this global: $foo = get_option('foo'); So $foo will work ...
0
votes
2answers
26 views

Archive template limiting to 4 entries?

I have a category called "javascript" and it's limiting my list to only 4 entries? <?php get_header(); ?> <div class="container"> <div class="row"> <div ...
0
votes
1answer
266 views

infinite loop on page with comments after changing comments.php and header.php

I am using version 3.3.1 of wordpress but I'm following a tutorial that used version 2.7. After changing my header.php and comments.php code, I'm getting an infinite loop when I view the single post ...
2
votes
3answers
3k views

Change the name of the 'Default Template'

I am working on a client's site and they need to select a Template whenever they are adding a new page; the "Default Template" is not a valid choice. I would like to rename "Default Template" to ...
4
votes
1answer
454 views

Show only 2nd level of navigation depending on active navigation

For example, suppose a menu like so: Parent 1 Child A Child B Parent 1 Child C Child D Child E Parent 2 Child F In a certain part of my template, I want something to show depending on ...
4
votes
1answer
986 views

I put my blog on a subpage, how do I get page title?

I've got my blog setup on a subpage (not the front page) and I'm using the template file home.php, how can I get the contents from the page editor onto this subpage? If I change the title of the page ...
1
vote
2answers
476 views

Clean URL permalink for custom post type

I have a custom content type of photo_group which is a collection of photos. I want to be able to go to mysite.com/photos and have that page dump out all of my photo groups. How can I do this ...
1
vote
2answers
131 views

Static Front Page problem

My theme uses the front-page.php file to display a number of items on the front page including a slideshow and some featured items. I have also designed it so the static front page as set in the ...
1
vote
1answer
498 views

How to make a Thumbnails Mosaic

I would like to make a mosaic with all the post thumbnails of a category and use it as the heading image on the category page. How do I go about achieving this? Where do I start? Any suggestion about ...
1
vote
2answers
3k views

How to add template to theme in WP

I've very new to WP and I'm trying to setup a new page which displays only a specific category through the WP admin section. I've downloaded the ACE plugin and I've managed to filter out posts with ...
0
votes
2answers
1k views

search page not found? (search.php or searchpage.php)

Am i wrong in thinking i can access the search page by using /search/ ? I've created the files search.php & searchpage.php but /search/ still returns 404? I want to customise the page a bit... ...
1
vote
1answer
96 views

Template plugin for blog posts? [closed]

can someone recommend a plugin to do the following? My wordpress CMS has two types of users: administrator and editor, both of whom are not technologically savvy, so they need things to be super ...
1
vote
3answers
2k views

Recommend an open source, template driven website builder UI that produces a working WordPress site [closed]

I'm a programmer at a domain registrar and web hosting company. In the past year or so we have branched into custom web design for individuals and small businesses. Currently all our solutions are ...
4
votes
2answers
657 views

Child Theme: how to override variables?

I'm going to build my first Child Theme. I understood how to override functions (hope!), but how to override variables? For example, in a Premium Template I want to change the values of feed variables ...
0
votes
1answer
17 views

Setting up menus before making a template live

I'm currently creating a new template for a client. Their current template does not implement menus at all. They are all hard coded links in the template. The new template I making them will implement ...
1
vote
1answer
477 views

Wordpress Custom Post Type Children Template

I have created a hierarchical custom post type in wordpress called "films." It is hierarchical so it can have children elements. When a "film" is clicked, wordpress automatically uses the template ...
3
votes
4answers
4k views

How to check if a shortcode exists?

I'm using do_shortcode function to add shortcode in my template. But i would like to check if that shortcode exists before display them. I mean like this If (shortcode_gallery_exists) { echo ...
0
votes
1answer
210 views

What hooks, actions or filters i can use to customize wordpress registration page and form?

i would like to customize the design of the registration page of wordpress and also the registration form. Can i create a registration page template? or maybe tell wordpress to use a custom ...
1
vote
2answers
1k views

wp alchemy multiple image uploader output images to template

I am using wp alchemy to add a custom metabox to my site with multiple image uploader option. This part is working fine, but I have no Idea how to go about outputting the image links to my template. I ...
0
votes
1answer
326 views

using WPalchemy to output custom metabox from homepage template

I am new to php and I am using wpalchemy to create a custom metabox. I want to output the info from the metabox on a template page, not inside a loop. I have tried the following to no avail per the ...
0
votes
1answer
220 views

List Category Posts plugin - underline links [closed]

I want to underline links in the default template for the List Category Posts plugin. I can't find where to do this in the template & styles. Any assistance would be gratefully accepted.
0
votes
1answer
328 views

Page template not registering on theme

I have the following code for a page. When I select the template Home Page from the drop down menu in the page edit, it doesn't work on my web host, but locally it works fine, so I don't think it is ...
0
votes
1answer
4k views

how can I add a “read more” tag directly in the template?

how can I add a <--more--> tag directly in the template? I mean, the exact php code to use in a template for that shortcode. I need it for a script that makes use of that shortcode to hide content ...
0
votes
2answers
580 views

Conditional template tag for buddypress pages

I'm trying to assign a special template only to buddypress pages (activity, members, profile...). All other posts / pages use a different template. Problem is: I just can't find a good way to tell if ...
0
votes
1answer
43 views

Add 1 category more to If_in_category statement

Hey everyone, a simple question. Question I need to add one more category: Events in the if statement along with News which is stated in the code. How can I add it? Thank You very much :) Code ...
2
votes
1answer
935 views

Added a new template file to a theme - get Call to undefined function error

I added a new file in the theme folder and it doesn't seem to be working properly. The first line get_header(); creates an error Fatal error: Call to undefined function get_header() like it's not ...
0
votes
3answers
158 views

Need help with adding templates (archives and sitemap) to Wordpress child theme

I recently switched themes, and my old theme had templates for sitemap and archive (in fact the archive was one of my most viewed pages.) When I switched themes the link to the archive and sitemap ...
0
votes
2answers
185 views

Show a different code on front page to other pages

I'm looking to display a list of posts in the header section on my template on all pages with the exception of the front page where I would like to show an image in place of the list of posts. Is ...
0
votes
2answers
337 views

Why won't pagination work?

I am using a page template with code to display all blog posts: <?php /* Template Name: Blog */ ?> <?php get_header(); ?> <div id="main"> <?php // ACF Page number variable ...
0
votes
1answer
198 views

WordPress 3.3.1 single post template

Does anybody have any idea why on single posts there are no template dropdowns for template selections in WP 3.3.1? I did not find that either in the page administrative area. Thank you
1
vote
2answers
384 views

List taxonomy term “Last Name” + “First Name” (taxonomy custom field) in a post loop

I have a few custom fields for a taxonomy "Author". The term title is the Author's last name, and one of the custom fields is his first_name. Now I need, in a post loop, to list all "Authors" of that ...
3
votes
1answer
1k views

How can I set up a category “overview” page?

I know I can use the Template Hierarchy to set up custom theme pages for terms inside a category, like these: mysite.com/category/tech/ // category-tech.php mysite.com/category/blog/ ...
0
votes
1answer
220 views

Trying to display short code content in template file with do_shortcode()

I installed the WP Issuu plugin on a site and tried to use do_shortcode() to render the shortcode in the template file. Strangely it doesn't work, although it does for the [gallery] shortcode. I.e. ...
0
votes
2answers
339 views

persist a variable set in header.php all the way down to footer.php

I look up a custom post field value in header.php, and store it in a global variable. In most of my template files, the includes go like this: include header ...do a bunch of stuff include ...