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

    We have added a plugin that allows Categories for Pages (not just Posts categories), see here: https://gigglepets.net/topics/dogs/

    So this page lists all the “Dog” related pages assigned in the Dog category. But why is it displaying the Page Title and also the H1 tag here? We have to keep the page title and h1 tag for Yoast SEO. What is the workaround so that this page does not display duplicate information?

    Is this related to the Enfold theme structure? If we switch to another theme will this problem follow?

    Thanks!

    #1180447

    No response? Sigh.

    #1180931

    Hi,
    Sorry for the late reply, what is the name of the plugin. I assume that if you deactivate the plugin the page will work correctly?
    I suppose you can use some css to hide one of the headings, or you can see if this has been reported by the plugin before and check for a solution for this. Some plugins have a troubleshooting panel in the plugin that address known issues.

    Best regards,
    Mike

    #1180992

    Mike, it’s not a plugin issue. This is how your theme is displaying post by category. Please escalate to someone who actually knows the answer.

    #1181284

    Hi,
    The theme lists posts on the archive pages as H2 with the category under it and then the excerpt of the post.
    On your page you are hiding the title field and manually adding an H1 in the content section which shows on the archive page as part of the excerpt and the original title from the page is included.
    So if you used the main title on your page and didn’t manually add an H1 in your content you would not have the duplicate titles.
    To me it looks like you are using the default editor for your page and you probably wanted the title to be under your featured image instead of in the gray title bar.
    So if I have this correct try this, remove your manually added H1 title on your page and set your title to show on the page next to the breadcrumbs, this is a H1 title created by the theme.
    2020-02-04-073754
    then add this code to the end of your functions.php file in Appearance > Editor:

    function custom_title_script(){
      ?>
      <script>
      (function($) {
     $(document).ready(function(){
        $('.page .main-title.entry-title').detach().insertBefore('.entry-content');
     });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'custom_title_script');

    then your H1 title will show below your featured image:
    2020-02-04-073649
    and then on your archive page you will not have duplicate titles. But all of the titles will be H2 because SEO recommends that there should only be one H1 on any page.

    Best regards,
    Mike

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.