Support » Fixing WordPress » Custom Post Type and Custom Taxonomies

  • Resolved martcol


    I am trying to attach several custom taxonomies to a single Custom Post Type in a plugin (Organisation type and sub type and region).

    I can manage to get one taxonomy and the CPT to show in my dashboard but I’m stumbling over how to add other taxonomies.

    I’m not much of a coder but I think I now understand what the code is doing to register the post type and taxonomy but this next step is defeating me.

    Here is my current code:


Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator keesiemeijer


    You’re using the same function name “custom_taxonomy” twice. The conditional if ( ! function_exists('custom_taxonomy') ) prevents the second custom_taxonomy function being executed. Put all your taxonomy code into one function or change the function names to be unique.

    Thank you for your help,

    I think I am back on track.

    I think I scratched, searched, stared, surfed and scrutinized for about 7 or 8 hours before posting my question. Somehow the pain of the problem is far outweighed by the relief of the solution!


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Post Type and Custom Taxonomies’ is closed to new replies.