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
0answers
26 views

Editor Style when using diferent Page Templates

I created two templates on my WP theme, one with full-width and other with a sidebar. Like this: template-fullwidth.php <main id="content" class="main <?php echo storms_classes_page_full(); ?&...
1
vote
0answers
15 views

Print shortcode in defined area

I would like to make shortcake to work that it would be possible to print in certain areas (sidebar, footer or normally in content). In templates I have two places with do_shortcode function (sidebar ...
0
votes
0answers
146 views

Use Woocommerce Ajax Product Filter in Userpro template page

I have Woocommerce and YITH Woocommerce AJAX Product Filter installed and I'm using it with Userpro and custom templates for both. I want to show product filters in Userpro user profile page by widget,...
1
vote
1answer
58 views

Filter widget outputs

I've been trying to find a good solution for my problem, but I can't seem to find anything on this topic at all. I've got a custom sidebar, created by using register_sidebar and I've used wordpress's ...
0
votes
2answers
67 views

Child theme template file will not load

I have a child theme that will load my style.css file but will not load my php template file. I got this template file by copying and pasting it from the parent directory into a new file with the ...
-2
votes
1answer
122 views

<head> files disappearing from template

I have a site (link below), that every now and again, a bunch of the CSS of JS links in the head, simply disappear from the template (when i view source, they are not there). this of course means that ...
1
vote
1answer
23 views

Conditional tags or Multiple files

If the official themes and Underscores are some sort of a guide, one would notice that multiple files with little differences are preferred over conditional tags (archive.php, search.php, category.php,...
11
votes
2answers
726 views

To close or not to close php

I have read that it is advised (especially with php 7) to not close the php files with ?> Many of my WP php files end like this: <?php get_sidebar(); ?> <?php get_footer(); ?> ...
1
vote
1answer
238 views

Override mini-cart.php from plugin

(Its not the cache thing) Im creating a plugin that among other things modifies woocommerce template files. Before i placed woocommerce overrides in child theme. But i want to move it to the plugin to ...
0
votes
0answers
25 views

Create page outside/without administration, inside theme

Is it possible to create a page/php-file (eg. schools.php) that is based inside my theme. And reached with the url: http://example.com/schools. And that the page uses WP system, so I can include ...
0
votes
0answers
28 views

Style only one category product different

I want my page of my categories, electronic, to be different from the other category pages. Is it possible? How?
0
votes
1answer
22 views

Post not showing in my custom advanced search

I've created a custom-search-page for my theme that have to search in my CPT non-hierarchical taxonomy and eventually filter the results if some preference is inserted through the options form of ...
2
votes
1answer
1k 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
1answer
69 views

Child theme Page Template not loading

I've currently setup a multilingual multisite. But one page isn't picking up the parents page template. Working: http://www.jeroenbrugman.com/contact Not working: http://www.jeroenbrugman.com/en/...
2
votes
3answers
5k views
0
votes
1answer
37 views

Theme Dev | Convert Template to Theme

What is the solution in theme development for section in this template Home Page so user can edit from admin panel. "Main Features" Section, at bottom of slider, it says "Strong Structure", "Global ...
0
votes
2answers
27 views

get_month_link uses what wordpress template?

I tried using archive.php and category.php but always index.php is used of my template. How can I customize what template file is used?
0
votes
1answer
34 views

Retrieve a custom form field modified by a filter

I use a 3rd party plugin that creates a form with some fields. I want to use one of these fields in one of my templates. Is there a way to do this? UPDATE I found a solution, see the accepted answer....
0
votes
1answer
142 views

Load different single.php templates according to post layout selection

I have created a way of choosing different layouts for posts(sidebar right, sidebar left, full width). This is done through a meta box that displays radio buttons with an image for each layout type. ...
0
votes
1answer
47 views

Category Template - to be editable from the backend?

I have different categories that includes posts of the category. I want to add text and images before or after the posts of the categories are displayed on the frontend. I want to solve this via ...
1
vote
3answers
2k views

Sub category templates

I've inherited a Wordpress site that my company built before I started working here. I would go and ask this question of the guy who built it, but he has now left the company. My query relates to ...
0
votes
1answer
51 views

Splitting the_content() by size?

I have a situation where users don't want to format quotes in post body and want to just paste their content, assign a quote in a custom field, and the template will now render the quote when viewing ...
0
votes
2answers
21 views

Adding wrapper elements in the_date() like in the_title()?

So this works: the_title( '<h1 class="entry-title">', '</h1>' ); But this does not: the_date( '<h4 class="entry-date">', '</h4>' ); I don't know enough if this is ...
0
votes
2answers
1k views

add_rewrite_rule and template redirect not working

I have the following pairs: add_rewrite_rule('^questions/ask/?','index.php?pagename=ask','top'); if(is_page('ask')){ $tname = 'add-question.php'; if(file_exists(TEMPLATEPATH.'/'.$...
3
votes
2answers
101 views

Taxonomy Templates… by hierarchical level?

I'm wondering if there's a way to specify by filename different templates for different levels within a hierarchical taxonomy. I know about taxonomy-taxonomyname.php and taxonomy-taxonomyname-term.php ...
5
votes
4answers
5k 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 ...
0
votes
1answer
3k views

Broken theme, template is missing

I'm beginning to learn theme creation, so I have created a simple theme: my_theme css style.css images logo.png index.php Why does it appear as a broken theme ("missing ...
0
votes
1answer
19 views

How do you assign custom template for Posts page (under Front page displays setting)

How do you assign custom template for Posts page (under Front page displays setting)? Settings > Reading in backend. I notice once I set Posts page to specific page, the Template dropdown on edit ...
0
votes
1answer
56 views

Loading a template for a URL pattern

I am creating gallery pages for events and csr-events custom post type. Now it has three types of pages: www.example.com/gallery www.example.com/gallery/events www.example.com/gallery/csr-events ...
-1
votes
1answer
40 views

PHP Button Custom link [closed]

At this part of code of a wp template I want to change the permalink url of the "Book Now" button to custom link example: "www.mywebsite.com" byt_render_field("description clearfix", "", "", $...
7
votes
2answers
274 views

Why do templates contain so many PHP tag pairs?

I have some PHP experience, but hardly any WP theme writing experience...I'm just starting the journey. All of the themes I have looked at so far in the .org repository have code that looks like this:...
0
votes
1answer
163 views

WooCommerce - Print Processing orders [closed]

On our WooCommerce webshop we have an PHP page that generates the processing orders. Now I need to show the SKU in the table, but I don't know how to do that :) Below is an example of the page as it ...
0
votes
1answer
14 views

Cant pull in featured Image

I have 6 posts with a featured image set for each. I have created a template file called portfolio-template.php. I have set the portfolio page to use that template file. Inside portfolio-template.php ...
0
votes
1answer
95 views

the_content() not showing full posts in category template

i want to show the full posts in category archive page, i put the_content() in the category template (content.php) <article id="post-<?php the_ID(); ?>" <?php post_class( 'entry' ); ?>&...
1
vote
2answers
120 views

Searching multiple tags and adding jQuery dependant script onto page template?

I have this simple javascript file for checking boxes in a tree view menu: treeview.js $(".acidjs-css3-treeview").delegate("label input:checkbox", "change", function() { var checkbox = $(...
0
votes
0answers
33 views

Change menu order in Restaurateur theme

I have installed a theme called Restaurateur, which includes a "Restaurateur Menu Item CPT" plugin that displays a menu page with fast food categories and meals. When you load the site, all meals are ...
1
vote
1answer
71 views

Custom field value not saving when it contains a URL?

I implemented a custom field into one of my post formats called 'url'. When I enter a random string of characters into the field, it saves just fine and I display it in my template like this: <h2&...
1
vote
1answer
79 views

Check if a menu is empty?

I have menus set corresponding to a custom field on a page. Ie I have menu1, menu2, and menu3 on three pages under custom field => MenuName. Under functions.php I have: /* Add Menu Locations */ ...
1
vote
2answers
3k views

How to add a “ waiting” icon for an ajax in WP frontend?

This is my search js code for processing search : jQuery(document).ready(function($){ $('#searchsubmit').click(function(e){ e.preventDefault(); var searchval = $('#s').val(); //...
0
votes
0answers
27 views

Loop returns more items than exist?

Using the answer here: http://wordpress.stackexchange.com/a/207601/45709 exact works as it is intended. It returns 3 slides because only three slides exist. I had to slightly modify the code because ...
1
vote
1answer
69 views

How to loop over custom fields in a page template?

I was originally using a single field and things worked perfectly with the following code. Now I need to alter it to loop of several fields that are similar. To start: I've created several custom ...
3
votes
4answers
9k views

Load entire NextGEN gallery from single thumbnail?

I'm using Alex Rabe's NextGEN Gallery in a lot of client sites as a centralized image repository, and am finding I often need to load an entire gallery into a lightbox (invoked via a single thumbnail),...
0
votes
1answer
142 views

Gravity Forms merge tags in templates?

Is there a way to put Gravity Forms merge tags in template.php files or other sections of the website? A plugin maybe? I need to retrieve a field value from one of my Gravity Forms and use it in the ...
0
votes
1answer
27 views

Template code to split a post and print a custom field?

So I want a blog post but in the center of every blog post I want to split the content and print a custom field attached to the blog post type. Ie you field called "Blog Quote" and the user will ...
0
votes
2answers
29 views

Problem retrieving custom field for a custom post type

I am using the code below in a page template. I have a custom post type of BOOK and there are 2 categories, author and contributor. My aim is to display the books in author category first, then ...
0
votes
1answer
42 views

How to set custom homepage via a plugin

I am developing a plugin movie database plugin and i want set few custom templates to wordpress theme using the plugin. how can I achieve this?
1
vote
0answers
30 views

Page with page template not using template in Preview

I am using a page template created by myself, which is showing and working correctly in page backend. It also works on the front end. The problem: Preview shows the normal "page.php" instead of ...
1
vote
0answers
27 views

Adding Page Templates to post but it ignored it

I follow the post to add the template metabox to a custom post type's editor, but it doesn't work. When I visit the post, it shows "NOT FOUND ANY POST" which looks like index.php or single.php ...
0
votes
0answers
10 views

List Taxonomy name of item with 2nd tax filter

I'm not even sure where to begin, or if what I'm requesting is possible. Here's the situation: I'm using a sermon plugin for a church website. (Sermon Manager). There are custom taxonomies for Series ...
0
votes
2answers
128 views

How To Create WooCommerce Custom Template For Specific Product?

I know this may be slightly off topic, but this really is the best place to ask a question related to WooCommerce & WordPress. I've search high and low for an answer to this question and there ...