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
1
vote
1answer
1k views

I want to duplicate homepage for all my pages

I want to duplicate my homepage then call the pages A. page b & c. - So that I can edit just a few things on all the pages. I already have some pages but I can't get bits exactly the same.I copied ...
0
votes
0answers
14 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
22 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
2answers
664 views

Creating custom post-listing templates in twentyseventeen child theme

I'm using a child theme based on 'Twenty Seventeen' and have created a custom post type ('review'). I want to make two Pages, one which lists 'reviews' and the other which lists a mixture of 'posts' ...
0
votes
1answer
18 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
19 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
577 views

AJAX Post from same domain to a wordpress page

I am trying to create an ajax post listener to a wordpress page in a domain (let's just say http://example.com). Another web app in the same domain (http://example.com) exists and a user sends ajax ...
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
1answer
4k views

Multiple templates for custom post type

This is my setup: I have one post type called "products" and a page (page X) where I use wp_query to list all products, the_permalink(); returns the link to single-products.php. The goal is to use ...
0
votes
1answer
682 views

How to use regular page template for search results?

I'm working on a Genesis child theme with a static front page. This front page contains a search box that just sets the 'search' query var. So it redirects to: http://baseurl/?search=foo I'm handling ...
0
votes
0answers
12 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
671 views

Custom Post Type Template Alternative

I've managed to figure out how to use Custom Post Type templates now and they are great. I do however want to know if there is not a way to use a current template I have developed for other pages. ...
1
vote
1answer
714 views

Template selection area is not visible on page editor sidebar in wordpress twentty sixteen default theme

Template selection area is not visible on page editor sidebar in wordpress twentty sixteen default theme <?php /** * Template Name:Zoho testAPI * * * * */ echo phpinfo(); ?>
0
votes
2answers
45 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 ...
1
vote
1answer
753 views

Custom Loop Using Shortcode in Custom Page Template

I am trying to output a custom loop created using shortcode in a custom page template. Here is the code I am using to generate the shortcode: function archive_sc( $atts ) { // Attributes ...
0
votes
0answers
60 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
1answer
745 views

Pagination is not working on custom query inside a custom home page template

I know this is a duplicate question. But to comment on existing question, I dont have enough points. So here we go.... Pagination is not working on custom query inside a custom home page template. ...
0
votes
0answers
24 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
21 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
20 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
1answer
25 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
15 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 ...
1
vote
1answer
669 views

Custom Post Type with Templates using Meta Boxes?

I have this issue where I need a CPT to have several layout options and use templates. Originally, WP does not support templates for custom posts, however I know its possible to do it manually via ...
0
votes
0answers
20 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?
74
votes
4answers
91k views

Create custom page templates with plugins?

Is it possible to make custom page templates available from a plugin?
0
votes
1answer
37 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
2answers
19 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
14 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
8 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 ...
3
votes
2answers
3k views

is_page_template not working

Hi trying this code below to get working, but no look so far. Idea is simple if page template is page-47.php display <h1>Something</h1> else <h1>This will show on any other page</...
1
vote
1answer
2k views

How to get the value of input hidden html from text editor to custom page template?

I have 10 or more input hidden in 10 or more pages with different values in Wordpress text editor and I want to get the value using $_POST in a custom page template. How to do this? I tried to called ...
0
votes
1answer
12 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 ...
3
votes
4answers
3k views

How to inject custom url path for page ?

Is it possible to make custom URL path for pages ? The current page url is http://localhost.dev/insight which I need to show like http://localhost.dev/city/local/insight are any option in wordpress ...
0
votes
2answers
92 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' => ...
2
votes
2answers
2k views

Full width layout for custom post type pages

I'm trying to remove a widget area called 'Primary' from a certain page on a site. This is the function where I manage the sidebars: //ADD CATEGORIES IN SIDEBAR OF SINGLE POST TYPE add_action( '...
4
votes
4answers
2k views

Is it possible to enqueue a raw CSS string directly from within a template file?

I was wondering if it's possible to enqueue raw CSS as a string directly from within a template file? I'm writing a custom template for a page and need to add some style rules for it. What I want to ...
0
votes
0answers
12 views

Default Template Selected After Changes in Elementor

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
16 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 ...
1
vote
2answers
774 views

How to duplicate a page template but make minor changes to the header?

I will apologize in advance, I am very new to this. I have been teaching myself php as a hobby, but now I need it for work! I don't work as a web designer, but to try and save some money, I need to ...
0
votes
0answers
12 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
58 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
1answer
1k views

Creating page & post templates without template file

Usually if you want to customise a post (generic: ie all) type in WordPress you would create a custom page template for it ie, following the template hierarchy, a page will be customised based on it's ...
0
votes
0answers
9 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
2answers
865 views

Display images in template file

I have one template file for the main page, after creating home page I have added text to check if it reflect changes on my home page or not and it was successfully displaying text. But when I try to ...
1
vote
3answers
5k views

Change title only in dynamic page

I've been trying to change the title in a dynamic page without any luck. What I did is I created two page-templates from where I load items (occasions) from an external database. In one page-template ...
2
votes
1answer
883 views

Child page in custom post throws 404 page not found

Currently I am trying to add a page as a child in my custom post section. The parent pages in my custom posts works correctly, I've set a template file for them as singe-custom_post_name.php. All good....
4
votes
2answers
2k views

Include a page template along with add_theme_support()

I'm not even sure this is possible but before I start thinking up crazy solutions, I'll see if there is a WordPress way to do it. Here's the deal. I have a timeline jQuery plugin all set up on ...
0
votes
3answers
1k views

page-{slug} not loaded in custom theme

I'm working on a custom template for WordPress. I've created some page and then created the relative page-{slug}.php (example page-careers.php) that are supposed to be loaded from WordPress when the ...
1
vote
2answers
550 views

Loop and Page template : my WP_query don't take args

I have a problem with a loop that I try to put into a custom Page template. I would like to display posts with conditions, but whatever I put in my WP_query parameters, it is not taking in ...
1
vote
2answers
807 views

Can two custom templates be used to create a single page?

I've never thought to do this with WordPress until now, but I was wondering is it possible for two templates to be chosen to create a post or page in WordPress? When you are on the 'Edit Page' there ...

1
2 3 4 5
23