page-template-example
page-template-example copied to clipboard
Quick Edit
Hi, @tommcfarlin. Great solution! But some problem in Quick Edit - new custom page template not exists.
Thanks! Will take a look at this as soon as I have a chance to get back around to this particular plugin.
@cheh @tommcfarlin The solution to this issue was discussed here: https://wordpress.org/support/topic/sub-menus-on-some-pages-not-others-using-page-templates/?replies=14#post-4771617 and here: http://www.wpexplorer.com/wordpress-page-templates-plugin/#li-comment-24233.
The first option suggests hooking the register_project_templates()
method to the wp_dropdown_pages
hook instead of the page_attributes_dropdown_pages_args
hook in line 82 within the construct method like this:
// Add a filter to the page attributes metabox to inject our template into the page template cache.
add_filter( 'wp_dropdown_pages', array( $this, 'register_project_templates' ) );
The second option is to add the register_project_templates()
method to the quick_edit_dropdown_pages_args
hook in addition to the page_attributes_dropdown_pages_args
hook. You can add this filter below the first one after line 82:
// Add a filter to the quick edit menu to inject our template into the page template cache
add_filter( 'quick_edit_dropdown_pages_args', array( $this, 'register_project_templates' ) );
Both solutions worked for me, but I chose to use the second option since it seems more explicit to me.
I'm planning to revisit this particular plugin sometime this week so I'll try to get this issue resolved.
I appreciate the patience and the notes above, @ajvillegas.