
-
AuthorPosts
-
January 30, 2020 at 10:51 pm #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!
February 1, 2020 at 5:26 am #1180447No response? Sigh.
February 3, 2020 at 2:29 pm #1180931Hi,
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,
MikeFebruary 3, 2020 at 4:53 pm #1180992Mike, 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.
February 4, 2020 at 2:50 pm #1181284Hi,
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.
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:
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 -
AuthorPosts
- You must be logged in to reply to this topic.