Wordpress. The template tab of a page doesn't appear - php

In admin panel of Wordpress I have created a new page named "Home". In a theme folder I created file with name "home.php" where wrote "<?php /* * Template name: home */". But in page edit the "template" tab doesn't appear even after hard reload. I have no idea what's the problem. Could anyone help me please?
I tried to do hard reload many times. Tried firstly to create template file and then the page and vise versa

I think the problem is home.php is a reserved template name, please check, you'll see home.php as a fallback for front pages and index
Try changing the file name to template-home.phpor something different, that should work

Related

How do I assign default pages of Ultimate User plugin in WordPress?

I am a beginner in WordPress and tried to use the Ultimate User plugin. Installation seemed fine and when I add the default pages to my menu options, and click, it will have a "/?page_id=12" path (or different numbers) but the same page as I see as a home page. I was expecting to see pages such as "members" with a list of members or "profile" with your profile details.
I have tried creating a blank page.php file in my drive but that made the entire page blank, instead of the same contents as the home page.
I have just the add_theme_support('menus'); line in my functions.php file.
There are some .php files in "templates" folder of the plugin but I am not sure if I should copy that file to my "themes" folder, or do anything with it to show the right page.
It would be appreciated if someone could give me some tips to solve this issue. Thank you.

can not find content folder in prestrashop

I am new in prestrashop. I am working on http://www.how2brich.com
website. There is about menu. I have putted content of this menu through admin but i want to change some data inside the code.
the link is showing http://how2brich.com/content/4-about-us this.
I am not content folder and 4-about-us page for change code.
Any one plz help where to get about-us page content.
To change content of this page go to Preferences >> CMS and if you want to change the code go to "/themes/yourthemename/cms.tpl" but keep in mind it will change all CMS pages code so add a condition(like if , else) to add specific code for this page.
To get content editor "about-us" page please enter Back-Office. Then Preferences->CMS. And then please click on button "edit" on the "about-us" line.
If you need to change the code (template) of the cms pages please find the template on the path "themes/your_theme/cms.tpl"

How do I edit an individual page in WordPress

I don't want to edit the template files - I'd like to make a new template file. I'm looking in the MySQL registry, but all I see is a table for posts, not pages. Someone mentioned the editor earlier, but that doesn't help with creating new templates.
I think I create a php file in my content>theme>my_theme directory, but I'm not certain.
Thanks for any help.
This should help you out:
It shows you which pages map to which template, and how new templates should be created. As an example, if you created an About Us page (singular, static page with the default page template), here's what Wordpress checks for:
Is there a file called page-about-us.php?
No? Is there a page called page-#.php (where # is the pageid)
No? Just render the generic page.php
In your case, if you want to edit a single page (it's a page right, not post?) .. then simply creating a file called page-$slug.php would be sufficient .. WP will use that "template" when rendering that page.
If it's still a bit unclear, check out the source link here (it makes things crystal clear!): http://make.wordpress.org/docs/theme-developer-handbook/part-one-theme-basics/template-hierarchy/
You can create your own template files in your theme directory, or a subfolder. Use a comment on top that has the name of the template.
/*
Template Name: Custom Template
*/
You can assign the template to a page under the "Page Attributes" box in the dashboard.
Of course you need more than just that comment to display anything in your template. You might stay by copying the content of your theme's index.php, then edit from there.

Wordpress - all pages link to the index.php file

[NEW AT WORDPRESS]
I'm creating my own wordpress theme with own css etc etc. I've managed to get everything good in the index.php file, and I'm trying to make the other pages as well now.
When I make the home.php, blog.php, about.php and contact.php file (in my theme folder) they don't link to it. I'm following the "WordPress 3: Creating and Editing Custom Themes with Chris Coyier" on Lynda.com and the example shows that whenever you make a file with the same name as your page, it takes that directly (which works at his tutorial).
Anyone that could know what is going on?
Example:
I got a file blog.php in my theme folder, and when I go to www.mydomain.com/blog the loaded file is the index.php file, instead of the blog.php file
There are two ways you can get this working using custom page templates.
Create a template for one specific page using the page slug or ID. In this case, change the name of the php files like this to match the name of the page you created in the UI: page-home.php, page-blog.php, page-about.php and page-contact.php
Much more flexible is to create a custom template that can be used on ANY page. Just add the template name to the top of the php file like so (inside the php block):
/*
Template Name: My Home Page Template
*/
Then edit the pages and select your custom template from the template dropdown menu (on the right hand side I think, if its visible).
Reference this page for more info: https://developer.wordpress.org/themes/template-files-section/page-template-files/
Found the solution to my (silly) problem.
Creating a page in your theme directory & adding the template comment at the top of your php file isn't enough. You need to go to the admin panel->pages->YOUR PAGE-> and check out the page attributes. There you can link the page to a certain template: http://d.pr/i/a0m0

Wordpress adding a news page with custom template loads wrong template

I am building a new website and trying to add a new page for news with a custom template. The only problem is that it does not load the template file I set it to load, instead it loads my homepage template. I figured it had something to do with the Template_Hierarchy but it seems i'm unable to find out or change the fact that it loads a wrong template file.
Things i use atm for news
Page: News
Custom post type: News
Taxomony tag: News
Perhaps i should change something because they all use the same names.
The URL where I want the custom template to load is
http://www.website.com/news
I hope someone can help me out with this.
Thanks in advance.
Edit:
I've just noticed that also when I visit any other page that menu button gets highlighted(so you know you are on that page atm.) But when I visit the news page it highlights "Home".
From what you have mentioned, I think you should change the theme file name and check the template settings in Wordpress Backend if you are able to view the template.
For eg
/*
Template Name: News New
*/
Thanks and Regards
Shiva
Create a php file inside your theme folder with the name 'page-news.php'. Copy the same code as your 'page.php' file inside page-news.php. This is the file that will be loaded when you enter http://www.website.be/news. Customize this file as you wish.

Categories