Within the context of WordPress Theme-ing, the term 'template' refers to PHP files used to display content.

learn more… | top users | synonyms (1)

2
votes
0answers
37 views

Loading partial templates with AJAX/PJAX

I am trying to load content using PJAX (basically AJAX with history). So far I have managed to catch PJAX requests and load the correct content. My problem is finding the correct template to use for ...
1
vote
0answers
11 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 ...
1
vote
0answers
133 views

Default 'post' post type archive slug?

I have a wordpress site, which has a front-page.php rendering a custom front page, so that this template will show no matter if WP admin settings is set to static page or show posts. The default ...
1
vote
0answers
31 views

Page template no longer exists - metaboxes won't save

Ok, this is a weird one. I first experienced this on an older theme that I developed - I assumed I had some buggy code in there somewhere, but couldn't figure it out even with the help of another ...
1
vote
0answers
48 views

Plugin templates vs Parent Theme

I've been building a plugin using a WooCommerce like template system, where the plugin houses the default templates, but allows for overriding via a template folder in your active theme. It just ...
1
vote
0answers
194 views

Turning on the 404 page on localhost

I'm using my localhost (XAMPP client) to test my WordPress website and everything works fine, till it comes to verifying how does my 404.php template looks like. I can't preview any changes, because ...
1
vote
0answers
60 views

Search form not finding content in template page

I created some template pages on my wordpress theme and when I'm trying to do search for some words it returns Nothing Found. When I tried to search for words from the posts or normal pages(Not ...
1
vote
0answers
153 views

Checking for page templates in child theme

I have a simple problem I'm hoping someone can shed some light on. I have a child theme with a custom page template and I'm simply trying to check weather or not the template is in use. Under normal ...
1
vote
0answers
114 views

WordPress Not Using Template Files After Permalink Update

I have a really weird issue that just occurred on a client site. I updated the permalink structure from /%category%/%postname%/ to /%postname%/ and suddenly my pages don't respect templates and are ...
1
vote
0answers
460 views

Wordpress custom taxonomy template not working

I installed theCartPress plugin and it created tcp_product_category taxonomy for tcp_product post type. I created a page with custom template to list all the product categories. I can use ...
0
votes
0answers
15 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 ...
0
votes
0answers
15 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
15 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
13 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 ...
0
votes
0answers
25 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
0answers
15 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 ...
0
votes
0answers
15 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 ...
0
votes
0answers
34 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
20 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
26 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
8 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
36 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 ...
0
votes
0answers
44 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
36 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
0answers
10 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
0answers
26 views

How to change post template via url?

I have a single post template (single.php) which displays the title, the abstract, tags, content etc. I made another template (abstract.php) to display only the title and the abstract of the post. ...
0
votes
0answers
20 views

Override theme template for index page

For one of the websites I manage we baked in a lot of custom functionality into the theme we are using. The problem with this is that it's difficult to switch themes. I wanted to decouple this code ...
0
votes
0answers
25 views

ACF Post Object: Wrap every three post objects

