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
1answer
31 views

Query the database after get_header() has been included

I'm trying to create a custom template. Iv'e searched a lot but cannot find how to query the database once the get_header() is added to the page. What I am looking for is for PROPER ways to query ...
1
vote
0answers
30 views

Turning on the 404 page on localhost

I'm using my localhost (XAMPP client) to test my WordPress website and everything works fine, till it comes to verifying how does my 404.php template looks like. I can't preview any changes, because ...
0
votes
0answers
27 views

Custom header content within a customer page template

I built a custom page template and everything is working swimmingly. I have a problem however making it so each custom page using the template can insert custom code into the header area. If you ...
0
votes
0answers
45 views

Multiple 'template_redirect' hooks or one hook?

I need to redirect multiple templates for my plugin. I use the action hook 'template_redirect' Codex and it works for my first redirect as expected. My question is: If I want to redirect a second ...
0
votes
0answers
26 views

Select page/template from the permalink url

I use permalinks like example.com/projects/project1 for my project pages. They use all the same template. I want to access another template with more details on the project by adding /details to the ...
1
vote
1answer
29 views

Why write markup for index.php?

As I understand, index.php (a required template) is used when a more specific template is unavailable---according to the template hierarchy. My question is, if I create all the specific templates ...
0
votes
2answers
21 views

Give wp link pages it's own template

Here's the scenario, I'm working on a site with 100s of of paged posts using the wp_link_pages tag. The issue I'm having is that they're things I want displayed on the main post that I don't want ...
0
votes
0answers
33 views

Bizarre behavior of get_author_posts_url()

So I've been developing a site where I list a custom post type associated with a member in their profile page. It was all working fine until I imported about 150 users (at least that's when I ...
0
votes
2answers
34 views

creating single page with 2 columns while theme is 3 column

I am using Diapason theme , which gives me an option for both 2 column or 3 columns...My requirement is 1:- all pages except home page (static) should have 3 columns 2:- Home Page should have two ...
0
votes
2answers
26 views

Is there any hook for theme activation ? or something similar?

I know this has been asked before however my question is different. So. I have a plugin that creates custom post types on the fly. the plugin also has a function to create template files for each of ...
0
votes
0answers
58 views

Custom post type pagination, single page issue

After having problems getting pagination working at all for custom post types, I've read that the custom post type name and the page name cannot be the same. So I set out from scratch: I've created ...
0
votes
0answers
28 views

Wrong datatype for second argument error

I am getting a strange error on my Wordpress site. Does anybody know what is going on here? and how to fix this? The Error: Warning: in_array() [function.in-array]: Wrong datatype for second ...
0
votes
1answer
38 views

How to create a archive template for custom post type [duplicate]

I've created a custom post type using Custom Post Type UI and Advanced Custom Fields plugins. The name of my custom post type is article. I want to have a page which lists all the articles in a ...
0
votes
1answer
24 views

Problem with multiple menus in theme

I am having trouble trying to get my new theme working. I have all 4 menus working on my test server but when I move the theme to the live server and set up all but one (main-menu) will not show up. ...
0
votes
2answers
59 views

How to create a wordpress template without using any page

I'm not sure WordPress was build for this, but this is what I'm trying to achieve: I want to make a specific URL inside wordpress accessible, for example www.example.com/some-template . This ...
0
votes
0answers
23 views

Why is a post different than a page with regard to custom fields?

I'm sure the flavor of this question has been beat to death, but why is it that I can add custom fields to pages and other custom page types, but when it comes to posts, the only info I find online is ...
0
votes
2answers
58 views

Load child template based on parent

I have child page templates that need to be automatically applied based on the parent template. I'm wondering if there is anyway Wordpress handles this. This is the solution I came up with. (in ...
0
votes
1answer
43 views

Multisite - Echo admins profile meta

I'm having a problem with echoing the admin's profile meta in a custom post type template. It used to work, but for some reason it's not working anymore. I'm not aware of any changes made that would ...
0
votes
1answer
40 views

Need a conditional to test if title of parent page matches title of child page

In my main loop, I need to incorporate proper html markup into a conditional to test if title of parent page matches title of child page and do (or do not) display certain content. Default might be ...
0
votes
0answers
22 views

How to change posts page to use own template [duplicate]

Scoured the web looking for this solution. Come to realise that the posts page, even though you change the settings under Reading > Settings and then tell your posts page to use a different template, ...
0
votes
1answer
28 views

Template setting is not saving in wordpress

I'm using a child theme. I want to override a template of base theme. I created, articles-page.php which starts with: <?php /* Template Name: Articles */ While creating a page in Wordpress I can ...
0
votes
1answer
34 views

Shortcode to output get_header not working

I'm trying to create a shortcode that will output the contents of one of my template header files. I created the shortcode in my functions.php file function zoo_header(){ return ...
0
votes
2answers
52 views

Display random page

I'd like to display a random page that: has a parent page of X or Y or Z, etc. excludes pages with the title "Contributors" The following code works (though without the specific conditions above), ...
0
votes
1answer
108 views

reCAPTCHA on page template without plugin

I have a template for contact us page which includes a small form with few text fields. I want to add Recaptcha to avoid spams. I already use WP-recaptch plugin which only works for default ...
0
votes
0answers
61 views

Problem with the loop?

I'm customizing my Twenty Twelve theme to show a single posts from two separate categories on my home page using a custom template. Here's my code : <div> <?php $catquery = new ...
1
vote
1answer
36 views

home.php not loading

I have an issue where home.php won't load, so wordpress insists of using index.php to display blog posts. I created home.php by copying the entire content of index.php into home.php. Is there a way to ...
0
votes
0answers
30 views

