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

How do I find out the full path of a page's template?

If I run the following query on the WordPress database, I get a list of templates: select distinct(meta_value) from wp_postmeta where meta_key='_wp_page_template'; The templates that come back are ...
0
votes
1answer
190 views

Assign template to edit address form, billing and shipping (woocommerce)

By default, woocommerce has endpoints for editing billing and shipping addresses. You just have to go to my-account/edit-address/billing/ or my-account/edit-address/shipping. What I want is to use a ...
1
vote
1answer
64 views

Meta description - template code to get category description

Below is the code I wrote for header.php so that the description for a product category can be obtained and used for the <meta> description tag when viewing such a "page" on the site. Is ...
0
votes
0answers
31 views

Load WordPress templates with jQuery load()

I'm working on a dynamic menu that slides up and down when you click on a list item in a secondary menu and it's closed when you scroll or press the 'X' button. The list is declared like this in the ...
0
votes
3answers
44 views

Should template files be copied to the child theme for editing?

I know that the style.css file needs to be copied to the child theme before being edited for changes. Is that also true for template.php files? If so, do I need to just copy the specific template ...
1
vote
2answers
15k views

Show Woocommerce minicart widget in checkout page sidebar? And, how to make this update secure by overriding widget?

Before asking question here I want to tell that I have already asked the question in stackoverflow and wordpress forum but have not got any answer. So finally I came here. I have installed the ...
0
votes
1answer
596 views

Why won't the action hook wp_head accept parameters?

I'm working on a plugin that adds scripting to the head using add_action('wp_head',..); I have to pass a variable to the function to get my desired result. To test this I'm simple "echoing" out ...
0
votes
0answers
24 views

How to add comments on a custom page with URL parameter?

I tried to look for this for several days but I can't find anything. Maybe I'm not using the good "words" so I hope someone we'll guide me in the right way. I am building a custom page with a list of ...
1
vote
1answer
414 views

Create template for taxonomy results limited by Custom Post Type

I've got a Custom Post Type with a Custom Taxonomy set up. So how do I create an archive template to display posts from that CPT, limited by taxonomy? Here's the deal: The CPT is called Shows. Each ...
-4
votes
1answer
44 views

Slider widget not displaying the caption for images

Here is my code for the slider.The place for a caption will appear blank above the image. <div class="slide-caption"> <div class="slide-data"> <a href="<?php // ...
0
votes
0answers
30 views

Submit a Custom Post Type in WordPress from the Front End in Every Category

I want a front-end submission form in my WordPress website. Where this form should be available to each category? I want only two things in the form namely post title and post content. Is there ...
0
votes
1answer
12 views

Access or edit custom generated permalinks with WP_Rewrite

I want to create custom permalinks for my plugin using WP_Rewrite. I found the codex the have great examples and this stack topic also explained a lot to me. Currently I've got the following code ...
0
votes
1answer
33 views

Page template gives 'Parse error: syntax error' when used, but no error found!

I get this message, whenever I activate this page template for one page, for instance about.php : Parse error: syntax error, unexpected end of file in ...
0
votes
2answers
27 views

Wordpress Child Theme Template auth_redirect wrapper

I'm successfully utilizing a child theme in Wordpress. I would like to create a page template that simply forces login for any visits to the pages where this template is in use. (Simply need to add ...
0
votes
3answers
28 views

Custom Content Page

We've made a whole lot of templates for different types of blog posts. However, we also want to do fully custom 'power pages' that do not follow the WordPress theme we are using. These pages would be ...
0
votes
1answer
36 views

How to echo a plugin's function into a template?

