i’m trying to add a custom post that will create terms and sync with an existing location taxonomy of MEC
i looked this old post
Maintaining strict one-to-one association between terms and custom posts
i got it working https://github.com/elarifr/mec-extended-lpt
I have added a custom post type that link with the custom taxonomy mec_location from MEC Modern Event Calendar plugin
but the slug saved in taxonomy is the post id. i have just removed the slug in $term = mec_get_custom_term( $post );
so the taxonomy get a friendly slug based on post name too.
but then it does not update or delete the taxonomy when i edit or delete post..
1/ how should i updated this to add an hidden field in taxonomy to store the custom post id and rely on it for sync add / update / delete. there is no need to display / edit the field in taxonomy.
2/ got it working using get_post_permalink( $post->ID ) and seems enough – when creating the taxo i would like to pre insert in taxonomy description the url of the post so that i can add a read more button from taxonomy to the custom post
i have tried to change this
$args = array(
//’slug’ => mec_get_custom_taxonomy_term_slug( $post ),
‘description’ => ‘My custom desc inserted post_id in the slug=’ . mec_get_custom_taxonomy_term_slug( $post )’ ,
);
so the content is added, but how i get the_permalink()
thanks