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

Override Wordpress Timber Template locations for Woocommerce

I need to overwrite the page template locations for Woocommerce using timber Wordpress. To change the location for the twig files was no problem. All page Templates are stored in the theme root ...
0
votes
0answers
32 views

wp_enqueue_scripts - force .js file to be last included file after plugin js files

I need to include a custom jquery script and need this to run after everything else. I have included it using the following code in the functions.php file: function add_custom_scripts() { ...
0
votes
0answers
17 views

How to change standart wp li element for wp_nav_menu

How can i change Li element of wp_nav_menu with Walker i found some code, but don't udnerstand it yet, where can i input my own li with class here is code class Description_Walker extends ...
0
votes
1answer
19 views

How to create a template to show child terms of a MAIN taxonomy

I've registered a custom post type called video, like so: add_action( 'init', 'create_post_type' ); function create_post_type() { // Videos Post-Type $labels = array( 'name' ...
0
votes
1answer
55 views

Templates for hierarchical custom post type

I'm a bit confused with templates for custom post types defined as hierarchical. I've got a CPT set to hierarchical, not strictly in order to have a nested hierarchy, but so that they can be ordered ...
0
votes
0answers
50 views

Home Layout Odd Number Grid and Even Number Grid

Does anyone know how to create or a template or theme of what is right or it could create a Home layout like this? (only using 1 theme) Layout with images of an odd number (1,3,5), Layout with images ...
0
votes
0answers
42 views

Wordpress override template hierarchy

add_filter( 'template_include', 'my_callback' ); this filter returns what template is there and what will be used, but i need to have all tries for finding template in template hierarchy, ...
0
votes
2answers
37 views

wp_enqueue_style and different styles for blog template

I have a front-page.php to create the index page template and a page-blog.php to create the blog template. My styles are added using wp_enqueue_style in my functions.php, but I'd like to use different ...
0
votes
0answers
65 views

Use custom taxonomy to filter posts dynamically in widget

I am making a travel agency website for a client. I am making a widget that will show related packages (a custom post type) for whichever location page they're on. My results show that the widget ...
0
votes
0answers
27 views

Language part of website under construction .htaccess

I use in functions.php this code to make the English part of the website invisible for non-administrators (under construction) : add_filter( 'template_include', 'gdw_uc_template' ); function ...
0
votes
0answers
22 views

Notification errors in template

I need to show some error messages in my template profile.php. In functions.php I have: if ( ! empty( $_POST ) && ! empty( $_POST['action'] ) && $_POST['action'] == "profile" ...
0
votes
1answer
55 views

Pagination shows Same posts

I made a custom template and I want to show all posts from certain category in this template excluding some ,I am getting as per desired but pagination shows same posts whether I am on 1st page or ...
-1
votes
1answer
68 views

Which template file to edit to edit homepage in Mystile [closed]

The homepage I'm using is not a static page, and I'm currently trying to add a content slider to it using master slider. I'm not too sure which file the homepage takes on as it's template, so I'm not ...
0
votes
1answer
30 views

us states dropdown function and echo in theme template files

This may seem like a stupid question but for whatever reason I cant find an answer that works for me.. -- I am trying to create a simple html drop down function in functions.php so I can then echo it ...
0
votes
1answer
20 views

Unable to render custom field after attempt to generate a list of recent post in page template

When I try to render a list of recent post type either by using WP functions or WP query, I'm not able to render the custom fields that I have to render bit after. The content of box with class ...
2
votes
1answer
62 views

Creating a template using a specific slug name, for a page with a parent page

I have always preffered to create layout templates for specific pages by creating a filename the same as the slug. So for example: Page Title: Contact Us Page Slug: contact-us Filename of template ...
0
votes
1answer
31 views

custom template only for content

I've been trying to get into wordpress plugin development but I still haven't figured out how to customize just one part of the template, I've seen the single-{post-type}.php method, but this changes ...
0
votes
0answers
41 views

Wordpress using custom template for sub-sub-category and posts within

I have created a big common category "Catalog" ($category->cat_ID = 2). It contains a few sub-categories like "Series1", "Series2" and so on. Every sub-category contains a few sub-sub-categories ...
1
vote
0answers
17 views

link to non-category page routed to category template

Working on a theme I was surprised when a link to an about page (about is not a category) is routed to the category template. Why is this so? The template file for the about page is default. Then I ...
0
votes
1answer
64 views

Where to find the code used to render a page that has a shortcode and a template defined?

I'm new to WP and trying to configure the 'My Account' page on a WP site. The site uses the Paid Memberships Pro (PMP) plugin. In the WP admin console > Pages, there is a page called 'My Account'. ...
0
votes
2answers
36 views

Using if statement in index.php instead of creating separate template files

I've to add just a line when the user clicks on a category link or search for something, so I thought to do something like this inside the index.php instead of creating other template file like ...
1
vote
1answer
54 views

WP Post Template - Templates in own folder

I am using the plugin: WP Post Template which allows me to use templates for custom post types. At present the plugin watches the theme root directory for pages with: <?php /** * WP Post ...
0
votes
0answers
19 views

Custom template bypassing to pager to index.php

I have custom layout and its a template page, but for some strange reason, the custom template is loading up index.php. I double checked in my editor, the template is selected correctly, still it ...
0
votes
0answers
59 views

Show product category in order email

requesting help with woocommerce... when customer orders something he receives an e-mail and owner of the shop receives an email too. There is the name of a product customer has bought. I want to add ...
0
votes
0answers
20 views

How to Display Subcategories and its Latest Post as sections or modules under the Parent Category

I want to achieve the following: When in the parent category display as follows: Parent Category Title Parent Category Description Child Category #1 Post#1 Post#2 Post#3 Child ...
1
vote
1answer
74 views

Load specific page template based on URI

I have a page template that I want to load, when ever my $_SERVER['REQUEST_URI'] is like this, www.site.com/link/147 where the number 147 will be variable. i.e. I would like a call a page template, ...
0
votes
0answers
35 views

2 different templates for 1 query

I have a working query with some custom meta fields (among others ACF Gallery field) which displays news on "News" page. I have also second page named "Gallery" which is quering posts by gallery ...
0
votes
1answer
48 views

URL rewrite before template_redirect called

Logic I have a page template at /blog that contains a "public" blog. I have a page template at /members that is members area. If a user enters the URL /members/blog I want to catch this in the ...
0
votes
0answers
42 views

Some Linked Pages work only if user refreshes

Since I tried to add soje and some pages won't load unless the user makes a refresh. The website is http://sharepopup.it/wp An example is the login: On the menu "ACCEDI" the user can click on ...
1
vote
0answers
152 views

How to Use Twig + Timber with Multiple Loops based on Meta Key Value

So, I've got a custom field (meta_key) 'premium' with some posts (meta_value) set to '1'. I would like to display all of the premium posts above the the others. I imagine this would be done using ...
1
vote
1answer
115 views

Display Password Protected external RSS in wordpress template

I am using the below code to show external rss feed in my wordpress blog page template: <?php include_once(ABSPATH . WPINC . '/rss.php'); $rss = ...
0
votes
1answer
64 views

Getting term description in single post template

I have custom posts called 'esitykset' and it has custom taxonomy 'tapahtumat'. Now I have been trying to get the description on one of the term in 'tapahtumat' taxonomy and i have no idea why it is ...
0
votes
1answer
45 views

Show Templates in Custom Post Type Editor

I know I can use templates for my custom post types like this: http://codex.wordpress.org/Post_Types#Template_Files But I would like to have a dropdown menu to choose a template, like that when you ...
0
votes
1answer
35 views

Handling single.php in Multisite

I'm using sub directories for my WordPress multisite, posts are controlled with single.php. How can instruct single.php to use a different header and footer file for the site in the sub directory? I ...
0
votes
1answer
37 views

Returning One custom taxonomy term name

I have a custom taxonomy called cities and right now the only city is las vegas. I am trying to use the code in question to echo "Las Vegas" - for the posts that are associated - on the search results ...
0
votes
1answer
85 views

Is the “_s” on this `sprintf(__('Page %s', '_s'), max($paged, $page))` just refer to a text domain?

Is the '_s' value in such code which can be found on Customizing with the filter, just refer to a string of a text domain as what's documented or a literal value? /** * Filters wp_title to print a ...
0
votes
0answers
42 views

Template file structure , wordpress hook for altering the template

i need to convert a html structure to theme. So this is my html structure <html> <head> ................. </head> <body> <div class="main"> <div ...
0
votes
0answers
23 views

Wordpress and copying / pasting contents from tables

I have a quick question, got a client who wants to have a Wp site and then from her old site, she wants me to copy/paste her contents in the new one, but just noticed that all her contents is ...
0
votes
0answers
175 views

Dynamically generated breadcrumb functions for category.php

BACKGROUND: I want to create a template page (using template.php) for news articles. News articles fall into about 7 different categories (Local, Special Events, Tech, etc). The template will use ...
0
votes
0answers
15 views

two author templates for same user

Is it possible to have two author´s templates? I have a list of registered users and when visitor clicks on a user name (user 1) it takes them to a public profile of that person using author.php. Is ...
0
votes
0answers
85 views

Use different file includes for single.php

I'm beginning to convet html to Wordpress, I've some problem in single.php to show the post with different headers because mysite use in English and Arabic language. My site containings Arabic and ...
1
vote
1answer
37 views

Load an url with minimal/no DB queries

What would be an ok way to load a theme template with minimal/no db queries? Another question: is it viable to 'dry' load a non-wordpress template using rewrite rules? So instead of index.php?p=1011 ...
0
votes
1answer
75 views

single.php being ignored, going straight to attachment.php

All of a sudden, for no reason I can tell, my single.php template is being ignored and falling back to using attachment.php If I switch permalinks to use the ?p=123 style, then it works perfectly. As ...
1
vote
2answers
58 views

how to make a home page for wordpress custom theme

How does we create a custom home page for word press theme like used in themes for theme forest market. Because mostly the home page is used for recent posts to be shown, but I am having no idea how ...
0
votes
0answers
61 views

Creating a popup

I'm starting in plugin development for wordpress. I have a php script that outputs to pdf in my plugin. I am trying to figure out two things: How do I present the page without the wordpress ...
0
votes
0answers
96 views

display different pages content on single page

I am creating parallax website in wordpress, for this I am using html5blank-stable template. For my different sections, like about us, and contact etc I have created pages with respect to them. But as ...
0
votes
1answer
75 views

How to change single custom post template by custom taxonomy?

Working on a publication (wordpress based) website, having a custom post type "article" with custom taxonomy : language (with only two options: French, English). I made a custom post type template ...
0
votes
1answer
14 views

template structure for CPT not clear

I am a little confused with CPT and custom taxonomies. I created CPT named 'Profiles' and did not create any custom taxonomies for it. So categories is the default taxonomy for it, I tried template, ...
0
votes
0answers
12 views

Template included with plugin doesn't return all posts for custom taxonomy

I'm in the process of developing a plugin with a custom page template (using template_include) with a loop that retrieves all posts with a custom taxonomy. I tested the code using the same templates ...
0
votes
1answer
71 views

How to assign a class to a page with a custom template?

I tried with the bellow code to assign a body class to a page with a custom template, but this didn't work. What is wrong here? function prefix_conditional_body_class($classes) { if ( ...