I've tried checking for a similar question but couldn't find one. If possible please link me to this as I might be creating a duplicate. Anyways.. I am using a basic testimonial plugin (Clean ...
-3
votes
1answer
34 views

Create a shortcode to display the “the_content ()” in my post [closed]

I should create a shortcode to display the contents of the post in my template. Could someone help me? I made a shortcode to display the form of comments, this just can not unfortunately. Thanks ...
1
vote
1answer
48 views

Updating category template to change how subcategories display

I'm looking to update my category template to display subcategory posts differently than category posts. I'm fairly new to Wordpress template editing but know HTML/CSS well, and PHP enough to ...
1
vote
0answers
22 views

How to use same page template if post status other than 'publish'?

Quick question about relationship between post status and template. If non-logged user tried to access a page(or a post) which status is private or draft (or anything other than publish), how do I ...
0
votes
2answers
59 views

Template filter for custom taxonomy terms

I want to replace custom taxonomy term template with my custom template. Like using add_filter('single_template','customFun'); replaces single custom post type template. I have a custom taxonomy e.g ...
0
votes
0answers
15 views

WPML doesn't recognize WordPress standard template

I am using the WPML translation tool which works for most of the sites of my theme with its page builder (theme "enfold"). However, I have some custom templates like date.php or category-$.php. These ...
0
votes
1answer
94 views

Make child taxonomy categories use a set template

I have a custom taxonomy called product-categories. Currently all categories use the master template (taxonomy-product-categories.php). The category tree is roughly as follows. Products - Cheese -- ...
-2
votes
2answers
50 views

Make default template two columns?

I'm sure this must be super simple, but Google isn't helping me! I am using an up-to-date WordPress and I have a two-column layout on my blog section (content left, Twitter feed right) that I am very ...
1
vote
2answers
47 views

Wordpress Schema.org Markup. What value does it add?

I've been adding all the "recommended" schema.org markup to my sites for awhile now. Most of the schema markup adds value to google searches. There's other markup though that I've been using and I'm ...
40
votes
8answers
44k views

Get name of the current template file

I've found this to display the current name of the file used in template: function get_template_name () { foreach ( debug_backtrace() as $called_file ) { foreach ( $called_file as $index ...
1
vote
1answer
23 views

How to create new post content templates for my users?

I admin a wordpress site for my kids primary school. At the number of editors/contributors is small, but we'd like to expand it. To simplify the uptake for some of the office staff I'd like to have ...
0
votes
0answers
18 views

Developing site locally and “-2” is appearing next to a few custom template URL's

I'm looking for some advice with this as I'm not sure why it's happening or how to fix it. Following the instructions here: Editing the Number at the end of Page URLs / Editing Page Slugs does not fix ...
0
votes
1answer
28 views

How can I get the content of the home page?

I have set my WP site to use a static home page. I created a file in the root of the theme directory called front-page.php and this template is called correctly. I cannot seem to display the content ...
0
votes
0answers
31 views

Display different list of “Custom Templates” for each Custom Page Type

I was wondering if it is possible to categories Custom Page Templates. I would like to display 2 meta boxes which display different templates (which would then only be displayed on page edit screen if ...
0
votes
1answer
51 views

Alternative layout the loop

i'm trying to make an alternative loop as found here on stackexchange, it has been a great help to what i've achieved so far, but i'm stuck now. The goal is to make the newspage look like this The ...
0
votes
0answers
24 views

Wordpress changes not showing

I'm wondering how to fix the website when the changes are not showing instantly? I tried the following fix: Installed W3 Total Cache and Super cache and cleared all the cache on the website Cleared ...
0
votes
0answers
24 views

Rewrite single template permalink?

I have a single template file called single-schools.php. A school "templated" post is reached via the url http://example.com/schools/post. But the site's main language is Swedish, and therefore I want ...
0
votes
0answers
36 views

Removing A Parent Theme Template

There is a template with code that I want to prevent the child theme from loading. All it does is load a little date box. What i've done is duplicate the hierarchy of that template file located in the ...
0
votes
0answers
54 views

Child theme not loading parent layout

I am new to WordPress and I am just trying to help a friend customize his blog. I started doing this via the wp-admin Editor and CSS Editor until I found out this was a big no-no. So I set up a local ...
0
votes
1answer
34 views

Create a variable with string, array or multiple values

I'm running some functions that will allow a user to register their own custom templates to my custom theme from an external directory. They can see these page templates in the wp-admin and they ...
0
votes
0answers
37 views

how to display term name angularjs

I've recently learned about angularjs and I am trying to display a term associated with a specific custom taxonomy. So far this is what I've tried in my partials file - <div ng-repeat="post in ...
1
vote
2answers
49 views

Where is Number of Posts Set?

I'm hoping someone can help me with this seemingly simple problem. This is a custom theme that I've been given, and simply changing the number of displayed posts in the Settings menu is ...
0
votes
3answers
182 views

Give user option to select full post index page or excerpted index?

I am wondering if there is a way to give users the option of choosing between two formats of displaying posts (index/archive/search result template options) - either view full post, or excerpts? So ...
-1
votes
1answer
50 views

What is the difference between style.css and index.php

I have looked through internet but I have failed to understand what is each these files are for.
0
votes
1answer
35 views

Show my custom post id if a country or ip

I explain. When a user wants to see the country come my website, for example my url: my-post-example.html I would like to capture the id and display content with the template, etct I have done in ...
0
votes
2answers
24 views

Hook to get the page template that is in use on the admin page edit screen?

I would like to find out which page template is in use as I only want to enqueue some javascript if the page is using a certain template. Is this possible?
-2
votes
1answer
18 views

How to apply styles to the custom page template

I have made a simple page template according to what is said in the how to here :Page Templates When I create a page and in its 'Page attributes' make the template equal to the one I've created, ...
3
votes
1answer
2k views

How can i change email template for new user

When i add a new customer the email goes to new user in this formate: From: WordPress [wordpress@siteurl.com] Subject: [site name] Your user name and password Message: username: user ...
0
votes
1answer
35 views

Use another theme template in my theme

I want to use a different theme's portfolio page in my theme. I just want the content (portfolio layout of the other theme) but my own (active theme) header, footer, sidebar, and everything else. Is ...
1
vote
2answers
35 views

How do I add a template to a theme using a plugin?

I need a page template to be used with my plugin. I don't need to replace a theme template such as single or archive. Normally I'd use /* * Template Name: Blah Blah Blah */ to add a template to ...
-2
votes
1answer
40 views

Divi Template A Few Questions

I'm new and getting stuck into to WordPress and really like the Elegant Theme Divi option, however I have a few questions I was hoping someone could help with. I do require that the site I build can ...
1
vote
1answer
45 views

Different single page templates for taxonomies

In my WordPress theme I created the custom post type articles. I also created two taxonomies called article & news. How can I display each taxonomy in its own single template? For now it only ...
0
votes
0answers
13 views

dynamic table for post?

I want to display a list of items with pictures and a short description in a table on a wordpress page. The problem is that I want to the main future editor to be able to add new items at the start ...
0
votes
1answer
49 views

Removing calls to noindex() and wp_no_robots()

In the general-template.php file, I have functions (see below – "noindex" & "no robots") that are not allowing Google bots to index the website. I am trying to find the code where these functions ...
4
votes
1answer
7k views

Add custom fields when specific templates are selected

I'm trying to make change to a site where with the current infrastructure isn't great as due to how it's been built over the previous site rather then fresh. I have a section of the site which needs ...