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
48 views

Loop through custom posts by taxonomy and display the titles in a list, it is repeating 8 times

I have been messing with this for too long after searching the internet through what seems like hundreds of posts and the codex. I feel like I almost have it but am missing something. My limited ...
1
vote
1answer
26 views

How to customize core admin pages within a theme?

Say I'm building a WordPress theme, and when this theme is active I want to display customized versions of some admin pages. Let's suppose I want a custom "Widgets" page: I can find the template for ...
0
votes
1answer
42 views

Using page-something.php as static front page

I have created 2 pages inside wordpress "blog" and "hpage", on the config I have set static front page to "hpage" as initial page and "blog" for posts index. Now I want to create a "page-hpage.php" ...
0
votes
0answers
18 views

Multisite static homepage won’t change template on sub sites

I'm having a problem with WP Multisite. I'm trying to make the home page of my sub sites use the landing page template, but every time I choose the specific page as my home page on settings, it ...
0
votes
0answers
17 views

Best Practice - Multiple Templates & append Posts

I'm new to Wordpress and I've Html/Js/Php Knowledge. May I know is this a correct way to develop a custom theme site? I will have multiple templates files like : home,about,contact-us templates ...
1
vote
1answer
47 views

How do i change page template in bulk?

Googled for a long time, but did not find any solution. The case is - I have 950 pages I'd like to switch to other template. If i do it manually - it will take some time. If I do it via admin panel - ...
0
votes
0answers
22 views

Real Time Page Template Preview in WP Admin

I'm a little afraid to ask this question on Stack Exchange as it could be "off topic". I use many different page templates for a marketing sites 'landing pages', as these templates are re-used I ...
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(); ?&...
0
votes
2answers
62 views

Creating page-templates directory breaks everything!

I decided to organize my work in FTP because I've got over 25 templates by now and the list of files/directories in theme's root is getting really long. I stumbled on article where I learned that ...
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
145 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
56 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 ...
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
725 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(); ?> ...
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?
-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 ...
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 ...
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
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/...
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
139 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
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
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 ...
3
votes
2answers
99 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 ...
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 ...
-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
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 ...
0
votes
1answer
159 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
0answers
211 views

How to call function in functions.php in external file inside same theme?

I'm trying to develop a theme by my self. In my theme, I have a function inside functions.php and a php file named ajax.php. I was trying to call a function inside functions.php in ajax.php, but 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
94 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
119 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
77 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
1answer
70 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&...
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 ...
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 ...
1
vote
1answer
234 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
1answer
138 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
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 ...
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
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?
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
0answers
55 views

Display the post on page scroll and auto update URL

I have to create a page template on which I can show all the posts by category when scrolling down the page; here is an example. My theme index page code is: do_action( 'st_theme_init' ); get_header(...
0
votes
2answers
123 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 ...