[Resolved] lighthouse report issues

Home Forums Support [Resolved] lighthouse report issues

Home Forums Support lighthouse report issues

  • This topic has 3 replies, 2 voices, and was last updated 2 years ago by Tom.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #911046
    Longinos

    Hi
    I have some issues with lighthouse report due to theme.
    1.- Accessibility. The know issue “duplicate id´s in sticky menu” releted here
    2.- SEO:
    a) In blog list page: Author link overlap post link.
    b) In blog list page: Page numbers link overlap the “Next” link
    c) In single post: Date link overlap the author link (Why we need a link in date to the same single post?)
    d) In single post: Tags links overlap the next/prev post.
    I know, the easy way to suppress these issues is not displaying date and/or author or tags links in customizer, but this only mask it, don´t solve it.

    #911347
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    1. Working on a fix for this in GPP 1.9.

    2. Try the CSS below:
    a)

    .entry-title + .entry-meta {
        margin-top: 20px;
    }

    b)

    .nav-links .next {
        padding-left: 10px;
    }

    c) Good question, I think we can remove that in GP 2.3. Try this PHP for now:

    add_filter( 'generate_post_date_output', function( $output, $time_string ) {
        if ( is_single() ) {
            $output = sprintf( '<span class="posted-on">%s</span>',
                $time_string
            );
        }
    
        return $output;
    }, 10, 2 );

    d)

    .site-main .post-navigation {
        margin-top: 10px;
    }

    Let me know if the above works. If they do, we’ll try to implement them in 2.3.

    Thanks!

    #911457
    Longinos

    Hi Tom
    This do the trick

    add_filter( 'generate_post_date_output', function( $output, $time_string ) {
        if ( is_single() || is_home()) {
            $output = sprintf( '<span class="posted-on">%s</span>',
                $time_string
            );
        }
    
        return $output;
    }, 10, 2 );
    
    add_action('wp_head', 'my_custom_styles', 100);
    
    function my_custom_styles()
    {
    	if (is_single()){
    		echo "<style>.site-main .post-navigation {margin-top: 10px;}.nav-previous{margin-bottom:10px;}</style>";
    	}
    	if (is_archive() || is_home()){
    		echo "<style>.entry-title + .entry-meta{margin-top: 20px;} .nav-links .next{margin-left: 10px;}</style>";	
    	}
    }

    This is set in functions.php of the child theme.
    Thxs for the help.

    #911562
    Tom
    Lead Developer
    Lead Developer
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.