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

Best way to organize data in this scenario

My question is about data organization more than code, I hope it still has its place here. My site's main menu has an item pointing to a page called "Videos". This page has 2 main parts: The last ...
0
votes
0answers
16 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
16 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
1answer
35 views

custom post type plugin - single template

I'm writing a plugin that creates a cpt. I can include a template for viewing a single instance of the cpt using the single_template filter. And have it look for a template overload in the theme. ...
-1
votes
0answers
8 views

Get all Woocommerce products where attribute value matches something

I would like to create a page where only custom-made products are listed. I created the is_custom custom attribute on all my products with two possible values: yes - no In my custom template I would ...
-1
votes
1answer
17 views

How do you access the Product Short Description in a WooCommerce email template? [on hold]

I would like to output the Product Short Description beneath the product name inside the order items table inside WooCommerce emails. I think I know where to place code inside the email template file, ...
0
votes
0answers
6 views

BuddyPress: Drag/Drop Page Designer? [closed]

Is there a plugin, or functionality, that allows me to drag/drop to create custom pages in BuddyPress? I know in other CMS', you can use views, blocks, panels, (widgets, essentially) to custom design ...
0
votes
1answer
18 views

Display a post via template

I want to display a single post in the sidebar-area (not the sidebar itself) and can't seem to get it working. I know the post_id (it's 1571 btw), so I looked around and only found this link from 7 ...
0
votes
1answer
18 views

How to refresh a template page on Wordpress in 3 seconds - easiest method?

Basically, on my site I have content submitted via a search bar. I'm using a content-none template to detect if the user is signed in - and if so it submits a post programmatically (if the post ...
0
votes
1answer
19 views

How to call a certain object/menubar in a PHP file

I made a template and had some help with adding a CSS file to the template. Now I'm stuck on the question, how do I add a certain menubar to my header. Example: topbar - has menu with "Welcome ...
0
votes
2answers
35 views

How to add new CSS file to new PHP file

I've made a new template file for Wordpress constructing the elements of the page via PHP and Wordpress recognizes the template as such. Then I wanted to include a CSS file for said template (same ...
0
votes
1answer
27 views

Templates for Mobile Site

Is there any built-in method for displaying a different template based off of browser size device (i.e. mobile device detection)? I've done some research and all I can find is a ton of plugins that ...
0
votes
1answer
32 views

How to display only posts assigned to a particular, isolated, subcategory

I am trying to set up my wp site where I use posts assigned to categories and subcategories (about 3 levels). I have a list of 1st level categories as my primary menu. When clicked, the intended ...
0
votes
2answers
27 views

Page editor missing Templates drop down

Update: As with so many mysteries, the cause turned out to be extremely stupid. I had the file saved in a different theme's directory. Thanks to @a4jp.com I'm building a theme using underscores. I've ...
0
votes
2answers
41 views

Understanding the Template hierarchy

I've got a template called News. When I go to the Dashboard and edit the Page called News which has a web address of news.html I can see it uses this template (i.e. in the Page Attributes > Template ...
0
votes
0answers
11 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
1answer
24 views

Redirect Every Instance of The Author Template Pages to Custom Author Pages

What I'm looking to do is actually a simple redirect, but for the EVERY page contained in the /author/ slug. The working slug I want to redirect to is /team/. For example, if someone were to type ...
0
votes
0answers
9 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 ...
-1
votes
0answers
11 views

How to display wp_nav_menu horizontally?

may u know how to display the wp_nav_menu horizontally? <?php wp_nav_menu( array( 'theme_location' => 'Header' ,'container' => '',) ); ?> What i get is like a normal list and i ...
0
votes
0answers
15 views

WooCommerce: Add content prior to or after checkout form

I'm trying to produce a message to appear prior to (or after) the checkout form on the checkout page (Example: https://susieoshandbags.com/shop/checkout/). So I did the following: add_action( ...
0
votes
0answers
19 views

Submit form to another template (ugly url)

I've created a submit form with some filters that makes a query request: <form action="<?php echo get_template_directory_uri();?>/list-items.php"> my form here... </form> Created ...
1
vote
1answer
33 views

Create and set templates for custom taxonomies

I've created a custom taxonomy for a custom post type. Code: add_action( 'init', 'register_taxonomy_mytaxonomies' ); function register_taxonomy_mytaxonomies() { $labels = array( ...
0
votes
1answer
35 views

Getting page/category content to show up in my custom page template

I am trying to get my category page content to show up in my custom page template, it returns everything I call, except for the actual page content when I am testing it. Hope this is somewhat clear :\ ...
0
votes
2answers
31 views

Custom templates vs page-slug

I've currently been using the slug to set the page template, using the normal hierarchy For example, if I wanted to change the page template for http://www.example.com/about-us, I would edit ...
0
votes
1answer
33 views

how to remove entry meta from wordpress archive category and change its display

I'm working with the Bootstrap Child Theme on WordPress. My problem is that I want to remove the entry meta - like posted on date by admin - and also want to change the display of all these posts, but ...
0
votes
0answers
28 views

URL rewriting with custom user meta “/%shop_name%/gallery/%gallery%”

I have created a custom user meta = shop_name in User Profile and custom post type gallery The default URL of the post is http://localhost/gallery/%gallery% which i have modified to below given URL ...
0
votes
0answers
19 views

Custom post type - cannot link custom template to it in my plugin

I have created a custom post type called "syndication" in my plug-in and that all works as it should. However, I want to provide a custom template for the "add" option so I created a file in my plugin ...
1
vote
1answer
38 views

