Tinymce editor broken for custom post type
-
I am using the recipe press plugin. When editing a recipe as any other role than Administrator the page breaks. Tinymce editor is not loading.
I have added the following to my theme functions.php file, but it hasn’t solved the issue. I want users with the role editor to be able to edit and add new recipes.
function s2_admin_changes( $capability, $menu ) {
// $capability is the core WordPress capability to allow admin page access
// $menu is the title of the page:
// ‘user’ for access to personal subscription settings
// ‘manage’ to allow access to the user management screen
// ‘settings’ to allow access to the plugin settings
// ‘send’ for access to the Send Email page// identify the menu you are changing capability for first
// then return a new capability
if ( $menu == ‘settings’ ) {
return ‘read’;
}return $capability;
}add_filter(‘s2_capability’, ‘s2_admin_changes’, 10, 2);
function my_post_types($types) {
$types[] = ‘recipe’;
return $types;
}
add_filter(‘s2_post_types’, ‘my_post_types’);function my_taxonomy_types($taxonomies) {
// where ‘my_taxonomy_type’ is the name of your custom taxonomy
$taxonomies[] = ‘recipe-category, recipe-cuisine, recipe-course, recipe-servings, recipe-size, recipe-serving-size’;
return $taxonomies;
}
add_filter(‘s2_taxonomies’, ‘my_taxonomy_types’);
The topic ‘Tinymce editor broken for custom post type’ is closed to new replies.