Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1240387

    Hi,
    Is there a way or changing the Main Title – Entry Title to Post Title – Entry Title on Post in the area indicated in the attached screenshot:

    Any help would be appreciated.

    Regards,

    • This topic was modified 4 years, 3 months ago by antiguanice.
    #1241228

    Hi,
    Has anyone had a chance to look at this?

    Best regards,
    Colin

    #1241860

    Hi,
    Sorry for the late reply and thanks for the link and screenshot. As I check your site I see how your “main-title entry-title” in the title bar is showing “Blog – Latest News” for single posts, while your other pages leading to the single post all show the page title. So to change the “main-title entry-title” of your single posts to the post title, Try adding this code to the end of your functions.php file in Appearance > Editor:

    function custom_post_title_script(){
      ?>
      <script>
    (function($){
      $(document).ready(function(){
      $("#top.single-post").each(function(){
        var posttitle = $(this).find("h1.post-title.entry-title a").text();
        $(this).find(".main-title.entry-title a").html(posttitle);
    
    });
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'custom_post_title_script');

    Then clear your browser cache and check.

    Best regards,
    Mike

    #1242202

    Hi Mike,
    Thanks for getting back to me.
    I added the code to the functions.php file and it worked well. Single posts are now showing the post-title.

    Thank you for all your help and you can close this case at your convenience.

    Best regards,
    Colin

    #1242317

    Hi,

    If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Amendment of Main Title – Entry Title on Posts’ is closed to new replies.