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

Retrieve a custom form field modified by a filter

I use a 3rd party plugin that creates a form with some fields. I want to use one of these fields in one of my templates. Is there a way to do this? UPDATE I found a solution, see the accepted ...
0
votes
1answer
48 views

Splitting the_content() by size?

I have a situation where users don't want to format quotes in post body and want to just paste their content, assign a quote in a custom field, and the template will now render the quote when viewing ...
0
votes
2answers
18 views

Adding wrapper elements in the_date() like in the_title()?

So this works: the_title( '<h1 class="entry-title">', '</h1>' ); But this does not: the_date( '<h4 class="entry-date">', '</h4>' ); I don't know enough if this is ...
3
votes
2answers
85 views

Taxonomy Templates… by hierarchical level?

I'm wondering if there's a way to specify by filename different templates for different levels within a hierarchical taxonomy. I know about taxonomy-taxonomyname.php and taxonomy-taxonomyname-term.php ...
0
votes
1answer
19 views

How do you assign custom template for Posts page (under Front page displays setting)

How do you assign custom template for Posts page (under Front page displays setting)? Settings > Reading in backend. I notice once I set Posts page to specific page, the Template dropdown on edit ...
-1
votes
1answer
37 views

PHP Button Custom link [closed]

At this part of code of a wp template I want to change the permalink url of the "Book Now" button to custom link example: "www.mywebsite.com" byt_render_field("description clearfix", "", "", ...
7
votes
2answers
270 views

Why do templates contain so many PHP tag pairs?

I have some PHP experience, but hardly any WP theme writing experience...I'm just starting the journey. All of the themes I have looked at so far in the .org repository have code that looks like ...
0
votes
1answer
49 views

Loading a template for a URL pattern

I am creating gallery pages for events and csr-events custom post type. Now it has three types of pages: www.example.com/gallery www.example.com/gallery/events www.example.com/gallery/csr-events ...
0
votes
1answer
106 views

WooCommerce - Print Processing orders [closed]

On our WooCommerce webshop we have an PHP page that generates the processing orders. Now I need to show the SKU in the table, but I don't know how to do that :) Below is an example of the page as it ...
0
votes
0answers
150 views

How to call function in functions.php in external file inside same theme?

I'm trying to develop a theme by my self, in my theme, i have a function inside functions.php and a php file named ajax.php. i was trying to call a function inside functions.php in ajax.php, but its ...
0
votes
1answer
12 views

Cant pull in featured Image

I have 6 posts with a featured image set for each. I have created a template file called portfolio-template.php. I have set the portfolio page to use that template file. Inside portfolio-template.php ...
0
votes
1answer
81 views

the_content() not showing full posts in category template

i want to show the full posts in category archive page, i put the_content() in the category template (content.php) <article id="post-<?php the_ID(); ?>" <?php post_class( 'entry' ); ...
1
vote
2answers
103 views

Searching multiple tags and adding jQuery dependant script onto page template?

I have this simple javascript file for checking boxes in a tree view menu: treeview.js $(".acidjs-css3-treeview").delegate("label input:checkbox", "change", function() { var checkbox = ...
0
votes
0answers
33 views

Change menu order in Restaurateur theme

I have installed a theme called Restaurateur, which includes a "Restaurateur Menu Item CPT" plugin that displays a menu page with fast food categories and meals. When you load the site, all meals are ...
1
vote
1answer
70 views

Check if a menu is empty?

I have menus set corresponding to a custom field on a page. Ie I have menu1, menu2, and menu3 on three pages under custom field => MenuName. Under functions.php I have: /* Add Menu Locations */ ...
1
vote
1answer
52 views

Custom field value not saving when it contains a URL?

I implemented a custom field into one of my post formats called 'url'. When I enter a random string of characters into the field, it saves just fine and I display it in my template like this: ...
0
votes
0answers
27 views

Loop returns more items than exist?

Using the answer here: http://wordpress.stackexchange.com/a/207601/45709 exact works as it is intended. It returns 3 slides because only three slides exist. I had to slightly modify the code because ...
1
vote
1answer
59 views

How to loop over custom fields in a page template?

I was originally using a single field and things worked perfectly with the following code. Now I need to alter it to loop of several fields that are similar. To start: I've created several custom ...
0
votes
1answer
25 views

Template code to split a post and print a custom field?

So I want a blog post but in the center of every blog post I want to split the content and print a custom field attached to the blog post type. Ie you field called "Blog Quote" and the user will ...
1
vote
1answer
188 views

Override mini-cart.php from plugin

(Its not the cache thing) Im creating a plugin that among other things modifies woocommerce template files. Before i placed woocommerce overrides in child theme. But i want to move it to the plugin to ...
0
votes
1answer
109 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
26 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
26 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
41 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' ); ...
0
votes
2answers
103 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
31 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
23 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
27 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
58 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
46 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
32 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: ...
1
vote
4answers
99 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
44 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
21 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
241 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
60 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
35 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
74 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
44 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 ...
1
vote
1answer
53 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 ...
0
votes
1answer
33 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
88 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
46 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 ...