Questions tagged [page-template]

Pages are one of WordPress' built-in Post Types. You'll probably want most of your website Pages to look about the same. Sometimes, though, you may need a specific Page, or a group of Pages, to display or behave differently. This is easily accomplished with Page Templates.

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

How to delete Page title in order template Woocommerce [closed]

I wrote a custom template for woocommerce and I have a problem because when I click on the product category at the top of the page it shows the title of the page and select the order. I would like to ...
0
votes
1answer
23 views

Wordpress template page name displayed on screen

Hi there _ Must admit I'm scratching my head! I've uploaded a demo site that uses a number of template pages. Everything works as expected, but whenever there's a page change the top 3 lines of the ...
0
votes
0answers
27 views

My theme's page.php is not working

The page.php is not working and I have tried every possible thing that I can do. I have made various changes and I got to know, that when I remove get_header() from my code, the page.php works but ...
0
votes
1answer
15 views

Trying to add a page template for my custom post type from a plugin, but it will not display in the template dropdown unless file is in theme

I have a custom post type "publications" in my mu-plugin "publications-plugin", and I want to include an optional page template to use with this CPT as well as with regular posts ...
2
votes
1answer
45 views

What is the wordpress way of displaying local external content?

I have a somewhat tricky situation. A company's internal server, running some unknown software (means I have no access whatsoever), exports data to my http server via a custom API. This data gets ...
0
votes
1answer
20 views

How to display a product features dynamically with icons?

How we can display product features dynamically, different for each product? For example, we have a cosmetic product that has different ingredients. On the front page, I need to display its ...
0
votes
0answers
19 views

get_current_user_id() doesn't work at all in page template (returns 0)

There are plenty of threads with similar heading, but all of them are pointing out that you shouldn't be calling get_current_user_id sooner than init action. Some people pointed out to use global $...
0
votes
1answer
19 views

Short code template + ajax

I am doing a simple page that would work a single page inside Wordpress using Ajax. So to do this, I create a template page with a short-code in it. But the thing is that I really can't do ajax work ...
0
votes
0answers
16 views

Ceris Template - How i change this topics? [closed]

How i change this topics is Ceris Template? Latest News, Entertainment News, Breaking Daily. Thanks.
0
votes
1answer
31 views

different sidebars depending on template (is_page_template is not working)

I'm trying to follow the instructions in this "How to show different sidebars for posts and pages in WordPress" tutorial to use different sidebars for different types of pages. In particular,...
0
votes
0answers
28 views

My pages are using my Index.php and not my page.php

So I'm making a custom theme, I setup the theme Created my pages on wordpress then created my Pages VS code i'll use an example of one page for this: I created the talent page with the slug: talent ...
0
votes
0answers
15 views

How to access theme template variables from page's code editor?

