Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 533 Vote(s) - 3.46 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Template Dropdown not showing up within Wordpress administrator page

#11
Jack Nicholson was right! You need to make sure your style.css contains the full comment. Example below:

Previously mine was:

/*
Theme Name: Acadata
Theme URI:

[To see links please register here]

Description: Custom
Author: Factory Pattern
Version: 1
License: GNU General Public License
License URI: license.txt
*/

Then I changed it to the below and now I can see all my templates.

/*
Theme Name: Acadata
Theme URI:

[To see links please register here]

Description: Custom
Author: Factory Pattern
Author URI:

[To see links please register here]

Description: The Acadata theme for WordPress.
Version: 1.0
License: GNU General Public License v2 or later
License URI:

[To see links please register here]

Tags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, flexible-width, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready
Text Domain: acadata

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

Reply

#12
Please set properly you style.css file specially if you are working on child-theme

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-css -->

/*
Theme Name: Theme Name
Theme URI: http: //mysite.com/
Description: This is a custom child theme for xxx theme
Author: My Name
Author URI: http: //mysite.com/
Template: template_name_in_lowercase
Version: 0.1
*/

<!-- end snippet -->

Reply

#13
Put style.css in your theme directory, instead of the css folder. Or

<?php
/*
Template Name: Front Page
*/
?>

There must not space between "Template Name:".
Reply

#14
This below is work for me and show template option in page attributes.Just place .php file in theme root folder.

<?php
/* template name: my custom template */
?>
Reply

#15
I tried many of the suggested answers. None worked in my case.

A possible reason for the Template Dropdown not showing is **a missing `index.php`** in your Theme folder.

Just create an empty one, in case your hierarchy does not need one. But the existance of that file enables the option to choose the page template and suppresses an error message in the Choose-Theme page btw
Reply

#16
sass had deleted the content in my child style.css. The template drop down shows again once I added back the comments.
/*
Theme Name: Sometheme Child
Description: Child theme for Sometheme.
Template: sometheme
Version: 1.1
Text Domain: sometheme-child
*/

Reply

#17
There are a lot of great answers on this question, but one obvious solution, which initially escaped me, was to double-check that in **Dashboard > Settings > Reading** you want to set "Your homepage displays" to "Static Page" and then leave the "Posts Page" unselected.

While themes and a properly coded theme file play a role in the situation, the reason that the page attributes area on the edit page screen doesn't show the templates drop-down may be because you selected a particular page to be your "Posts Page", and so WordPress is not asking you for a custom template to use because it's already using front-page.php or home.php ([See WordPress Template Visual Hierarchy][1]).

Hope this helps someone like me who had a properly coded template file but didn't realize this setting had been selected.


[1]:

[To see links please register here]

Reply

#18
I managed to fix this by making sure the `style.css` in the theme root contained the theme comments. I deleted the whole stylesheet and it removed the templates dropdown.

Put this at the top of your theme root's `style.css`.

`/wp-content/themes/YOUR_THEME/style.css`

/*
Theme Name: Twenty Thirteen
Theme URI:

[To see links please register here]

Author: the WordPress team
Author URI:

[To see links please register here]

Description: The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small.
Version: 1.0
License: GNU General Public License v2 or later
License URI:

[To see links please register here]

Tags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, flexible-width, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready
Text Domain: twentythirteen

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

[To see links please register here]


Or if you have a custom theme...

/*
Theme Name: My Wordpress Theme
Theme URI:

[To see links please register here]

Author: Me
Author URI:

[To see links please register here]

Description: This is my custom theme
Version: 1.0
*/


Reply

#19
This was also a problem for me and it was because of folder structure. The Theme Handbook told me a should organize my theme folder and files like so:

assets (dir)
- css (dir)
- images (dir)
- js (dir)
inc (dir)
template-parts (dir)
- footer (dir)
- header (dir)
- navigation (dir)
- page (dir)
- post (dir)
404.php
archive.php
comments.php
footer.php
front-page.php
function.php
header.php
index.php
page.php
README.txt
rtl.css
screenshot.png
search.php
searchform.php
sidebar.php
single.php
style.php

The page template I was trying to load was in `/template-parts/page/template-contactus.php`

I guess that was too deep for WordPress so I got ride of those directories and now my file structure looks like this:

assets (dir)
- css (dir)
- images (dir)
- js (dir)
inc (dir)
template-parts (dir)
- section-content.php
- template-contactus.php
404.php
archive.php
comments.php
footer.php
front-page.php
function.php
header.php
index.php
page.php
README.txt
rtl.css
screenshot.png
search.php
searchform.php
sidebar.php
single.php
style.php

I am now able to see the template drop-down and add templates.

Hope this helps someone.
Reply

#20
In my case, I had called the template schedule-template-v2.php which won't work, the file name needs to be schedulev2-template.php. A simple mistake.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through