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

Loading different template on different url of same page

I have successfully add rewrite rule and tag for a page. My page slug is my-page. when my url is mysite.com/my-page then the right template is properly loaded. I have set a custom template for ...
0
votes
1answer
34 views

Show template loaded

Is there any way to see what .php files are being loaded for a particular page? So say I have a page - www.example.com/page - and on it is loading the header.php, sidebar.php, footer.php, and the ...
0
votes
1answer
32 views

How are the HTML classes generated?

I've just created a "full-width" template page for my theme, allowing me to set the width of the site content to maximum if there are no sidebars active. What I've noticed is that this gave me a HTML ...
1
vote
2answers
28 views

Password protecting content in custom template

I'm trying to password protect content in a custom page template, however when i enter the password i assigned in the backend, it doesn't authenticate, instead just reloads the page upon submission. I ...
0
votes
1answer
27 views

Custom template for different post types

I'm struggling to get my head around the correct terminology for posts/templates etc which is making it difficult to find what I'm looking for in Google/on here. Basically, I'd like a user to be able ...
1
vote
1answer
19 views

Plugin templates in which directory

Currently I have a number of custom posts as plugins, which process data and send them to the plugins respective template. I use Roots theme as a basis and currently store my plugin templates in the ...
0
votes
0answers
24 views

why get_header doesn't work twice in a test

