Gooigle analytics errors

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30855
    Solarwyseguy
    Participant

    /solar-power-products/solar-batteries-2/
    1
    1
    7/25/18
    Missing: author
    Missing: entry-title
    Missing: updated
    /
    1
    1
    7/25/18
    Missing: author
    Missing: entry-title
    Missing: updated
    /solar-institute/solar-power-options/
    1
    1
    7/23/18
    Missing: author
    Missing: entry-title
    Missing: updated
    /solar-power-packages/cabin-solar-cottage-solar-packages/
    1
    1
    7/23/18
    Missing: author
    Missing: entry-title
    Missing: updated

    Seams that these errors are on all pages, any fix for this?

    #30890
    Veena
    Moderator

    The errors are due to page not having hentry format as required by Google. We won’t be able to fix this in the theme itself since we made this compromise initially when we built the theme. The format suits well the post but not very useful for page. If you still want to follow the rules of Google, you can load the child theme and add the following piece of code to functions.php –

    
    add_filter( 'the_content', 'agile_before_page_content' );
    
    function agile_after_page_content( $content ) {
    global $post;
    
    if ( $post && $post->post_type == 'page' && is_singular( 'page' ) && is_main_query() && !post_password_required() ) {
    echo mo_get_entry_title();
    
    echo '<div class="entry-meta">' . mo_entry_published("M d, Y") . mo_entry_author() . '</div>';
    
    }
    
    return $content;
    }
    

    Do let me know how it goes. If adding above fixes the error, you can try using some CSS to keep it small so that it does not affect the post content.

    #30908
    Solarwyseguy
    Participant

    It breaks the site I had to remove. I will see if I can find a plugin to sort this issue.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Agile Theme Support’ is closed to new topics and replies.