[resolved] Custom Post Type and Custom Taxonomies (3 posts)

  1. martcol
    Posted 2 years ago #

    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: http://pastebin.com/J8xjSfAA.


  2. keesiemeijer
    Posted 2 years ago #

    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.

  3. martcol
    Posted 2 years ago #

    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!


Topic Closed

This topic has been closed to new replies.

About this Topic