How to install a wordpress website template on an existing website?

I just downloaded a template called Senna for my website. It's a responsive wordpress template, and I don't have knowledge of how to use wordpress templates. My currently website is html based on ...
1
vote
0answers
142 views

Override a theme's WooCommerce template files with plugin

A plugin I'm working on, has it's own WooCommerce template files which override the default WooCommerce templates. I know I could make a child theme with a woocommerce folder but I'm trying to make ...
0
votes
3answers
80 views

Having some trouble properly displaying Custom Post Types in templates

I have a child theme of Twenty Thirteen and I've setup Custom Post Types for several items. They are showing up in the Dashboard, I can create the Custom Posts and they show up in various categories ...
0
votes
1answer
68 views

How to create a WP theme that use BootStrap? [closed]

I am pretty new in WordPress and totally new in BootStrap development (I have beginning to study BootStrap yesterday) and I have the following doubt about how create a custom WP template that use ...
1
vote
2answers
78 views

Filter to change the content of 404 page

I have created custom rewrite rules. These rules now go to 404 page as expected. I can use action hook template_redirect to change the template matching query_var. But I don't want to create separate ...
0
votes
0answers
65 views

Jetpack Infinite Scroll on archive page

I know, lots of questions have been asked on this topic before, here and elsewhere — but I've spent the entire day working on this issue and scouring the Web for tips on how to use Jetpack's "Infinite ...
0
votes
2answers
66 views

Can I have both front-page.php and index.php?

I've made a custom front-page.php which includes "the loop" and it works great. I would also like to have a separate page which is the regular old posts page you get from index.php. How do I make a ...
0
votes
1answer
21 views

How do I show content from a plugin using the template the site is currently working with?

I am trying to extend the first serious plugin that I am building. I'd like to be able to use it with different sites/templates. At the moment I designed a custom page that I included with the ...
0
votes
2answers
25 views

Apply custom category template to subcategories

Hello on my wordpress site I have a custom template for category A with slug (cat-a). I created a category-cat-a.php file to give this category a custom layout and this works without a problem. I am ...
0
votes
1answer
69 views

How to render the single post template with the post name?

I'm calling pages with Ajax and I have this code in functions.php to determine which page is called and then, render the corresponding template: function ajax_callback() { if( isset( ...
0
votes
0answers
43 views

How do I create a custom archive page that my client can edit?

I've created a custom post type. I have set has_archive as true and understand I could also set it to has_archive => 'ctp' I also know that if I name a template file archive-cpt.php Wordpress will ...
0
votes
3answers
451 views

Woocommerce - Change Variable Product Add to Cart to behave like external product using Custom Field (link)

I am importing affiliate products via XML into Woocommerce. Due to products having variations if I use the External/Affiliate product type I get repetition of product on my front end (eg. same product ...
0
votes
1answer
28 views

What is the template file for topic layouts in bbPress?

The theme I'm using edits the Topic layout in such a way that the role is not being displayed anymore. I'd like to revert those changes in the theme editor, but I can't seem to find the template file ...
0
votes
0answers
43 views

how to assign template from plugin directory to page in wordpress?

I have created one plugin as Store Locator, now i want to create page in wordpress and assign it template on activation of the plugin. the Code is like as follows : $plugin_url = plugins_url('', ...
3
votes
2answers
100 views

When is it appropriate to put functions on page template vs. functions.php?

I'd like to improve my code and on a current theme, I've extended Wordpress with custom post types, metadata, customized user authentication, and a number of other items. Some of these functions ...
0
votes
1answer
145 views

Using Templates with Custom Post Type UI

I'm using this nifty little plugin called Custom Post Type UI to add custom post types to my WordPress site and am having a little trouble working out the best way to apply a page template to my ...
0
votes
1answer
19 views

Displaying year once in category.php [duplicate]

I want to be able to make my category.php display like this: 2013 Title 3 Title 2 Title 1 2012 Title 3 Title 2 Title 1 It's already been done for displaying ALL posts but how do I get it to ...
0
votes
2answers
50 views

taxonomy_template filter do not loads custom taxonomy template properly

I'm using taxonomy_template filter in my plugin to load a template file for custom user taxonomies. This is the code I'm using add_filter( 'taxonomy_template', 'get_custom_taxonomy_template' ); ...
0
votes
2answers
27 views

Unable to paginate a custom page query

I have this code on a page called Categories. <?php /* Template Name: Categories */ get_header(); ?> <section id="primary" class="content-area"> <main id="main" ...
1
vote
2answers
681 views

NextGen Gallery template cache

I've implemented a custom Isotope template for the NextGen Gallery plugin, and I've made changes and bug fixes to the template, but when I refresh the page the template changes have not taken effect. ...
0
votes
1answer
49 views

Sidebar on single.php not showing up

So, my sidebar is working just fine on my blog page: beta.cleantelligent.com/blog However, when you click a single post, I'd like that same sidebar to show up. I am assuming this would be under ...
-1
votes
1answer
25 views

Read more button not working

I want the "read more" button to appear to truncate the blog posts. I tried using the button insert shortcode < !--more-->", but it's not showing up. I've tried everything I know how... Can ...
0
votes
1answer
20 views

Styling own template

I have an own template here where the sidebar looks different than the others: the sidebar is BELOW right the main content and not on the side. My code: <div id="sidebar"><?php echo ...
1
vote
1answer
51 views

Assign single template to multiple custom post types?

I have a number of custom post types that I would like to display with the same template which I have created initially as single-photography.php in my theme. Is there any way to assign this template ...