• Yet again stuck at data entry system side.

    I cannot find a way to automaticly update a custom post when it is used in another custom post type.

    For example: ‘Man A’ in people post type has no taxonomys. Now i apply ‘Man A’ to a company post type who is under a Boss selection.

    I would need ‘Man A’ to automaticly have Boss Taxonomy applied to his original people post type.

    My current system is scary in long term as i would have to apply it in company, then manaualy pull profile to then also add the Boss taxonomy. Times that with thousands of entrys and project changing hierarchys…
    I already have a drop down menu that pulls all people enteries. I would just need a way to automaticly apply the Taxonomy to the People post type aswell without need of manual editing every time.

    I have read up on wp_insert_term but not really clear on how i would apply this to my template.

    Thanks in Advance.

Viewing 1 replies (of 1 total)
  • Thread Starter Matthew O'Donnell

    (@serpream)

    <div class="displayed_game_details"><?php echo get_the_term_list( $post->ID, 'industry_aliases', '<li>', '</li><li>', '</li><br></br>');
    	  $parent_term = term_exists( '', 'industry_aliases' ); // array is returned if taxonomy is given
    $parent_term_id = $parent_term['term_id']; // get numeric term id
    wp_insert_term(
      'Designer', // the term
      'industry_experience', // the taxonomy
      array(
        'slug' => 'designer',
        'parent'=> $parent_term_id
      )
    );?></div>

    Prob waaaaaaaaaay off but gives a idea of what i am trying to achieve.

Viewing 1 replies (of 1 total)
  • The topic ‘Update custom post with Taxnonomy if custom post is used in another custom post?’ is closed to new replies.