How do I exclude main pages and link only to sub pages?

I suggest using wp_nav_menu . This way you’ll be able to construct your own menus and link them to whatever you link or not to link at all. I’ve also used “Redirectify” plugin once, but I think it was removed. There is “Redirect” though which is probably the same , but I haven’t used it

Related posts for a post

Or, you can place this code in your active theme’s functions.php: <?php // First, backup the default $postdata $backup = $post; // Now, override the default $tags = wp_get_post_tags($post->ID); // Now, open the if ( $tags ) statement if ($tags) { $tag_ids = array(); foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id; // Now, setup your custom … Read more