I'm trying to test a template. It's working fine individually until I run all the tests altogether and the tests fail. protected function load_template() { do_action( 'template_redirect' ); ...
0
votes
0answers
20 views

Page Templates Used in Custom Post Type

The same question was asked here with no real response. They claim it's not possible but I have used plugins that accomplish this. In WordPress I am having a problem figuring out how to use the ...
0
votes
1answer
11 views

Problem displaying replies as part of author's latest comments on author page

I've based a lot of my method on this thread here I can currently display 5 latest comments on an author template page. I want to display the latest 3 replies from any user for each 'main' comment ...
0
votes
0answers
16 views

What templates does woocommerce.php use? [closed]

I'm using the Engrave-Lite theme, which does not support WooCommerce. So I created a Child Theme and created a woocommerce.php by editing the page.php. So all good. However, I want to edit the ...
0
votes
1answer
24 views

custom template - override plugin template in child theme - issue with scripts

I'm using a custom template for the single-listing.php from WP Listings. I've used my own theme (Canvas by woothemes) single post template, and included the wp-listings code. ...
-1
votes
0answers
14 views

Getting rid of header image that came with Template [closed]

Bought Mojo Themes "Shard" template. In process of modifying it with my own images and Graphics. Header has Shard logo image on same row as Top Menu. Have tried to delete but image is not in my media ...
0
votes
1answer
15 views

Can i exclude certain page templates for a specific role?

Let's say i have two types of templates available when making a Page. "Default template" and "Intermediate template". I have a role called "editor", and i do not want the editor to access the ...
0
votes
0answers
27 views

Where to find the newly created page?

When we customize a theme and create new pages, where can we find them in root folder? I tried it searching a lot, but could not find. Any suggestions?
1
vote
1answer
17 views

Cannot edit style.css from admin panel, because the template is looking for style.min.css

I am trying to edit the style.css file for a Wordpress theme, however the changes I make (via admin or ftp) are not reflected on the site because that is using style.min.css. It is very cumbersome ...
0
votes
1answer
12 views

Page Template with Sidebar Naming Convention?

Is there a common naming convention for page templates? Most themes have a two sidebars: Primary, Secondary And then if I'm not mistaken, these combinations: Page templates: 1 Sidebar, Primary ...
0
votes
1answer
31 views

Custom php file in wordpress

For some purposes i want to have custom php file in my Wordpress that will output content from 3 plugins. This is the PHP code in the file : <div class="wrap"> <div class="sidebar1"> ...
0
votes
0answers
18 views

Search for posts with specific tag inside custom page template

I'm developing a Wordpress blog where there are two custom pages - i.e., different from index.php. In there, there are two albums of photos, with the photos listed on a div above. I've put an input ...
0
votes
0answers
12 views

Adding a hash to a url in .htaccess

I am using a js hash listener to display a modal window if the /hash matches the id of the element. /brands/type/#name-of-product Works fine. However, default WP behavior will match any ...
1
vote
1answer
19 views

Can't format content of Rich Text Editor in Template

I use following functions to add a new rich text editor in admin . add_action( 'add_meta_boxes', 'adding_new_metaabox' ); function adding_new_metaabox() { ...
0
votes
2answers
30 views

How to add custom content to custom taxonomy

I'm currently learning Wordpress. So my theme has a custom post type called portfolio. I'm using this online code to add a custom taxonomy to this portfolio custom type: function ...
0
votes
1answer
20 views

How to display error on specific template?

I know in wp-config.php editing this line: define('WP_DEBUG', true); - on display error define('WP_DEBUG', false); - off display error I just want only display error in specific template or page.
1
vote
1answer
41 views

Stylesheet comment header: Which header names are mandatory? [duplicate]

I've always used the same comment header names in my style.css document. Theme Name, Theme URI, Author etc. For example: /* Theme Name: Example Theme URI: http://example.com Author: John Doe Author ...
-1
votes
1answer
34 views

Template for product-category page [closed]

Where can I find the template that is used for the product-category page? The general template is "page-full.php". But where is the template for the single-product page (single.php?) and the ...
0
votes
1answer
20 views

List all pages using a specific template on a page

I just created a WordPress page called Latest Blog Posts where I want to list, in chronological order, all pages from my website using the template name "Blog". The list should contain the title of ...
-1
votes
2answers
39 views

How do I override plugin templates and stylesheets?

Can I easily override plugin's templates and stylesheets in my child theme or does the plugin have to provide functionalities to do this? I have overridden template files for some of the plugins in ...
-1
votes
2answers
61 views

Custom single template for a specific category

What is the best way (performance & code structure) to create a custom template for a WordPress Post, which belong to a specific category? I realized that you can’t just create single-catname.php. ...
0
votes
1answer
10 views

strange behaviour of template_redirect in IE8

I have implemented page not found with a custom template and used template_redirect for it. add_action("template_redirect", array($this, "redirection_section"), 11); Now everything is working fine ...
0
votes
0answers
9 views

Ouput rel attribute on links in Gallery Shortcode within template file

I've added a gallery into a template file using echo do_shortcode('[gallery link="file" ids="1,2,3,4,5"]' ); When I use just the shortcode within a post I get a rel attribute on the links to the ...
1
vote
1answer
30 views

Conditionally display different images before the content in a page template

A few pages share a common template. Each of these pages need different images placed above the main content area. How do I do this? The images need to appear above the editable region (ie WYSIWYG ...
0
votes
0answers
35 views

Use one template for different custom post types with the same markup

I am wondering how I can create one template for multiple custom post types. How can I achieve this?
0
votes
1answer
9 views

Show a custom template, no matter the page being viewed, if the user is not logged in

I have been tasked with creating a WordPress site where subscriberes (registered by an admin) are unaware of the back-end. I also have to make it so that upon navigation to any page, if the user is ...
0
votes
2answers
46 views

Retrieve post modified date for specific post by post ID

I am looking to use the 'the_modified_date' function to display the date and time of a specific post has been modified. This information will appear in the header of our website on every single page. ...
0
votes
1answer
37 views

get_template_part returns NULL

I am making a one page site. I have a custom loop that is hooked to the navigation so that only the posts, pages that are in the navigation will show up in the loop. I have found that using ...
1
vote
1answer
69 views

Is there a way to set different post templates for parent posts and child posts in the same post type?

After taking a look through the questions suggested to possibly have my answer, I still can not seem to find something that I references the post-template php files. I have two custom post types that ...
-2
votes
2answers
33 views

My homepage's width has reduced and I can´t fix it [closed]

I am creating a site for a friend of mine and I'm having trouble with the width of my homepage. The homepage is set as a full width page but when you view it it only displays about 60% of the span. ...
0
votes
0answers
28 views

How to avoid hardcoded text in a custom page template?

I'm developing a company Website using Wordpress 4. This website needs some special, customized pages - with forms and GET and POST and a lot of stuff, so a lot of PHP code. Now, a CMS' main purpose ...
0
votes
2answers
104 views

create single.php for specific category by category id

I'm trying to create template for specific category with id 1 for example. The template should be applied to all of the pages belongs to this category. So, it should be something like single-1.php. I ...
0
votes
2answers
32 views

Different templates for same content, landing page from different URLs (generic, simple)

I was wondering if anybody has a good idea how to solve this cheap. Assume there are two urls: example.com/portfolio-xyz example.com/portfolios/someidentification ...
0
votes
0answers
28 views

How to generate custom loop indexes

Besides the regular taxonomies, such as category, tag, author, archive, I also have some special indexes to display, such as list of all sticky posts, simple chronological index of all posts, top ...
0
votes
1answer
41 views

How to make my category archive behave like a page

I don't want to use the category page as usual (list of posts). I would like to add more content: text, images, columns. Which is the best solution? Maybe redirect from a category page to a page? ...
0
votes
1answer
33 views

I want to rel=nofollow wordpress images

I have a default theme. When i add media to wordpress site. By default it use simple "a href" tag I want to add attribute "rel=nofollow" to it. Can anybody please point me in right direction?.
0
votes
0answers
23 views

Displaying all posts of a category in a page, using a template?

I am writing a plugin which (among others) wants to display posts of a certain category within a page. While I can do that with the various functions there are available (WP_Query etc) to iterate ...
0
votes
1answer
42 views

Get page id by template

I want to know if it's possible to get the ID of a page with a specific template. Is this possible to get the ID of a page that assigned to "page-special.php"?
0
votes
0answers
40 views

Redirect File Custom Post Pagination Problem

I've created a custom taxonomy type ( gallery-type ) for gallery post type! But, I didn't create for taxonomy-gallery-type.php in my theme folder, but I redirected to another php file from theme ...
0
votes
1answer
24 views

Taxonomy template by post type

I have 2 custom post types that share a taxonomy. The taxonomy template of my taxonomy ( taxonomy-my_tax.php ) will query both custom post types. Is there a way to have a taxonomy template for each ...
0
votes
2answers
41 views

Add Date & Author Meta to Category Archive Page

I want to add author name and date on category pages under Title. Here is the page But i don't how i can edit it ? where i have to go to find category template file. By Googling i found it is ...
0
votes
1answer
34 views

How do i load a different template for different users screen width

How can i load different templates for different screen sizes.Or is there some other method that i load different html for different screen size. Please help!!
0
votes
1answer
21 views

Adding text to the footer of each post based on tags or categories

Several of my posts in the same category have the same footer. I figured it would be much more maintainable if I could move this into a separate location and manage it from a central place. How can ...
0
votes
2answers
42 views

Only One Post of Custom Post Type Appearing on Template Page

I'm not sure if it's a database or template issue, but on this template page only one post of my Custom Post Types are appearing. There should be at least two. The page uses an isotope.js script, but ...