WordPress.org

Ready to get started?Download WordPress

Forums

User Specific Content
[resolved] cant use it proper way (2 posts)

  1. mick_006
    Member
    Posted 1 year ago #

    Hi there
    i have use your plugin for display the post to specific users and roles, but it just hide the content in detail pages. i want display post if user is allowed to see that. and i have also use the short code like this:
    $args = array( 'child_of' => 50,'post_type' => 'page' ,'post_status' => 'publish');
    $sub_items = get_pages( $args );
    $curauth=wp_get_current_user();
    foreach($sub_items as $sub_menu):
    $class=''; if($post->ID==$sub_menu->ID){ $class="current-menu-item";}
    if($sub_menu->post_title){ $page_title=$sub_menu->post_title;}else{ $page_title=$sub_menu->title;}
    $content='<li class="'.$class.'">'.$page_title.''
    ?>
    <?php echo do_shortcode('[O_U user_ID="'.$curauth->ID.',1" user_role="'.$curauth->roles[0].'" blocked_message=""]'.$content.'[/O_U]');?>
    <?php endforeach;?>

    but doesn't work plz help to this

    http://wordpress.org/extend/plugins/user-specific-content/

  2. Bainternet
    Member
    Plugin Author

    Posted 1 year ago #

    sorry, what?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.