Tell us what you are trying to do?
I am trying to make my event custom post type permalink include the event-type taxonomy
Is there any documentation that you are following?
https://toolset.com/forums/topic/custom-taxonomies-not-showing-on-permalink/#post-16949
Here is the code I saved in the toolset code snippets, using the above documentation as a guide:
// custom taxonomy permalinks
add_filter('post_link', 'eventtype_permalink', 10, 3);
add_filter('post_type_link', 'eventtype_permalink', 10, 3);
function eventtype_permalink($permalink, $post_id, $leavename) {
if (strpos($permalink, '%eventtype%') === FALSE) return $permalink;
// Get post
$post = get_post($post_id);
if (!$post) return $permalink;
// Get taxonomy terms
$terms = wp_get_object_terms($post->ID, 'event-type');
if (!is_wp_error($terms) && !empty($terms) && is_object($terms[0])) $taxonomy_slug = $terms[0]->slug;
else $taxonomy_slug = 'other';
return str_replace('%eventtype%', $taxonomy_slug, $permalink);
}
The link shows correctly in the post editor (hidden link), but when you view the page, it says the page does not exist. I have managed to do this once before, following these instructions, but I lost that website and cannot work it out again!!