Permanent problem with custom taxonomy / personalized publication

So I have a custom publication type "press room" and a personalized "newsroomtopic" taxonomy and I want the following URL patterns:

Taxonomy file: / about-us / newsroom /% newsroomtopic%
Publication: / about-us / newsroom /% newsroomtopic% /% postname%
CMS page: / about-us / newsroom

My permanent message is established as:

/ about-us / newsroom /% newsroomtopic% /% postname%

At this time, my post is uploaded, but my file does not. If I add the following code to my custom taxonomy, the file for that taxonomy works, but my publication is no longer loaded, I assume it's because I'm using the same route.

& # 39; rewrite & # 39; => array (& # 39; slug & # 39; => & # 39; about-us / newsroom / & # 39 ;, & # 39; with_front & # 39; => false),

For more context, here is my code:

// Create the type of personalized publication of the press room
function newsroom_posts_init () {
$ args = array (
& # 39; label & # 39; => & # 39; Newsroom & # 39 ;,
& # 39; public & # 39; => true,
& # 39; has_archive & # 39; => "about-us / newsroom",
& # 39; show_ui & # 39; => true,
& # 39; capacity_type & # 39; => & # 39; post & # 39 ;,
& # 39; Hierarchical & # 39; => false,
& # 39; rewrite & # 39; => array (& # 39; slug & # 39; => & # 39; about-us / newsroom & # 39 ;, & # 39; with_front & # 39; => FALSE),
// & rewrite & # 39; => array (& # 39; slug & # 39; => & # 39; about-us / newsroom /% newsroomtopic% & # 39 ;, & # 39; with_front & # 39; => FALSE),
& # 39; query_var & # 39; => true,
& # 39; menu_icon & # 39; => & # 39; dashicons-media-document & # 39 ;,
& # 39; taxonomies & # 39; => array (& # 39; category & # 39 ;, & # 39; newsroomtopic & # 39;),
& # 39; supports & # 39; => matrix (
& # 39; title & # 39 ;,
& # 39; editor & # 39 ;,
& # 39; extract & # 39 ;,
& # 39; trackbacks & # 39 ;,
& # 39; Custom Fields & # 39 ;,
// & # 39; comments & # 39 ;,
& # 39; revisions & # 39 ;,
& # 39; miniature & # 39 ;,
// author & # 39 ;,
& # 39; page attributes & # 39;
)
);

register_post_type (& # 39; news room & # 39 ;, $ args);
}
add_action (& # 39; init & # 39 ;, & # 39; newsroom_posts_init & # 39;);

function create_newsroom_topic_taxonomy () {
// Add new taxonomy, make it hierarchical as categories
// first do the part of the translations for GUI
$ labels = array (
& # 39; name & # 39; => _x (& # 39; Themes & # 39 ;, & # 39; general name of taxonomy & # 39;),
& # 39; singular_name & # 39; => _x (& # 39; Theme & # 39 ;, & # 39; singular name of taxonomy & # 39;),
& # 39; search_items & # 39; => __ (& # 39; Search topics & # 39;),
& # 39; all_items & # 39; => __ (& # 39; All topics & # 39;),
& # 39; parent_item & # 39; => __ (& # 39; Parent Topic & # 39;),
& # 39; parent_item_colon & # 39; => __ (& # 39; Parent Topic: & # 39;),
& # 39; edit_item & # 39; => __ (& # 39; Edit Topic & # 39;),
& # 39; update_item & # 39; => __ (& # 39; Update Topic & # 39;),
& # 39; add_new_item & # 39; => __ (& # 39; Add New Topic & # 39;),
& # 39; new_item_name & # 39; => __ (& # 39; New Topic Name & # 39;),
& # 39; menu_name & # 39; => __ (& # 39; Themes & # 39;)
);

// Now register the taxonomy
register_taxonomy (& # 39; newsroomtopic & # 39 ;, array (& # 39; newsroom & # 39;), array (
& # 39; Hierarchical & # 39; => false,
& # 39; labels & # 39; => $ tags,
& # 39; show_ui & # 39; => true,
& # 39; show_admin_column & # 39; => true,
& # 39; query_var & # 39; => true,
// & rewrite & # 39; => array (& # 39; slug & # 39; => & # 39; about-us / newsroom / & # 39 ;, & # 39; with_front & # 39; => false),
// & rewrite & # 39; => array (& # 39; slug & # 39; => & # 39; about-us /% show_category% & # 39 ;, & # 39; with_front & # 39; => false),
));
}
add_action (& # 39; init & # 39 ;, & # 39; create_newsroom_topic_taxonomy & # 39 ;, 0);


function taxonomy_permalink ($ permalink, $ post_id, $ leavename) {
if (strpos ($ permalink, & # 39;% newsroomtopic% & # 39;) === FALSE) returns $ permalink;

// Get publication
$ post = get_post ($ post_id);
if (! $ post) return $ permalink;

// Get taxonomy terms
$ terms = wp_get_object_terms ($ post-> ID, & # 39; newsroomtopic & # 39;);
if (! is_wp_error ($ terms) &&! empty ($ terms) && is_object ($ terms[0])) $ taxonomy_slug = $ terms[0]-> slug;
else $ taxonomy_slug = & # 39; uncategorized & # 39 ;;

return str_replace (& # 39;% newsroomtopic% & # 39 ;, $ taxonomy_slug, $ permalink);
}
add_filter (& # 39; post_link & # 39 ;, & # 39; taxonomy_permalink & # 39 ;, 10, 3);
add_filter (& # 39; post_type_link & # 39 ;, & # 39; taxonomy_permalink & # 39 ;, 10, 3);

If possible, I do not want "about-us / newsroom" to be loaded as a file page, that would be a CMS page, I just want to upload the file by taxonomy.

I tried the following rewrite along with the previous code, with the same problem mentioned above:

add_action (& # 39; init & # 39 ;, & # 39; my_add_rewrite_rules & # 39;);
my_add_rewrite_rules () {function
add_rewrite_rule (& # 39; about-us / newsroom /(.+)/ page / ([0-9]{one,}) /? $ & # 39;, & # 39; Index.php? Post_type = newsroom & paged = $ matches[2]& # 39 ;, & # 39; top & # 39; );
add_rewrite_rule (& # 39; about-us / newsroom /(.+)/?$&#39 ;, & # 39; index.php? post_type = newsroom & newsroomtopic = $ matches[1]& # 39; , & # 39; top & # 39; );

add_rewrite_rule (& # 39; about-us / newsroom /(.+)/(.+)/?$&#39 ;, & # 39; index.php? post_type = newsroom & newsroomtopic = $ matches[1]& postname = $ matches[2]& # 39; , & # 39; top & # 39; );
}