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

I need to develop a one-page design

I know how to add the scrolling effect, I just needed help that how should I code the onePage.php template by which I can handle different themes for the divs i.e. ABOUT, EVENTS ... each div has a ...
2
votes
3answers
97 views

Why aren't my posts showing?

I'm creating a theme for my portfolio site. After a some time of trial and error research and almostss, I'm stuck. It's going to be very minimal site in content, therefore I decided to create a one ...
0
votes
1answer
94 views

How to create tag.php

How do I create a tag.php template that will work for every post that contain tags? I created few Tags like = Food, Drink and Fruit post 1 have Food and Drink tags post 2 have Food and Fruit ...
0
votes
1answer
46 views

Creating a archive for taxonomy terms, not the term results

So I am attempting to build the first page in my navigation hierarchy to choose product categories. I have a custom taxonomy called collections. I would like to create a page that loops through all ...
1
vote
2answers
80 views

Ways to have multiple front-page.php templates that can be swapped out?

I essentially want to create several different front-page.php templates with different loops and layouts and then present an option in the admin panel to select one template on one day and a different ...
3
votes
1answer
193 views

Templates for Custom Post Types and Custom Taxonomies

I am working on a custom theme for a network of sites that are deployed under a WordPress MultiSite installation. Within these theme I create 4 custom post types that have two taxonomies added to all ...
1
vote
2answers
52 views

Where can I access my custom page template?

I understand that to create a new page template, all I have to do is create my custom template (in this case, page-custom.php) file, and save it in wp-content/themes/mytheme/. However, where can I ...
0
votes
0answers
12 views

How to Create Category Template list Subcategory?

im have database category -Category 1 --S1 Category 1 --S1 S1 Category 1 --S2 S1 Category 1 --S2 Category 1 -Category 2 --S1 Category 2 -Category 3 How to create check in Category as: Is go to ...
0
votes
2answers
116 views

Hide Front-End Admin Bar Including 32 px Spacing

I have a custom template and I inserted the following snippet to get rid of the admin bar for the page: function hide_admin_bar(){ return false; } add_filter( 'show_admin_bar', 'hide_admin_bar' ); ...
0
votes
1answer
126 views

How to use wp_terms_checklist() on front end

Getting a Fatal Error using wp_terms_checklist() in one of my advanced search form in Front End. Fatal error: Call to undefined function wp_terms_checklist() With search I got that it's creating ...
0
votes
0answers
59 views

Is this the best way to complete disable category archive pages?

