WordPress.org

Make WordPress Core

Ticket #12759: meta-boxes-template-dropdown.diff

File meta-boxes-template-dropdown.diff, 727 bytes (added by greenshady, 5 years ago)

Don't show the template dropdown for non-page post types.

  • meta-boxes.php

     
    526526<p><?php _e('You can arrange your pages in hierarchies. For example, you could have an &#8220;About&#8221; page that has &#8220;Life Story&#8221; and &#8220;My Dog&#8221; pages under it. There are no limits to how deeply nested you can make pages.'); ?></p> 
    527527<?php 
    528528        } // end hierarchical check. 
    529         if ( 0 != count( get_page_templates() ) ) { 
     529        if ( 'page' == $post_type_object->name && 0 != count( get_page_templates() ) ) { 
    530530                $template = !empty($post->page_template) ? $post->page_template : false; 
    531531                ?> 
    532532<h5><?php _e('Template') ?></h5>