the_post_navigation seems to ignore same category filter

You mention a custom post type, are you also using a custom taxonomy? If so you need to specify this taxonomy in your function call: the_post_navigation(array( ‘prev_text’=>__(‘previous project: %title’), ‘next_text’=>__(‘next project: %title’), ‘in_same_term’ => true, ‘taxonomy’ => ‘wpse240053_custom_taxonomy_name’, )); By default the built-in category taxonomy for Posts is used. This requires WP4.4 or later.

Return only top-level navigation items from a menu using wp_get_nav_menu_items

Let’s take a look at wp_get_nav_menu_items code reference. It takes two parameters: $menu – (int|string|WP_Term) (Required) Menu ID, slug, name, or object, $args – (array) (Optional) Arguments to pass to get_posts(). So we can use get_posts args in here… And if we want to get only top-level posts, then post_parent arg comes useful… So something … Read more

HTML Bootstrap navigation menu to WordPress menu using wp_nav_menu

You have to edit the files in: wordpress/wp-content/themes/twentyseventeen/template-parts/navigation/navigation-top.php and then create a custom walker, try to take a look here. Try in this way: <?php /** * Displays top navigation * * @package WordPress * @subpackage Twenty_Seventeen * @since 1.0 * @version 1.2 */ ?> <div class=”container”> <nav class=”navbar navbar-expand-lg navbar-light” id=”mainNav”> <a class=”navbar-brand js-scroll-trigger” … Read more