[Resolved] Changing the h2 header to h3 and the distance between the featured image

Home Forums Support [Resolved] Changing the h2 header to h3 and the distance between the featured image

Home Forums Support Changing the h2 header to h3 and the distance between the featured image

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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

    #760073
    David
    Staff
    Customer Support

    Hi 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;
    }
    #760502
    Emil

    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!

    #760631
    David
    Staff
    Customer Support

    Well 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

    #761115
    Emil

    Please check again, when we click to category-page we don’t see chaining. In blog-page I seee change – Thank’s πŸ™‚

    #761226
    David
    Staff
    Customer Support

    Hi 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?

    #1480243
    Manuel

    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

    #1480789
    Tom
    Lead Developer
    Lead Developer

    Hi 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;
    } );
    #1489872
    Manuel

    Solved! That code worked perfectly.

    I thought this thread was closed. LOL

    Thank you very much for your excellent customer service. πŸ™‚

    #1490748
    Tom
    Lead Developer
    Lead Developer

    Glad I could help πŸ™‚

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