Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8548651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:32:38+00:00 2026-06-11T13:32:38+00:00

I run a multiple author WordPress site with thousands of posts. To highlight good

  • 0

I run a multiple author WordPress site with thousands of posts. To highlight good posts, I filter them by specific tags that only admins can set. For instance featured, front page etc.

To avoid my authors selecting these tags themselves, I use the following script. If the user has selected a prohibited tag, it will be removed once they click the publish button. Comments are for convenience:

add_action('save_post', 'remove_tags_function', 10, 1); //whenever a post is saved, run the below function

function remove_tags_function( $post_id ){
    if(!current_user_can('manage_options')){ // if the logged in user cannot manage options (only admin can)
        $post_tags = wp_get_post_terms( $post_id, 'post_tag', array( 'fields'=>'names' ) ); //grab all assigned post tags
        $pos = array_search( 'tag-to-be-deleted', $post_tags ); //check for the prohibited tag
        if( false !== $pos ) { //if found
            unset( $post_tags[$pos] ); //unset the tag
            wp_set_post_terms ($post_id, $post_tags, 'post_tag'); //override the posts tags with all prior tags, excluding the tag we just unset
        }
    }//end if. If the current user CAN manage options, the above lines will be skipped, and the tag will remain
}

There is a major issue with this solution. Once the post has been published, an admin gives it a featured tag – however if the original author would make any updates to their post, the tag will disappear. Do you understand the problem?

Many authors like to do revisions to their posts, especially when receiving feedback in the comments, and then there are the type of posts that are news related, which requires to be updated frequently.

What solution can you propose that will solve this scenario? Admins will need to be able to give the featured tag, and if the author updates their post, the tag should remain. What a puzzle…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:32:39+00:00Added an answer on June 11, 2026 at 1:32 pm

    I would propose not using tags at all for your admin properties. In essence, all you are looking to do is mark certain posts with certain attributes.

    For this I might sugest using a custom taxonomy.

    See the linked article, especially the “Using Labels For Taxonomies” section to give you some ideas on how to add custom handling for your attributes, that could be kept separate from the tag system altogether.

    The Link

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I run a multiple author website. I want to restrict a few tags from
I want to write a method that run multiple threads and I want before
What can i use to make multiple tabs that run multiple forms in my
I've been trying to find something that will let me run multiple commands on
I run multiple webpages that I have programming in .net. I am looking at
I have to run multiple queries that are dependent on each other select a
is it a good idea to run multiple Solr instances on one physical machine?
I run multiple screen sessions each created with 'screen -S name ' and I
How to run multiple dos commands? I have a for loop, which runs detection
I want to run multiple instances of apache on one single machine? How to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.