All Questions

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

Ho to get page URL assigned to specific page template (outside that template page)

I have created custom page template (template-clock.php) This template is dynamic and it is getting information by link (?cat=99). Now I want to create dynamic link to that page from home page. But ...
0
votes
0answers
18 views

How to Generate a Lot of Pages from a Database in Wordpress?

I have a page template that I have to use for hundreds of different products. I don't intend to create all those pages manually, and I want to know how to generate them automatically from a database ...
0
votes
0answers
11 views

Homemade global template, advice?

For the theme I’m using there is a hook for an area just above the footer section and here I would like to output different ”banner sections” that are ”prepared globally”. So for each ”banner section”...
-1
votes
1answer
293 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 ...
0
votes
2answers
29 views

WordPress blog posts template bug [closed]

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
1answer
16 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
1answer
207 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
1answer
19 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
2answers
42 views

Hide page templates without using 'unset'

I have custom page templates that are not commonly used. How do I go about hiding these templates from selection in the 'Page attributes > Template' drop-down? Unset is not an option as ...
0
votes
0answers
22 views

Single Sidebar; multiple templates! How?

I am calling the typical get_sidebar() method to produce a vertical sidebar on posts/pages. Because of the responsive and multiple format nature of our site, the designer decided to make full-width ...
0
votes
1answer
102 views

Custom Template 404 for specific custom post type

Some solution to create a custom template for (page 404) for specific custom post type.
0
votes
1answer
23 views

pre-existing data, and entities

I'm new to WordPress, and I would like your opinion about the application I'm building. I have a database filled with a lot of data structured in a very nice and optimized entity design. I'm ...
0
votes
2answers
50 views

is it bad to copy the loop for a template?

I have created a page template to display specific data. Is it a bad idea to copy the loop from page.php and paste it as is in the template file? Does this mess with the loop? Doing this has made my ...
0
votes
0answers
660 views

Wordpress form submit to custom page template does not work

I have a form on the home page, which when user submits, the action takes him to another page. That another page is using my custom made page template page-quiz.php. So for the form submit action I'm ...
1
vote
1answer
118 views

How to include local menu based on page id?

I am creating different pages, using templates. For example: page-blog.php. For certain group of pages, I would like to include a local navigation. If I use page.php I am able to include the local ...
1
vote
1answer
94 views

How can I load a PHP page without using a Template?

I've been building out a website within a WordPress 'wrapper', and it's been going reasonably well. I've got a Plugin that holds some of my code, and I've got a Theme that holds other bits of my code,...
0
votes
1answer
31 views

Rewrite to load homepage for a different url

So I've been wondering if there's a way to force WordPress to load the homepage template for a URL. Eg.: https://example.com/example/another-example/my-post-slug/ should load the template belonging ...
-1
votes
1answer
481 views

Wordpress “Posts Page” isn't showing template dropdown

I am trying to add a custom tempalate to my "Posts Page"(archive, shows all blog posts) in wordpress, but there doesn't seem to be a template dropdown available. On any other page, It has a template ...
0
votes
1answer
18 views

Avoid pages losing template association on site re-deploy

To give you a quick background on what I am working with - I manage 3 copies of our company website; our live site that customers visit, a dev site that is live but not indexed so that our website ...
0
votes
1answer
29 views

Need to create a custom page on a website

I recently started my first wordpress task and it's about creating a custom page within a website. Now I know my PHP, CSS and HTML but while I am being used to working with angular etc. this is a new ...
0
votes
2answers
162 views

how to show all post in my page-grid.php template page

I have custom my template and trying to convert my html into wordpress template, i have created one page page-grid.php .and i want to show all my post with images .but don't know how to do this .and ...
1
vote
1answer
26 views

Custom page template with entirely different design. Is it possible in?

I'm trying to create 2 different page templates for a website here. The idea is that admin should be able to select this new template for specific pages at the time of creating it. Also, they should ...
0
votes
1answer
435 views

How to add custom meta box when you have a custom page template file

I've been trying to add a custom meta box in the Edit Page panel for a page using a specific template, in this case front-page.php. I have attempted to use both get_page_template_slug( $post_id ) and ...
1
vote
1answer
37 views

Best practice - pages - ACF or inline coding

