If you create multiple pages using the Features or Services page templates, then assign them to a specific category and attempt to add direct links to the posts in your menu, the page title on the directly linked posts will inherit the last page created using the corresponding template. This is due to how the title is derived – if you have multiple parent pages, it has no way of knowing which one is the one set to the same category the post belongs to. What it can do is determine which category the post belongs to. When viewing the posts using the ajax format (the main view with the sidebar post links that do not reload the page) it can create this structure correctly. When you link directly to the post, you take the post out of that structure to where WordPress can only depend on its default hierarchy:

Page with no category set / page with category set / category /post name

The Solution

The simplest solution is to remove the direct post links from your menu. In most cases, the sidebar post links provide sufficient navigation. By using only top-level page links in your main menu, you encourage optimal navigation paths for your visitors which in turn grant them the best user experience and minimal confusion.

If you have a specific need to change how the titles work on single posts, you will need to modify the template.

This is considered a modification, and is provided as-is. We expect you understand what you are doing if applying coding changes using these or other WordPress tutorials. Make a backup of your existing file so you can replace it if something goes wrong and you need to start over. Modified files WILL probably be replaced by a theme update at some point, so keep note of your changes for future reference or see our guides below. We cannot assist you with modifying your theme or support problems you encounter as a result!

If you are modifying a theme as part of a client project, the following are really important!

How to Modify Your Theme the Right Way
How to Track Update Changes and Maintain Modifications

The following should be applied to our Dynapack eCommerce framework only (Dynamo, Flatpack, Jumbo, Stylist, Department, Capital, etc).

The following snippet may be inserted on line 33 of the functions/page-title.php:

<?php elseif(is_singular('features') || is_singular('services')) : ?>
        <div id="title-container">
        <div class="title-block"> 
            <?php $terms = get_the_terms($post->id, 'features-category');                        
                if ( $terms && ! is_wp_error( $terms ) ) : 
                    $term_link = array();
                    foreach ( $terms as $term ) {
                        $term_link[] = $term->name;
                    $term_link = join( ", ", $term_link ); ?>
            <h2><?php echo $term_link; ?></h2> 
            <?php endif; ?> 

You may see the change in context here.

Do NOT copy the full contents of that URL into your template or you risk losing any recent changes or updates we may have made, or breaking your theme



Have you seen Elementor?

You can build almost any Obox theme with Elementor!
With a powerful, fast page builder, Elementor is the best way to get your site online with as little effort as possible.