Home Forums Plugin Support WP User Frontend (Free Version) Exclude Category From Dashboard

This topic is: resolved

This topic contains 8 replies, has 2 voices, and was last updated by  Denis 5 years, 3 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #13323

    Denis
    Participant
    Post count: 165

    Hi there,
    In the dashboard, all my posts a shown, even if I dont post them via the plugin.
    How can I exclude a special category in the dashboard not to show up.
    Cheers,
    Denis

    #13356

    Tareq Hasan
    Keymaster
    Post count: 2831

    You can add filter on the dashboard query and remove posts from a certain category.

    #13404

    Denis
    Participant
    Post count: 165

    what is the args for categories?

    #13442

    Tareq Hasan
    Keymaster
    Post count: 2831

    You can add multiple category id's to exclude:
    'category__not_in' => array( 2, 6 )

    #13551

    Denis
    Participant
    Post count: 165

    where can I find an ARGS list?

    #13619

    Tareq Hasan
    Keymaster
    Post count: 2831

    The link is in my previous post.

    #13634

    Denis
    Participant
    Post count: 165

    ๐Ÿ™‚

    I cant get it to work…

    function wpufe_dashboard_sort( $args ) {
    
        'category__not_in' => array( 2, 6 )
     
        return $args;
    }
    
    add_filter( 'wpuf_dashboard_query', 'wpufe_dashboard_sort' );
    #13688

    Tareq Hasan
    Keymaster
    Post count: 2831

    You did a little mistake:

    [php]
    function wpufe_dashboard_sort( $args ) {

    $args[‘category__not_in'] = array( 2, 6 );

    return $args;
    }
    [/php]

    #13731

    Denis
    Participant
    Post count: 165

    Hey Tareq,
    thanks a lot, that works great!!!

    Maybe you can help me here, too. its a little off topic, but it seems to be the same.

    I want to set the args (parameters) for this wp

    previous_post_link and next_post_link

    I need to do it in my function.

    like:
    add_filter (next_post_link, my_new_post_link)
    add_filter (previous_post_link, my_new_post_link)

    function my_new_post_link($args){

    in_same_cat = true;

    }

    maybe you can have a look here, too.
    cheers,
    Denis

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Exclude Category From Dashboard’ is closed to new replies.