page-template-example icon indicating copy to clipboard operation
page-template-example copied to clipboard

Quick Edit

Open cheh opened this issue 9 years ago • 3 comments

Hi, @tommcfarlin. Great solution! But some problem in Quick Edit - new custom page template not exists.

screenshot_1

cheh avatar Nov 30 '15 14:11 cheh

Thanks! Will take a look at this as soon as I have a chance to get back around to this particular plugin.

tommcfarlin avatar Nov 30 '15 14:11 tommcfarlin

@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.

ajvillegas avatar Sep 03 '16 19:09 ajvillegas

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.

tommcfarlin avatar Sep 05 '16 22:09 tommcfarlin