I wanted to disable category archive pages because content in my blog will be presented via a number of pages for which I have custom templates like this: add_action('page_template', ...
0
votes
0answers
62 views

Perform internal redirect in WordPress?

Let say I have an existing page named "bar", e.g. http://www.example.com/bar I want to write a plugin, which when called, will load the content exactly same as bar (not just post_content, but the ...
0
votes
2answers
38 views

Including text at the end of every post

I would like to include some text at the end of every post. Like how some people write "Like my posts? Follow me on twitter!" or something like that. There are some buttons for users to tweet or share ...
0
votes
1answer
83 views

Custom taxonomy template for categories

I have just been reading up alot about custom taxonomy template files, I have a category within a custom taxonomy that needs its own template. I understand about the template heirarchy etc.. and seen ...
0
votes
0answers
32 views

What is the best way to store HTML fragment in WordPress?

Let say I want to store an HTML fragment in WordPress and allow user to update/modify, e.g. site wise notice, what is the best way to store it and present them in a theme? e.g. write a plugin to ...
0
votes
1answer
46 views

Is it possible to call a template file inside wysiwyg editor? And how?

Is it possible to call a template file, say for example mycustomtemplate.php inside the default Wordpress WYSIWYG editor? I had this content. My team (This is my content inside the WYSIWYG) then I ...
0
votes
2answers
45 views

How to make a template for a specific post of a custom post type?

For the Page post type: I can create a logout page in the CMS and create a page-logout.php for its template. I created an Account post type but I can't use account-user-registration.php for a User ...
0
votes
1answer
45 views

Retrieving post ID from current page

I am following the tutorial here. Wordpress Ajax is a bit complicated but this tutorial helped me out a bit. The only question I have is, when I view any page, I want to be able to get the current ...
0
votes
0answers
17 views

Is it possible to create an empty page template and build it choosing between custom components?

I'm quite new to WordPress development and i didn't find much online about this topic (maybe i'm not searching with the right WordPress terminology). I'd like to know if it's possible to have an ...
0
votes
0answers
40 views

Most efficient way to have 1 template for parent, 1 template for child categories?

This is the setup I want: For category-15.php: Child Category A (list of all posts inside) Post A from Child Category A Post B from Child Category A Post C from Child Category A ...
0
votes
2answers
27 views

Comment text area in single blog post and show comments if approved

I'm modifying some existing code and trying to add the ability for user to leave comments on single post and then echo those comments based on approval. I need to add right below <?php ...
0
votes
2answers
42 views

Revamping a Wordpress mirror site - and I don't know where to start!

I have taken on a job at a language school in Spain that has asked me to revamp their website for them. From what I know, the previous designer has done a runner with the details of everything but ...
0
votes
0answers
55 views

How to display custom taxonomy

I have created city taxonomy in back end and i have added mumbai,pune,nashik city in city taxonomy like bellow snipe. My problem is that when i click the city for example mumbai i want display the ...
0
votes
1answer
81 views

How to display custom post types AND regular posts separately on a shared taxonomy archive?

I've looked over numerous questions and answers on problems somewhat related to this but can't seem to find the same situation or solution. I have a custom taxonomy that needs to have an archive page ...
0
votes
1answer
45 views

Add pagination to blog

I want to limit 3 blog entry snippets per page and include pagination for additional pages. Here's what I have so far, but pagination isn't working. <div id="page-content"> ...
0
votes
0answers
14 views

Only display custom fields that are associated with template

I am in a predicament where I have entirely too many custom fields displaying in my admin. Ideally I would like to filter through all custom fields created for my site and only display the ones ...
0
votes
1answer
29 views

Querying multiple taxonomies in URL leads to wrong taxonomy archive

My problem is very basic but so far I have not managed to solve it so I'll just post it here and hope one of you has got an idea. Basically, I have two custom taxonomies "autor" (writer) and ...
0
votes
0answers
125 views

Passing query variables to a custom page template

On my website I have a custom post type called 'theme'. I wanted the homepage to display an archive of themes. For this the only approach that I could think of was to create a page template with a ...
6
votes
3answers
246 views

Is it possible to override the result of get_template_part()?

I'm working on a child theme, I strongly prefer not to override the main template files in order to maintain simplicity of the child theme as well as minimize the amount of code and maintenance over ...
0
votes
1answer
435 views

How do I update WooCommerce template files in my theme? [closed]

WordPress beginner here - my site seems to have some outdated template files which I think are the cause of some functionality issues the site is experiencing. Particularly, there are bundled ...
0
votes
2answers
83 views

Display subcategories selectbox on each category page

I want to display a select box to switch to SUBCATEGORIES of the current CATEGORY when i'm on a category page. I've the following category structure Category 1 Subcategory 1 Subcategory 2 ...
0
votes
1answer
45 views

Tell WP to use a specific template file in posts

I've searched everywhere and tried a couple plugins with no success. I'm using WP 3.9.1. I have to create different ways to show my posts. If they are "standard" they use the single-post.php. That's ...
2
votes
1answer
87 views

Create separate template for shared custom taxonomy with shared terms

I have created custom taxonomy called "product_category", it has been shared with post type "books" and "movies" . So I need to create a different template for both post types. Both the templates' ...
0
votes
1answer
70 views

Theme settings Page: Settings Api vs Update_Options

I’m a new WordPress developer trying to start a carrier selling Premium Themes. In the last week, I’ve been confronted to many difficulties trying to understand how to create a theme options page. At ...
0
votes
0answers
11 views

How to fix missing information in a wordpress feed?

I am a new wordpress developer maintaining an existing site. The site has a custom template. If I go to mysite/mytemplate/feed I get a feed of that template -- except that one of the fields is empty. ...
0
votes
1answer
33 views

more tag in the $post->content when get_pages were used

I used get_pages() to get the content of the child pages of a page. Although the excerpt can also be an answer but is there any other way to display the contents of the page before the more tag when I ...
0
votes
1answer
38 views

Multiple pages to show posts

I don't have any code or pages to show yet so I'll just have to describe my question. I have group of posts, no categories or taxnomoy yet. On my home page I have a 'View all posts' link that is ...
0
votes
3answers
84 views

How can I see what template parts are being called for rendering the viewable page?

I have a theme where the developer used get_tempalate_part() a lot, and these parts are scattered across theme subdirectories as well as in directories in a plugin that was created to assist with the ...
0
votes
1answer
47 views

Custom SINGLE page with custom metaboxes and custom template

I run in this situation where I must create complex contacts page with custom template, custom meta boxes. I know how to make custom post type, add meta boxes and display all information in custom ...
0
votes
1answer
48 views

How to finish this loop?

I had already asked a question of how to get only get the child pages of a parent page that belonged to a certain taxonomy. A very helpful user gave me the answer to this, however, I was not provided ...
0
votes
0answers
86 views

Include Wordpress Page in TWIG Template File

A programmer recently converted my Wordpress site to the TWIG engine and I am having a great deal of difficulty trying to include the contents of a page in the template. Below is my TWIG file for a ...
0
votes
1answer
29 views

Is there an action hook that fires just before a template is loaded?

I'm looking for an action hook that occurs just before a template is parsed but AFTER the query has run and the variables are present. So if it's going to run index.php, just before it starts reading ...
0
votes
2answers
14 views

Get markup for post without loading into the template

I am writing a shortcode plugin that displays posts according to some parameters passed into the shortcode. I have the wp_query to get the posts and now I am trying to get the markup for the posts ...
3
votes
1answer
153 views

How to stop wordpress to make the default query?

My goal is a redirect to a custom template based on some new rewrite rule, but without having wordpress to make unusefull queries. my code: function add_rewrite_rules() { add_rewrite_rule( ...
0
votes
1answer
49 views

Setting a homepage - doesn't seem to work

have a page (home) that runs a template page-home.php that I can access at mydomin.com/home. I am wanting to have this as my static homepage page, so accessible at mydomain.com/ however I cannot seem ...
-1
votes
1answer
17 views

Tag page that displays specific posts

How would I go about coding a generic tag.php page that displays all the posts with a specific tag? For example, if I navigate to example.com/tag/your-tag, it should display all posts with the tag ...
1
vote
1answer
47 views

How WordPress is able to change locale without using setlocale

In my plugin I print out the current locales via $originalLocales = explode(";", setlocale(LC_ALL, 0)); var_export($originalLocales);die; Obviously the result is same as the WPLANGdefined. ...
0
votes
2answers
118 views

Display posts of child category in template

I have a custom post type called freebies. I want to use the archive-freebies.php for the child categories also. I have added in my functions.php the following: function inherit_template() { if ...
0
votes
0answers
28 views

How to include and handle more or less static text blocks/columns in a template

I have a front-page.php template, which contains dynamic content pulled from custom post types (like dates and quotes) but also more or less static text blocks in several sections alongside. The text ...
0
votes
1answer
187 views

How to set global variables in template page?

I know this works. In functions.php do: $variable = "value"; and in header.php use: global $variable; echo $variable; Is it possible to set a global variable in template page or include php ...