I created a new php template for my page, and choose it with Page attributes- Template. This php template has an $imageData variable which I want to load into my page with the code editor (instead of ...
0
votes
0answers
21 views

Load Dynamic Template Page by Metabox

Does anyone know how I can implement Wordpress as shown in the image below? I would like to have a unique url passing the company_name metabox as a parameter and from business_type create a function ...
1
vote
0answers
16 views

Verify if the current page has at least one published child

In my theme php page template, I need to echo a string only if the page has at least one published child page. Actually, I have a function that verifies if the current page has any children, ...
0
votes
1answer
21 views

Wordpress custom pages in a folder

I cant find something similar I have a portal running WP and I want to create a mikro-site with 4 or more pages, under the same domain and let say I will name this : 'mikro' (I will use a different ...
0
votes
0answers
24 views

Password protect entire site with custom page

I would like to password protect (without user registration, just a simple password) my entire wordpress site and use a custom page for that, because I would like to use an independent template for ...
0
votes
0answers
14 views

Custom Page Layouts for self-hosted WordPress

I'm currently looking at building a new website in WordPress for a client and haven't used WordPress in a few years (6 years ago at least) and things have changed quite a bit in that time... ...
0
votes
1answer
20 views

Duplicated <a> tag in loop

I stuck on this issues, looks simple but can't find resolution to fix it. I have such loop: <div class="features-items__wrapper"> <h2><?php echo $currentTitle; ...
0
votes
0answers
13 views

Get HTML of a WordPress page with a template from inside a plugin

I'm using the following code to get a WordPress page html content from inside a plugin: $post = get_page_by_path($slug) echo apply_filters('the_content', $post->post_content); The problem is, this ...
1
vote
1answer
29 views

is_account_page() change to page slug

i'm really new to wordpress php. which function should i use to replace is_account_page() in a code. here's what I'm trying to achieve before if (is_account_page()){ do some code here } after if (...
0
votes
1answer
15 views

get the value for ALT is we check to see if an actual ALT value is set, if not we use the caption and if no caption is set we use the title

function custom_pic_alt( $attachment_ID ) { // Get ALT $thumb_alt = get_post_meta( $attachment_ID, '_wp_attachment_image_alt', true ); // No ALT supplied get attachment info ...
0
votes
1answer
20 views

A Reviews Page is Showing root Index.php instead of Template-Page

Issue: The root index.php file is showing up instead of my created template-name.php. What I have done to try and fix: Delete and create a new reviews page with the routename of "reviews". ...
0
votes
0answers
102 views

how make background-color transparent in elementor?

how make transparent background-color in elementor. Where is the option of opacity to make background-color transparent. Note- I don't want to make background-image transparent.
0
votes
0answers
17 views

wordpress get_header() on a page template getting the head content inside of the body tag

I am having trouble with my Wordpress template page. When calling get_header() in the template page, the content of the head is appearing inside the body tag and causing trouble. I couldn't find a ...
0
votes
1answer
19 views

Get text and images from other site

I have a site which is not WordPress, it usually gets input from user like Event name, event speakers, images etc. I want to create an event page in WordPress which contains all the details of events. ...
0
votes
0answers
31 views

Wordpress subcategory archive pagination in custom layout

I have blog with categories and sub-categories and use category.php for archive of main category posts, and added a custom layout for subcategory archive layout as subcategory.php (with a function). ...
0
votes
1answer
920 views

No templates for condition page.php Elementor

I am building a WordPress theme and I want it to support the Elementor theme. But I get this error in Elementor Debugging mode. No Template for condition > theme name -page.php What could be the ...
0
votes
0answers
4 views

Product page not found if product data is set Appointment Service

I installed the booked plugin and integrated with Woocemmerce. When I checked the product type to be appointments service, why was my product page not found on frontend. where is the code i need to ...
0
votes
0answers
17 views

previous_posts_link & next_posts_link doesn't generate any output

Hey I am using a WPQuery to loop through and show blog categories in posts. It's in a page tempplate. has 21 posts and I want them to show 10 per page with navigation links for next pages of 10 posts ...
0
votes
2answers
86 views

How To Load an HTML File As A WordPress Page (With No 301/No Redirect)

Here's what I'm trying to do: Page URL: https://example.com/the-page/ What it should load: https://example.com/content/oct2020/index.html When visitors go to the permalink /the-page/, I'd like that ...
0
votes
0answers
62 views

Modify Custom Post Type Slug

I have a CPT called 'projects', which display images with their titles. I have a page to display the CPT's called 'single-projects.php'. Is there a way through using templates and/or functions, to ...
0
votes
0answers
28 views

How to use a page template on the blog

I have home.php handling my main blog page. I am trying to set up an additional page template to be able to change the layout of the blog occasionally. I am able to choose the custom page template ...
0
votes
1answer
27 views

How to Override Page Template if URL matches query?

I have 4 Page Templates that my theme uses for all the pages - Default Template, Template One, Template Two and Template Three. When the relevant Page Template is selected, it loads an Advanced Custom ...
0
votes
1answer
23 views

Probleme shortcode with list author

I have created a list of my contributors for my website it works well. I'm trying to do this with a shortcode in my functions.php. The list appears well. But when I want to place it in my theme in any ...
0
votes
0answers
17 views

Create page via Form on Frontend

I have a requirement , where a user would want to create a WordPress page with 3 basic information as below . The user would add an audio file link. the user would add some text . The user would ...
0
votes
0answers
78 views

Missing 'Page Attributes' in page edit

Im missing Page Attributes from page edit screen. I have searched and not found any solution. Anybody with some ideas?
0
votes
2answers
77 views

Page template option missing

I checked everything suggested in that response: "page attributes" option is checked, template file is located at theme root folder, I tried several file encoding options in my text editor (...
0
votes
1answer
40 views

Create a page template for “top rated posts” but show full content and not just a list

Sorry upfront if I'm not explaining this clearly. I'm using WP-PostRatings and it has this function: <?php if (function_exists('get_most_rated')): ?> <ul> <?php ...
0
votes
1answer
18 views

Add featured image as post header background image

Wordpress Theme : Twenty Twenty [provided by wordpress] Cloud Hosting : Digital Ocean I need to put the featured image as post header background image.Please also explain that in which file of ...
0
votes
0answers
10 views

Showing custom content from specific function in a page

I have a custom php function that returns some text that I would like to show in a specific wordpress page The fastest idea that comes to my mind, is to return that content through a shortcode and put ...
0
votes
1answer
18 views

Undefined get_header function

I installed wordpress according to the site https://ipipe.ru/info/ustanovka-wordpress-na-openserver and then wanted to use underscores.me, where I entered worldelectronics and pressed the generate ...
1
vote
0answers
36 views

Default Template Selected After Changes in Elementor [closed]

I'm working with custom templates in WordPress. I'm using the Elementor plugin to build the site. When I open any page and make some changes in Elementor and then click the update button, I see that ...
0
votes
1answer
21 views

page-slug.php not working but only for specific slug

I'm trying to create a page called "Comics" with the slug "comics" to use as the main table of contents for my webcomic site. I've created a page-comics.php file, however when I ...
0
votes
2answers
104 views

Loop inside page template not working

I am facing a problem with the loop inside the page template. Here is the code. <?php /* Template Name: Blog-Template */ get_header(); $args = [ 'post_type' => 'post', 'posts_per_page' => ...
0
votes
0answers
15 views

Generating multiple pages using custom page template

I have created the page templates. Say t1, t2, t3 and likewise up to t10. Now, I want to generate 100 pages respectively using the page template t1 and another 100 using t2 and likewise until t10. Is ...
0
votes
0answers
64 views

add pagination in wordpress page template

I am using custom page to display my taxonomy terms the terms are displaying fine but i dont want the terms to all show in one page i want 2 terms per page but the pagination is not working and its ...
0
votes
0answers
11 views

Check if user is logged in in a callback page

I have a payment page in my website. The user enters his payment amount and the goes to the payment page. When he payed, he returns to a page in my website that I already declared as callback in the ...
0
votes
1answer
26 views

Create page template

I am completely new to working in Wordpress but have some skills in coding. My company has a website where we write about different publicly traded companies. I want to add company specific pages to ...
0
votes
0answers
27 views

Set custom directory in theme for page templates

I have a directory structure in my theme like this: src/ templates/ pages/ - faqs.php views/ - page.php In my custom functions I have a hook that tells WordPress to look in the ...
0
votes
0answers
25 views

How Can I Create a Friendly Slug for a Dynamic Page?

I built a dynamic page template that pulls biography information from a MySQL table. The page works fine but the URL is ugly. Officer-Biography/?ID=1 I have a set of canonical slugs that I want to use ...

1
2 3 4 5
24