Solved: How to enable buttons for all post types
-
I’ve seen a lot of reviews with the complaint that the plugin doesn’t support custom post types. I needed this for several sites so instead of tweaking the code to manually add each custom post type, I’ve applied a tweak so that all post types are supported by default. I’ll explain the change below, in case anyone else finds it useful. Maybe the developer can include this in a future release?
Find line 48 in edit-next-previous-post-admin.php (/wp-content/plugins/buttons-to-edit-next-previous-post) that looks like this:
if( strpos($screen->parent_file, 'edit.php') !== FALSE && in_array($screen->id, $supported_types) && in_array($screen->post_type, $supported_types) && $screen->action != 'add'){
and change it to this:
if (strpos($screen->parent_file, 'edit.php') !== FALSE && $screen->action != 'add' && strpos($screen->id, 'edit-') === false) {
The buttons should now appear on all post types, including custom ones.
- The topic ‘Solved: How to enable buttons for all post types’ is closed to new replies.