How would I go about wrapping every three ACF post objects in a div? <?php if ( get_field( 'featured_posts' ) ): ?> <?php $index = 1; ?> <?php $totalNum = count( ...
0
votes
0answers
27 views

Redirect to different template other than single-custompost.php

I have a custom post portfolio . On test page there are featured images from the custom post When i click on the featured image a popup opens for each post and there is little description and a read ...
0
votes
0answers
20 views

get_header() not defined after using template_include

I'm trying to load a custom template as part of a plugin that creates a custom post type. The template_include filter seems to work, in that it loads the file I'm aiming for, but when the ...
0
votes
0answers
16 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 ...
0
votes
0answers
31 views

Using require_once for parent-directory not working but is working in sub-directories

I'm building a custom theme and I'm attempting to use require_once __DIR__ . '/templates/variables.php' in my footer.php file, to keep from repeating code that contains variable information... I keep ...
0
votes
0answers
28 views

one category template for diferent <option> values and sub categories

I have the default category.php template and my categories structure is like this: category sub1 sub2 sub3 sub4 sub5 Now what I want is on each subcategory to add ...
0
votes
0answers
36 views

Pagination not working for custom category template and custom permalinks

I am using following code in category-20.php, for the pagination through ajax, which is working fine for the defaults permalinks. But when i change the permalinks to custom, then pagination doesn't ...
0
votes
0answers
16 views

remove file plugin include

i use a plugin that include template.php file , i want to replace this with a new one in my template directory or remove it class jqueryTimelinrLoad { public function shortcode($atts, ...
0
votes
0answers
50 views

Using “setup_postdata” with “get_template_part” does not work

I want to reuse code made in a template in a shortcode. I did this in my shortcode $args = array(...); $posts = get_posts($args); for ( $j=0; $j < count($posts); $j++ ) { ...
0
votes
0answers
27 views

Changing page's name after page creation

I have a page, I can't know the name of the page before doing an elaboration with PHP, i thought about changing the page name with javascript after discovering the page name, I have not written the ...
0
votes
0answers
65 views

Assistance with complex query based on ACF Post Object Field

I got the following scenario: Two Custom Post Types: Game Bonus Two Custom Taxonomies (Not Hierarchical ): Game-Type (Poker, Roulette, BlackJack, etc') Bonus-Type (Free Credits, Free Spins, ...
0
votes
0answers
35 views

Custom Homepage As Single Page or Custom Post Type?

Conceptual question for the WP community: I need to implement a custom homepage for a new site. It has some custom stuff going on but nothing too crazy: 4 big images, a carousel, some calls to action ...
0
votes
0answers
64 views

Using get_template_part() to modify single.php for a custom post type

I have a custom post type plugin called shows that has custom meta such as host, time, length, etc. I want to make it theme independent and require minimum coding for it to work across a lot of ...
0
votes
0answers
21 views

Home page template changing on modification from random pages

I'm currently having a major problem using wordpress 3.8.1. Whenever I'm modifying a page, the template on the home page changes to whatever the template of the page I'm modifying is. Home page as its ...
0
votes
0answers
38 views

Child pages in a Custom Post Type are appearing blank

I've registered a CPT with the following: function create_client_post_type() { $labels = array( 'name' => _x( 'Clients', 'Post Type General Name', 'text_domain' ), ...
0
votes
0answers
20 views

creating one page theme but templates are not being applied to page content on the “one”page.

I am creating a one page theme. I have a loop that puts the content from each page on a single page but it does not apply the temple for each individual page. Here is the loop I am using. <?php ...
0
votes
0answers
35 views

How can I stop the content template from grabbing media files?

I am running Wordpress 4.2.2 on localhost Mac OS X Yosemite. I am developing my first theme using underscores, and I am having a problem with the php content loop. I am using the ...
0
votes
0answers
33 views

Parent to another Custom Post Type - Template files not being recognized

I have two custom post types - 'gaming-consoles' and 'xbox-games'. I also have two custom templates for these post types: single-gaming-consoles.php and single-xbox-games.php - which worked great. ...
0
votes
0answers
28 views

Show child theme for users on specific IP

I have some users coming in from a fixed IP range on a very slow connection (256kbps) so want to server them a child theme that has a lot of the bandwidth intensive features removed. For ease of ...
0
votes
0answers
106 views

Get Page ID of blog homepage

my start page in WP shows the latest posts. I added some meta fields to the start page in the WP backend which I want to access before the list of recent posts starts. I try to access the meta values ...
0
votes
0answers
22 views

Define meta fields in a page template

I had an idea for managing fields for page templates and I thought I'd post it here to see if (1) this is terrible and (2) if there's a better way to define the fields in the template. Here's the ...
0
votes
0answers
13 views

Display posts: date of editing

I am from Russia and I have to use Google Translate. I'm sorry ) Does not think like me to build a loop to the pattern on the front page posts to be displayed on the date of editing. Top recently ...
0
votes
0answers
26 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 ...