I would like to migrate the following website to WordPress (http://www.absoluteblast.com.au). What is the best practice to implement the service pages? --> I thought to create a custom template which ...
0
votes
1answer
33 views

Is it possible to query a category with specified posts?

I have a page I'm setting up with various sections to display posts. I want the majority of the page to be user-editable, so I'm filling the sections using a shortcode I wrote. Example: This: [...
22
votes
7answers
49k views

Custom templates not showing up in template dropdown

I've got some problems with templates in Wordpress (multisite). I've created a file in the root of my child-theme folder (template-test.php) <?php /** * Template Name: Test template * */ ?> &...
0
votes
1answer
86 views

Adding a category view to a page

My categories are set up to display as a grid using the following code (category.php): get_header(); ?> <div id="content" class="site-content inner"> <div id="primary" class="content-...
1
vote
1answer
28 views

Functions For Calling Specific Elements

The php functions get_header() and get_footer() both call the header.php and footer.php files. Could I create a page like element.php and have a function call it (like get_element()), where I would ...
1
vote
1answer
505 views

Is it possible to set a page template on a dynamic home page (articles list)?

When we create or edit a page, we can often set a page template depending of the used theme. Let say we have a "default" and a "with sidebar" templates. My home page is a list of the last articles, ...
1
vote
1answer
161 views

Switch to page template when using post permalink

I'm new to wordpress development so hopefully I'm asking this right. The company I work for recently bought a custom wordpress site from an agency, but before we were able to launch it, the agency ...
0
votes
1answer
45 views

List child pages within page template

I am building a page template within a theme that lists child pages for a product page. Is it possible to change this so that it lists the children of the page the user is on rather than having to ...
0
votes
1answer
190 views

Display grandchild page content on parent page

I have a page hierarchy that looks like this: Top level page Child page Grandchild page Grandchild page Grandchild page Child page Grandchild page Grandchild page Grandchild page On my top level ...
0
votes
2answers
29 views

How can I switch pages?

I have website for local restaurant and for menu there are separate pages (ex: salads, soups etc). Right now the second restaurant was opened and it has a separate menu. What I want to do is to ...
0
votes
2answers
32 views

History of page, interval of years

I'm having a customer who wants a WordPress page, and I don't have the best overview of the plugins and possibilities for this exact requirement my customer wants. He arranges an seminar once a year, ...
0
votes
1answer
529 views

Use WordPress function in php file

I have a WordPress Child Theme and I have added a php file to this child theme. Also I want to use WordPress functions in this file ( I want to show header, menu and footer ) So I try <?php $...
1
vote
1answer
464 views

Can is_page and is_front_page both be true?

For some reason is_front_page isn't triggered on my subsite, running a child theme with its own header with a page set as a static home page under Reading. I have this code in header.php to control ...
0
votes
2answers
73 views

How do I make a variable available inside partials?

I've got a partial called within single.php that looks like this: <?php $userdata = get_userdata($post->post_author) ; ?> <div class="entry-meta"> <span class="byline ...
0
votes
1answer
524 views

Display content on Single page

I am building a single page theme, And I am having a problem with get_post_meta() The Problem This code bellow does not work, and I cannot see anything on the website as it's blank. Here is my index....
1
vote
2answers
873 views

Trying to edit the single page from a Custom Post

I have a custom post type where I can create pages in.("article.php") It automatically uses the template "single.php" when I create a page, although I want to change some things in it without ...
0
votes
3answers
158 views

How to create custom layouts and static pages in themes for clients

How do I build goodlooking, custom pages into my themes. I've decided to use underscores to create custom client themes, as I need complete freedom in design, and all the tutorials I've found on theme ...
5
votes
1answer
127 views

Is it possible to manipulate the list of page templates?

After answering this question I wondered if it is possible to manipulate the dropdown list of possible page templates that's available when you edit a page. WordPress derives this list from the ...
0
votes
1answer
701 views

Page template gives 'Parse error: syntax error' when used, but no error found!

I get this message, whenever I activate this page template for one page, for instance about.php : Parse error: syntax error, unexpected end of file in /home/u425744603/public_html/wp-content/themes/...
-2
votes
1answer
26 views

How to apply styles to the custom page template

I have made a simple page template according to what is said in the how to here :Page Templates When I create a page and in its 'Page attributes' make the template equal to the one I've created, ...
0
votes
1answer
62 views

Using page-something.php as static front page

I have created 2 pages inside wordpress "blog" and "hpage", on the config I have set static front page to "hpage" as initial page and "blog" for posts index. Now I want to create a "page-hpage.php" ...
1
vote
1answer
1k views

How do i change page template in bulk?

Googled for a long time, but did not find any solution. The case is - I have 950 pages I'd like to switch to other template. If i do it manually - it will take some time. If I do it via admin panel - ...
0
votes
1answer
37 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 ...
4
votes
1answer
4k views

Creating a template using a specific slug name, for a page with a parent page

I have always preffered to create layout templates for specific pages by creating a filename the same as the slug. So for example: Page Title: Contact Us Page Slug: contact-us Filename of template ...
1
vote
1answer
856 views

Load specific page template based on URI

I have a page template that I want to load, when ever my $_SERVER['REQUEST_URI'] is like this, www.site.com/link/147 where the number 147 will be variable. i.e. I would like a call a page template, ...
0
votes
0answers
448 views

display different pages content on single page

I am creating parallax website in wordpress, for this I am using html5blank-stable template. For my different sections, like about us, and contact etc I have created pages with respect to them. But as ...
5
votes
5answers
19k views

Is there a way to change the default page template selection?

Click on "Pages" -> Click on "Add New" In the add new page screen. The default page template selected is "Default Template". Is there a way to change the default option to, let's say "My Other ...