Create default_content layout template based on post id

Background What I am attempting to do is create a custom post layout template for a specific post (or even page) that the WordPress user can simply insert content using the WYSIWYG editor without ...
0
votes
1answer
35 views

Which template name to use for taxonomies but not their terms?

I can't figure out which template name to use to modify custom taxonomy archive page, but not the one for terms in that taxonomy. My goal is to show terms list in custom taxonomy archive and in ...
1
vote
2answers
27 views

Which custom query am I in and how can I access its properties & methods?

Sometimes there's no way around creating a custom query, but when I do and then loop through it, I often want to use get_template_part() within the custom query loop to pull in a template I already ...
0
votes
0answers
17 views

Using external file with WP_USE_THEMES set to false causing 404

I have a file in my template I want to use for a Twitter authentication callback named oauth.php that I'd like to be accessible through htp://mydomain.com/oauth.php: <?php define('WP_USE_THEMES', ...
0
votes
0answers
8 views

Unable to use template modules while creating page

I am trying to create a product page and wish to use a custom template that I built. I selected the template in the Template Option but none of the template modules were imported the page edit ...
0
votes
0answers
20 views

Using file outside of template hierarchy for Twitter sign in authentication

I'm trying to use a file for my Twitter sign in authentication callback that isn't in the traditional WordPress template hierarchy. This is a problem I generally want to solve away from this one ...
0
votes
0answers
9 views

How to handle loading all Post records and allowing user to select which ones they want inserted into newsletter?

For a while now I have wanted to build a new WP PLugin that allows you to selects Posts and generate a MailChimp Newsletter. It let's you use a template and select all the posts you want in the ...
0
votes
1answer
19 views

Function the_content

For some reason on my attachment page template (http://capa.furniture/?attachment_id=1494) I am getting the url of the reduced size image. I do not know why. I am not getting the thumbnail full size ...
0
votes
1answer
25 views

How should I add a “widget” like element?

I would like to add a custom slideshow like "template" which can be called in to other template files. My first thought was to create exactly that; a separate slideshow.php template file which ...
0
votes
0answers
46 views

Wordpress not picking up custom templates in sub directory

Setting up a new wordpress site at the moment separating wp_core from wp_content. I'm using timber and twig for my views/templates. My current project structure is: \ core (wp_core) |- \ content ...
-1
votes
1answer
43 views

Including 2 Negative Is_Template Conditionals in header.php [closed]

I want to set a conditional in header.php to wrap all of my templates, except front-page.php and single-device.php, in a bootstrap container element. Writing one conditional achives what I want if( ...
0
votes
0answers
31 views

Plugin Boilerplate - Where should I put helper functions?

I'm using the Wordpress Plugin Boilerplate and as it's OOP, I don't see where is the place for helper functions. If I am using this for say a review plugin - and I have a function that generates the ...
0
votes
2answers
28 views

How do I get the URL of a specific size featured image?

I am using <?php wp_get_attachment_thumb_url( $attachment_id ); ?> to get the url of a thumbnail for a post in Wordpress. However I would like to retrieve the URL of a specific size image. So ...
0
votes
1answer
16 views

My blog “page” used to show a list of posts, but now it's just showing the page content?

I used to have a page called "Blog" with dummy content (it said "hello world" or similar). Off the menu there was a link to www.mydomain.com/blog and this used to fire up index.php and list recent ...
0
votes
1answer
18 views

Is there any way of viewing revision history on files in Wordpress?

I have done some tiny changes to my style.css file and my header.php file. For want of a better word I have destroyed my website, and i am losing my mind trying to figure out what I did wrong, ie is ...
0
votes
1answer
41 views

Create theme for mobile phones and tablets only?

I've been checking the docs but I only found a way to use different style sheet for phones and tablets. Is there a way to create another different theme only for mobile phones and tablets? And I'm ...
0
votes
1answer
23 views

How do I set a specific template for sub-categories?

There's a few posts about getting sub-categories to use the same template as their parent but I want to do something slightly different. I have a category 67, and I want all sub-categories of 67 to ...
0
votes
1answer
17 views

Allow arbitrary text after page URL

I'm trying to add a page that is able to display different information from a database based on the URL. http://example.com/page/ retrieves the page. I want ...
0
votes
1answer
48 views

Why is my sub-category template showing the wrong posts

I've got a problem with a custom category template. Used on sub-categories for a particular parent. For some odd reason it's not showing posts store within it, but instead from a another ...
0
votes
1answer
43 views

Genesis - Adding custom hooks to display secondary navigation

within my functions.php I added the following piece of code to display my footer accordingly: //* Customize the entire footer remove_action( 'genesis_footer', 'genesis_do_footer' ); add_action( ...
0
votes
0answers
10 views

How to render custom fields types that are available in custom fileds

I have a custom post type News created by custom post type plugins and i have added some fields like text, textarea, image, file, wisyywig editor etc using admin panel. now my problem is : i have a ...
0
votes
1answer
16 views

Custom form not showing in correct place on page

I have a page like this: <h2 class="subHeader contentSubHeader">Are you already a member? Don´t miss your next career opportunity!</h2> <p class="subHeader ...
0
votes
3answers
86 views

Displaying External Data - Not Posts

I am creating a plugin that needs to display external data, not wordpress posts. What I have done: registered rewrites so wp recognizes my archive/single URLs, hooked into template_include to direct ...