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

admin2025-01-08  4

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

    <?php
/**
 * Template Name:Zoho testAPI
 *
 *
 *
 * 
 */


echo phpinfo();
?>

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

    <?php
/**
 * Template Name:Zoho testAPI
 *
 *
 *
 * 
 */


echo phpinfo();
?>
Share Improve this question edited Dec 17, 2016 at 18:21 fuxia 107k38 gold badges255 silver badges459 bronze badges asked Dec 14, 2016 at 11:06 Vivek TamrakarVivek Tamrakar 2542 silver badges16 bronze badges 3
  • Try a space between : and your template name – iantsch Commented Dec 15, 2016 at 8:58
  • @iantsch you see before any comment sixteen themes – Vivek Tamrakar Commented Dec 15, 2016 at 8:59
  • here are not any options to select template – Vivek Tamrakar Commented Dec 15, 2016 at 8:59
Add a comment  | 

1 Answer 1

Reset to default 0

Twenty Sixteen does not contain any post type templates by default, thus no template selection is shown.

Adding a custom foo.php file to the wp-content/themes/twentysixteen folder with the following content works just fine and reveals the template selection meta box (title: "Page Attributes"):

<?php
/**
 * Template Name: Foo Bar
 * Template Post Type: post, page
 */

 // Do some stuff…

It also works for pages only using Template Name without Template Post Type:

<?php
/**
 * Template Name: Foo Bar
 */

 // Do some stuff…
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736266684a1140.html

最新回复(0)