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
161 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
28 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
67 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
142 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 ...
0
votes
0answers
27 views

How to decouple custom post types components from template?

I am in my early stage on learning wp development and tried something "simple". To manage some custom entities in my back-end and try to display them in front-end. So what i did was: Created custom ...
0
votes
1answer
33 views

!= and !== both not always working? [closed]

In multiple wp templates i use !== in a IF statement, but i found that this code is not working in 1 template. I changed it to != and now it works. My question is are both the same if statements and ...
0
votes
1answer
35 views

Locating the template behind a WordPress Page

Is there a way to tell from a WordPress page what template the page was built from. In my case, there's a page at mysite.com/checkout and I happen to know that the template used to build this page ...
0
votes
0answers
24 views

Author predefined templates

Is there some way in WordPress to "templatize" the page published by each author on the website? For instance, I would want each post to have a video compulsorily, and will be incorporating a YouTube ...
0
votes
2answers
28 views

Hide a specific post from a page template

I am trying to hide a specific post from a page template? Does anyone have experience with this, would prefer to not have to use a plugin. Was thinking of using wp_post ID but am unsure of how to go ...
0
votes
1answer
12 views

Editing the tag pages and using templates

Pretty simple question, but probably with a complex answer. I was wondering if there is a possiblity to customize a certain tag's page. I have a website where we I post music, and I tag the artists ...
0
votes
1answer
60 views

Define PHP variable from a seperate API if statement

I am trying to put together a function that will echo certain text based on a range of numbers. One of number(s) I am trying to compare against is echoed in my template as such -- <?php if ( ...
0
votes
1answer
19 views

Displaying a list of Contacts

I would like to list contacts, and I'm unsure how I should do this. Which method should I use "Theme Customization API " or "custom post type"? My contact page would look like this: <h1>Title ...
1
vote
1answer
57 views

Use touch_time() on front-end form via plugin

I'm working on a plug-in that let people create posts from front-end form. I want to add date&time fields in the form using touch_time() but don't know how to use it on front-end. I have <div ...
0
votes
1answer
40 views

Add pagination to a template loaded by query variable

I have set a query_var,called men, which loads a custom template displaying men's clothes. The rewrite rule is as follows: add_rewrite_rule('collection/men/?$','index.php?post_type=collection&men=...
2
votes
4answers
102 views

WordPress Template Hierarchy

Hi I have question about file names. If I have custom post type, and for template I can create for example single-portfolio.php and get content of portfolio posts into this file, but i need to get ...
0
votes
1answer
46 views

Dynamically Insert Image Into Stylesheet

Let's say I have a banner image I want to act as a background cover. Users manually upload their image with the Media library, which then associates that image with the post (image is handled using ...
0
votes
1answer
26 views

Access methods in plugin template

I'm new to PHP and trying to learn my way through Wordpress. Within my theme's functions.php file, I wanted to access a method available inside bbPress's plugin template.php file. I'm getting "...
0
votes
2answers
455 views

Apply template to custom post type

Today I got a client that wanted custom template for each page and section within. I proposed Laravel custom sh3t, but he wanted WordPress, as it seems more easy to main( not from my experience ). .. ...
0
votes
0answers
69 views

How do I get the meta section in top rated posts of thumbs rating plugin

Hi. I am trying to make page templates using the thumbs rating plugin. and trying to display top rated posts. All was going well, until I got stuck in the meta section. The function I am having a ...
1
vote
0answers
39 views

Change submenu markup

I've seen people recommending to edit the wordpress default Walker to change the menu markup and create your own. The problem with this is that I would like to change the markup of the submenu and ...
2
votes
1answer
85 views

Help with CPT template pagination

i created a themes CPT using the following code function pp_themes_post_type() { $args = array( 'public' => true, 'label' => 'ProfilePress Themes', '...
0
votes
0answers
48 views

Why isn't my custom post type using the corresponding custom post template?

I've created a custom post type, 'film' am having trouble getting posts of this type to use the custom post template I've created in my theme directory. I created the 'film' post type in functions....
1
vote
1answer
57 views

Categories overview that links to page displaying posts

I am trying to achieve the following A page that displays a series of categories with a title, description and an image When a category is clicked, all posts that belongs to that category gets shown....
0
votes
1answer
43 views

How to use wp_list_categories with plugin category?

Attempting to use: <?php wp_list_categories( $args ); ?> And this works fine to display a list of the default Wordpress category group used for posts(?) but I'm looking to pull a category ...
0
votes
0answers
58 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
20 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
22 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
84 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
80 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
80 views

Override template hierarchy

add_filter( 'template_include', 'my_callback' ); The above filter returns which template is there and what will be used, but i need to have all tries for finding template in template hierarchy. For ...
0
votes
2answers
50 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
94 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
43 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
82 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
117 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
41 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
24 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 feat-...
2
votes
1answer
113 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
38 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
60 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
19 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
109 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
48 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 search....
1
vote
1answer
82 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 Template:...
0
votes
0answers
20 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
24 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 ...