Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Role scoper blocking custom posts types

UserPost

2:32 pm
April 5, 2011


prionkor

New Member

posts 1

1

/* From wordpress forum */

Hi, i have installed role scoper and it now block all my custom posts to normal visitors.

what should i do?

i have registered the post types in different file rather than functions.php for organizing purpose then include it top of the functions.php is that a problem?


add_action('init', 'register_classifield', 1);

add_action("admin_init", "classifield_option_init");

add_action('save_post', 'save_classifield_options');

function register_classifield(){

    $labels = array(

        'name' => _x('Classifields', 'post type general name'),

        'singular_name' => _x('Classifield', 'post type singular name'),

        'add_new' => _x('Add New', 'Classifield'),

        'add_new_item' => __('Add New Classifield'),

        'edit_item' => __('Edit Classifield'), 

        'new_item' => __('New Classifield'), 

        'view_item' => __('View Classifield'), 

        'search_items' => __('Search Classifields'), 

        'not_found' =>  __('No Classifields found'), 

        'not_found_in_trash' => __('No Classifields found in Trash'), 

        'parent_item_colon' => '' 

        );

       

    $args = array( 

           'labels' => $labels, 

        'public' => true, 

        'publicly_queryable' => true, 

        'show_ui' => true, 

        'query_var' => true, 

        'rewrite' => true, 

        'capability_type' => 'post', 

        'hierarchical' => false,

       'menu_position' => 5,

       'taxonomies' => array('classifield-tag', 'classifield-category'),

       'supports' => array('title', 'editor', 'thumbnail', 'revisions')

  ); 

 

  register_post_type('classifield', $args);

}

4:36 pm
April 5, 2011


Kevin

Admin

posts 2503

2

I'll look at this as soon as I can. Need to deal with some client work first.

2:20 pm
April 6, 2011


Kevin

Admin

posts 2503

3

I tried your registration code and don't see any problems. If you need to enable a non-Administrator to edit the custom posts, use Roles > General to assign the appropriate roles. Or if you don't want Role Scoper to modify access to the types/taxonomies at all, disable them in Roles > Options > Realm.


About the Agapetry forum

Currently Online:

15 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1249

Posts: 5659

Members:

There are 1261 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin