how to get category from wp_insert_post_data (1 post)

  1. maruf89
    Posted 3 years ago #

    I want to make a conditional filter that only modifies the insert post data to a certain category like

    function wp_add_date_meta( $data, $postarr ) {
          if (certain_category) {
                // do stuff

    but I am not given any information about the cat through the given arguments. Any clues?

Topic Closed

This topic has been closed to new replies.

About this Topic