I have a url like this:
www.domainname/product/productname
which obviously uses a wordpress custom postlink using the custom tags given to me (%postname% as my products are just custom post types) however I would like it to be www.domainname/[metaproperty1]/[metaproperty2][metaproperty3]
where meta property 1 and 2 are taxonomies that relate to sale status and location of product and meta property 3 is an id (but crucially not the post id - it's an id generated by an API that an importer uses to add products to the DB)
so essentially I need to programatically set the new permalink. Any clues? I'm currently looking at using the register_post_type
function to register my custom post type with the 'rewrite' option and including placeholders like %metaproperty1% etc etc. that would be swapped out later on with the
$wp_rewrite->add_rewrite_tag
function, is this the correct way of thinking about it?