Custom post type’s slug gets wrong when adding a custom meta box

This strange behaviour is very likely to be caused by the additional form tag you’re adding. The meta boxes are already encapsulated by a form, so adding one yourself in the meta box callback is unnecessary. Removing <form action=”<?php bloginfo(‘url’); ?>” method=”get”> and </form> should solve your issues. EDIT: Seeing as this didn’t solve your … Read more

Remove taxonomy slug when not assigning taxonomy with custom post types

The post_type_link filter is responsible for modifying the permalinks that are output, but it’s not connected to resolving incoming requests for those permalinks. So you’ll need to modify your function to output the correct links, but also add a rewrite rule so WordPress knows what to do when those pages are requested. This is all … Read more

Custom Post Loop in Archive returns same the_permalink

This is an extention to your answer. Your pre_get_posts action has a few flaws function add_custom_types_to_tax( $query ) { if( is_category() || is_tag() && empty( $query->query_vars[‘suppress_filters’] ) ) { // Get all your post types $post_types = get_post_types(); $query->set( ‘post_type’, $post_types ); return $query; } } add_filter( ‘pre_get_posts’, ‘add_custom_types_to_tax’ ); is_category() and is_tag() should be … Read more