Support » Plugins » Get category before post

  • I am trying to prompt my users to use a category. So I would like to be able to see if they have selected (checked) any categories when they click on the publish button. I tried to edit the publish button input field by adding a javascript confirm dialog, but I can’t determine if they have selected any categories. I can only see the default category if I use $post->post_category.

    There must be a way to get the category before it is written to the database. I can use a filter to modify the category or at least recognize that they category hasn’t been set but by that time the post has already been published.

  • The topic ‘Get category before post’ is closed to new replies.