Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default page template can be empty string or ‘default' #347

Closed
barryceelen opened this issue Sep 21, 2016 · 2 comments
Closed

Default page template can be empty string or ‘default' #347

barryceelen opened this issue Sep 21, 2016 · 2 comments

Comments

@barryceelen
Copy link
Contributor

To show a meta box on a page with the ‘default’ template selected (or no template selected) you currently have to do this:

'page-template' => array( '', 'default’ )

Would be nice if the plugin would handle this.
On a side note, it would be better to check for the current page template by using get_page_template_slug( $post_id ) in stead if get_post_meta( $post_id, '_wp_page_template', true ). The former always returns an empty string if the ‘default’ template or no template is chosen.

Kind of related: #305

@swissspidy
Copy link
Contributor

get_page_template_slug() makes sense and there won't be any post type check anymore in WordPress 4.7

@mikeselander
Copy link
Contributor

Closing this issue as we will not be pursuing enhancements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants