• 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’);

    https://ww.wp.xz.cn/plugins/subscribe2/

Viewing 1 replies (of 1 total)
  • @nudeweb

    I’m not sure if this is the only reason but your taxonomy registration code isn’t right. You need to add the taxonomy names as an array and not a string. Separate the list of comma seperated names into different lines.

Viewing 1 replies (of 1 total)

The topic ‘Tinymce editor broken for custom post type’ is closed to new replies.