- This topic has 9 replies, 2 voices, and was last updated 2 years, 7 months ago by
Tom.
-
AuthorPosts
-
December 18, 2018 at 12:43 am #759848
Emil
Hello,
How to changing the h2 title posts in blog page to h3? How to add snippet to edit this, because I think header h2 in blog-page do multiplications. Next issue is distance between title-page and excerpt description – How can I add css code to fix this problem?
Best regards
December 18, 2018 at 6:07 am #760073David
StaffCustomer SupportHi there,
i am not sure why you would want to change them to a H3. The H2 tag is the commonly used tag for highlighting entry titles in your archives making them more relevant to search engines. Let me know.
You have the CSS to force the entry title to be three lines to keep the posts aligned. You can remove some of the margin from the entry summary to reduce the space like so:
.entry-summary { margin-top: 0.25em; }
December 18, 2018 at 11:48 am #760502Emil
Because I get information from SEO firm about issue with multiplication headers h2 in blog-page. But if you tell me, that’s it isn’t problem for SEO I believe You π
Please help me with distance, because I add this code to Custom CSS but in category (/maty-grzewcze/elektra/) I have still problem.
Best Regard!
December 18, 2018 at 3:06 pm #760631David
StaffCustomer SupportWell to the best of my knowledge H2 is the common standard for the entry title on post archives. Having lots of H2’s on a post with little content in between may not be a good thing π
Where did you add the CSS? I can’t see it on the page
December 19, 2018 at 6:41 am #761115Emil
Please check again, when we click to category-page we don’t see chaining. In blog-page I seee change – Thank’s π
December 19, 2018 at 6:59 am #761226David
StaffCustomer SupportHi there,
you may want to clear your browser cache as i can see the code being applied to the blog and the category archives. The code you added to increase the title to 3 lines minimum is the greater problem. Maybe reduce that to only 2 lines?
October 9, 2020 at 5:50 am #1480243Manuel
Hi, I’m joining the conversation.
Any reason not to solve this problem? I have read, both in this forum and in WordPress, this same doubt and it has not been solved.
While an H2 for the titles of the posts is fine, if we create a description for the category, it will take several H2 that will be more important, that’s why at the SEO level it is better to mark the titles of the posts in h3 in some cases.
Please, some function to add in the function.php to change this?
Your effort and time is always appreciated.
Best regards
October 9, 2020 at 10:01 am #1480789Tom
Lead DeveloperLead DeveloperHi there,
If you’re using GP 3.x, you can do this:
add_filter( 'generate_get_the_title_parameters', function( $params ) { if ( ! is_singular() ) { $params = array( 'before' => sprintf( '<h3 class="entry-title"%2$s><a href="%1$s" rel="bookmark">', esc_url( get_permalink() ), 'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : '' ), 'after' => '</a></h3>', ); } return $params; } );
October 15, 2020 at 1:49 am #1489872Manuel
Solved! That code worked perfectly.
I thought this thread was closed. LOL
Thank you very much for your excellent customer service. π
October 15, 2020 at 9:36 am #1490748Tom
Lead DeveloperLead DeveloperGlad I could help π
-
AuthorPosts
- You must be logged in to reply to this topic.