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
4answers
171 views

Page template not displaying

I dont get why this isnt working. I have a custom page template, page-politics.php. It should look similar to this page: But its displaying this: Ive double, triple checked that the right ...
0
votes
0answers
31 views

wordpress multisite create different author template for mainsite and subsites

I am using authors.php to display authors pages. From my landing page of my WPMU installation I am trying to redirect the author page requests to different template. That is the requests to the ...
0
votes
1answer
31 views

Modify just ONE page based on a template

I am new to wordpress. I have been given a site to customise. I want to modify just one of the pages to include a php calendar which links to a mysql database, so I will want to run my own PHP code ...
0
votes
0answers
20 views

How to use the WordPress header as the global header for apps across a site?

I am running Wordpress as the main site, and a few other php CMS apps for other specific purposes (let me call it subsites for the purpose of this question). Now when designing templates for ...
0
votes
1answer
73 views

Display DISQUS on homepage

I have installed disqus and I want it to show up on my homepage. It replaced the old wordpress comments system on pages and posts but I also want it to appear on index.php my index.php file now - > ...
0
votes
0answers
18 views

Displaying a list of categories ordered by popularity?

I would like to add a list of categories to my template showing only the 5 most popular categories(by number of post views within each category). Is this something easy or would it take heavy ...
0
votes
0answers
105 views

How to create page with lots of dynamic content(AJAX?)

I am setting up a Wordpress-homepage which has a lot of toggled content(sort of like this: https://jqueryui.com/tabs/). So for example I have a list of links on the left side, and a content-container ...
0
votes
1answer
33 views

How can I pull information from my loop and divide them seperately?

I've created a Custom Post Type that I'm trying to implement into a CSS slider. To do this I've created a custom template and added counters to get unique ID's for every new post that get's pulled. ...
0
votes
0answers
72 views

Page attributes missing

(I searched if anyone has same problem but found nothing. So if this is a duplicate question please let me know) My plan was to create a custome-page-template. So I found some tutorials and recognize ...
1
vote
0answers
41 views

Plugin templates vs Parent Theme

I've been building a plugin using a WooCommerce like template system, where the plugin houses the default templates, but allows for overriding via a template folder in your active theme. It just ...
0
votes
1answer
18 views

Taxonomy Parent not showing up in address bar

I created a custom taxonomy successfully and assigned the custom post type as well. It is a hierarchical taxonomy and I added terms in the back in a hierarchical way. I added for instance main ...
0
votes
0answers
19 views

How can I limit posts when using template_redirect?

I'm trying to redirect a query (http://example.com/custom-post-type/?action=create) to a template file (page.php) while also replacing the_content. I've more or less gotten it to work. But the end ...
0
votes
0answers
81 views

different single.php for different page templates

I have 4 page templates with same query. Is it possible to write conditional statement? If I go to single post view (single.php) from page template 1 (page-main.php) display something (for example ...
0
votes
1answer
49 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
51 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
47 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
94 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
34 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
31 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
26 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
59 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
69 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
28 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
125 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
58 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
57 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
32 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
69 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
24 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
125 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
49 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
55 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
31 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
49 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
86 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
278 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
66 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
77 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
37 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
275 views

Override a theme's WooCommerce template files with plugin [closed]

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
104 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
114 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
141 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
112 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
117 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
22 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
37 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
101 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
57 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 ...