The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Hide category in admin view (4 posts)

  1. andyhoyland
    Posted 9 years ago #

    Hi all. Hope you are all well.

    I was wanting to know if it is possible to hide certain categories in the "Recent Activity" section of the admin panel within WordPress.

    I use WordPress as a CMS and I post a few comments/posts that I don't need a lot of my authors or contributors to see. Is this possible. I think I know where to look but I am not sure what to put in...

    Any suggestions?! Thanks muchly...

    PS I've been looking in the index file within the admin folder of my install. More specifically at the following code:

    if ( $recentposts = $wpdb->get_results("SELECT ID,
    post_title FROM $wpdb->posts WHERE post_type =
    'post' AND post_status = 'publish' AND
    post_date_gmt < '$today' ORDER BY post_date
    DESC LIMIT 5") ) :

    I want to insert something along the lines of AND post_category NOT ='x' or something but can't make that work. My SQL knowledge isn't great so sorry if this is a foolish suggestion... I am getting better!

  2. andyhoyland
    Posted 9 years ago #

    Ok - I guess I didn't phrase this question properly!

    Anyone have any ideas what I'm talking about - I don't know what else to say!!

    Sorry if I've not made sense...

  3. MichaelH
    Posted 9 years ago #

    Haven't tested it, but try the LEFT JOIN example from Otto that is in Displaying_Posts_Using_a_Custom_Select_Query.

  4. andyhoyland
    Posted 9 years ago #

    Thanks Michael. I've still not had a chance to try this but I'll let people know when I do!

    Thanks again...

Topic Closed

This topic has been closed to new replies.

About this Topic