Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [templates]

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

0
votes
0answers
8 views

DIVI - Child theme modify footer siderbar

I would like to modify semantic H4 (default DIVI) by span with custom class CSS. In my child theme function et_widgets_init_overwrite() { register_sidebar( array( 'name' => esc_html__( '...
0
votes
0answers
4 views

Change WooCommerce template for PDF - access to custom field

I want to do some modifications to a template of WooCommerce, but I'm rather ZERO in PHP, so that is why I'm asking some guidance so I could perform my small modifications, which I'm sure are not too ...
0
votes
0answers
24 views

Get the templete content by templete name in wp.

I have to show the selected templete content into the page programitically.
0
votes
1answer
6 views

Disable theme WooCommerce template

Just purchased a premium WooCommerce-read theme. Unfortunately, this theme comes with a /woocommerce folder. How can I disable this templates,without deleting whole folder?
1
vote
2answers
36 views

How do I create a custom partial / template?

I have created an sign up form and placed it in my header: <div> <h5 class="myapp-sign-up-text">Sign up for updates</h5> <form class="myapp-email-form"> <...
0
votes
0answers
6 views

How can I display all posts from child categories in the parent category?

I am trying to modify an existing website so that a parent category page displays the posts associated with both the parent and child categories. Currently, if there are any child categories, the ...
0
votes
1answer
20 views

How can I modify the default reset (lost) password email text?

I found some similar questions on here, but was unable to apply the solutions that were provided. The standard password reset email that Wordpress is sending does not provide a clickable url for ...
0
votes
0answers
24 views

Second Loop Showing Only One Post on Single Post Page

The single.php page I am working on was able to display two loops successfully, the first being the actual page's post, and the second loop displaying the last 5 posts. However, since I have styled ...
1
vote
1answer
27 views

Gutenberg & Pre-formatted Templates: Core Block Attributes

The Gutenberg Handbook currently has a short entry for creating whole templates of blocks, e.g. used for Custom Post Types or just pre-formatting posts. https://wordpress.org/gutenberg/handbook/...
-1
votes
1answer
31 views

custom post type single page template not working

I created a page portfolio and select template Portfolio Template My portfolio page does not access the template-portfolio.php file. In which also includes content-portfolio.php in template parts ...
1
vote
1answer
19 views

Only one post is showing on category page, why?

My website categories are only showing one recent post, not all. category.php code looks like this: <?php get_header(); /** * The template for displaying Category pages */ quality_breadcrumbs()...
0
votes
0answers
30 views

Turning archive templates to a page template maintaining the slug

I used to have an archive-rooms.php (as page-rooms.php) template to list them all This had few problems: No title page No way to synch menu item with title so: 1) I duplicated the archive-...
0
votes
0answers
15 views

WP create a template for pages that aren't inside of the DB

I have a question. Is it possible in Wordpress to create pages, that aren't actually inside of the wp_post table? What I would need is, anytime there is a page with a certain slug, such as www....
0
votes
2answers
25 views

WordPress blog posts template bug [on hold]

I'm facing an issue I've never seen before. I fully copied a WP website to my localhost machine and everything was looking fine. When I was trying to make some changes on the blog page template (that ...
0
votes
0answers
31 views

How to add php to theme to show alt attributes

I am trying to figure out how to add PHP / code to my template so that my alt tags show up for my images. The theme has been modified by a company that is no longer around so I can't ask how to ...
0
votes
0answers
10 views

how to use a sidebar widget with its options in a template

I know that the title of this question is a litle confusing, but this the problem I have recently installed a widget called Youtube Channel Gallery, which displays the latest videos on my website. ...
0
votes
1answer
15 views

WooCommerce template page for category

How do I change the WordPress template used for the WooCommerce category pages? I can change the product pages by using the single-product.php template, but the category pages just use page.php which ...
0
votes
1answer
22 views

Template Loop - add switch case php

My plugin template is currently as follows: if ( $query->have_posts() ) { ?> <ul id="list-con"> <?php while ($query->have_posts()) { $query->the_post();...
0
votes
1answer
21 views

Displaying all posts of a category in full view on one page using their single.php template

I would like to display all posts of a certain category in full view on one page, but would like to render them in the same look and feel as they were rendered using the single.php template. How ist ...
0
votes
0answers
26 views

Woocommerce checkout functions.php : billing_address_1 won't align form-row-first

I'm trying to re-order and layout the Woocommerce checkout page. I can get most of what I want working without issue however for some reason when setting billing_address_1 to form-row-first (default ...
0
votes
0answers
23 views

Custom page template returns to default page template after saving

I have a custom page template set up in Wordpress. When I select it and save a page, it returns to the default template. After reading another question on the subject, here's what I've tried: *...
0
votes
1answer
29 views

WordPress custom template not showing in the list of available templates

For some reason, my custom template WILL not show up in the backend of WordPress. I have tried the suggestions in this thread: Custom templates not showing up in template dropdown to no avail. It ...
0
votes
0answers
24 views

Wordpress Templates missing

Woke up this morning to a broken website because my wordpress templates that come in my theme are not showing in the "Page Attributes" section on the page editor. Any clue to why they disappeared? I ...
0
votes
1answer
23 views

Templating advice sub posts of a CTP

Im looking for advice to generate a few 'default' post templates. Currently this is the setup for the CPT 'projects'. We generate subpages and select the main post type as parent. This works well to ...
0
votes
0answers
16 views

What is the best approach to create Pages with same Page Template but different post types?

The goal is to have something like this below in Wordpress: Three pages : Cars Movies Fruits Three Post Types cars_posts movies_posts fruits_posts Each Post Types have multiple posts ...
0
votes
1answer
13 views

wordpress custom posts page not showing

In Wordpress I created 2 templates : The first template is a custom homepage The second template is custom page for for post results(search by category, search by keywords) After that I specified ...
0
votes
0answers
15 views

why does not showing my custom post category list in any template?

i want the category list to be show in any template but does not showing code is here what i am using . can please guide me. no any result i am getting. if you have any idea please guide. |custom ...
0
votes
0answers
20 views

How to add/edit/delete and categories wp-page template files using wp-admin?

Anybody please suggest a good word press plugin for add,edit,delete and categorising the word press page templates according to the pages any plugin is available? I need a suggestion form you peoples ...
0
votes
1answer
33 views

Use same page-mypage.php template for several pages

How can I use the same page-mypage.php file for different pages, without resorting to page templates?
0
votes
0answers
19 views

how do i add a subscription form to all my blog posts using the landing.php Template in oceamWp?

I am using a sendinblue plugin for my subscription forms. I have a short_code and I want it on top of all my Blog posts. I tried to add it to the landing.php page like bellow <div id="content" ...
0
votes
1answer
36 views

Update body class based on theme as well as a html attribute

I just started using wordpress. Now I'm trying to create a theme for a static web page I wrote. For that web page I'm using barbajs, which is why I have a html tag (in my case a section tag) with a ...
0
votes
1answer
149 views

How to override the “inc” folder (or any folder) in a theme using child theme?

I am using Storefront theme (But question isn't specify to this theme, I am asking question for any theme). I can easily override files like header.php, footer.php using child theme(just copy and ...
0
votes
1answer
17 views

How do I put my frontpage featured image in a page template for home.php?

Important: I want to makes sure this is clear: I am not asking how to get the post thumbnail. I am asking how to get the featured image for single page which is created through the Gutenberg editor ...
0
votes
0answers
16 views

WooCommerce cart handling problem

I use Aventura wordpress template and predefined tour_cart parameter to handle cart. I directed to URL like this, when try to put some items to cart: tour-cart/?tour_id=2100&people_available=&...
0
votes
0answers
42 views

How to access ACF fields in Elementor templates?

I am creating a custom archive page for a custom post type, but I need to get some Advanced Custom Fields (ACF) values into it. Is there a way to do that when building a template? For some reason, my ...
0
votes
1answer
40 views

The wordpress website is showing 'w' while it loads and in the footer

The website www.madinatulilmacademy.com shows letter w while it loads and then in the footer. I Cannot figure out where this 'w' is coming from the developer tools in chrome. I have been trying to ...
0
votes
1answer
27 views

Template for front page (latest posts)

I am having index.php -> This renders the latest post with sidebar page.php-> This renders the page layout : Templates are fullwidth,sidebarleft& sidebarright single.php-> This renders the ...
0
votes
0answers
15 views

Custom template for specific page already using a custom template

I understand templating, and have done a few custom themes in the past. Yet for some reason I'm missing something really basic... help! Given a specific page (id 427), it renders just fine using the ...
0
votes
2answers
33 views

How do I create post template for different taxonomy

I have created taxonomy, but I want to use different post template for the taxonomy, how can I do it? function create_topics_hierarchical_taxonomy() { // Add new taxonomy, make it hierarchical like ...
0
votes
0answers
16 views

Visual composer not parsing page content

I have a website which is using Visual composer to manage the pages. Few days ago everything was working fine, but today, whenever I try to make an update on the page the result is that the page just ...
0
votes
0answers
38 views

Creating template files for custom taxonomies

I have created custom post type Products using CPT plugin, then I created three custom taxonomies to be used when adding new products, let's say they're Brands, Usage and Types. What I'm trying to ...
0
votes
1answer
41 views

Archive URL returns 404 error for Custom Post Type

Having issues with a custom post type that returns a 404 error when I visit the archive page. get_post_type_archive_link() for the post type (called project_profiles) returns the URL mysite.com/...
0
votes
1answer
21 views

Page Templates not using functions.php

I am having an issue with page templates in Wordpress. I have created some for my website but they are not using the wp_enqueue_style in my functions.php. anybody know why this is? mainly my ...
0
votes
0answers
24 views

Load a costum template for each product category in woocommerce

My goal is to display a different template for each product category in a woocommerce web shop, but I'm not quite sure about the best practice to accomplish this. My logic is something like: global $...
0
votes
1answer
18 views

Adding styles/scripts to specific page

I'm trying to add styles and scripts to specific template, But it's not working. In functions.php I tried: if( is_page_template('file.php') ){} if( is_page_template( get_template_directory() . 'file....
0
votes
3answers
39 views

How to change the deafult template in Wordpress plugin

I have this plugin: Simple Job Board When I view a job offer I see the default view from my theme. But in page attribute I have a lot templates. but if I change, nothing happens. It is possible to ...
0
votes
0answers
6 views

How do you get child menu item appear when you are in a child page

I have a home page with navigation menu, consisting of Tennis, Polo, Hiking and Cricket (which are parent pages on a template called Sport pages), as an example. When I add a page, e.g Swimming, it ...
0
votes
1answer
722 views

Custom page for WooCommerce's /product-category/

I am building a website from scratch on WordPress using WooCommerce. I'll be having products from numerous brands and to have an easier time organizing them, I've made each brand a category. Currently,...
0
votes
1answer
22 views

Locating the HTML piece of code in wordpress

I am new to wordpress and I am currently working on modifying a wordpress built website. I am trying to find the exact HTML location of the web page using inspect options in chrome and then trying to ...
-1
votes
2answers
19 views

Enclose article's body with default shortcode

I'd like to enable this plugin https://responsivevoice.com/wordpress-text-to-speech-plugin/ as default for every article's body in my wordpress site. I need to edit my article template and the final ...