Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #204870

    Alright, I am developing a site for Virginia SEO, at https://www.virginiaseo.org

    I have been whittling away at content issues and such, and have finally got the site down to something that I would call optimized. I discovered a major issue over Christmas, and just discovered another major issue as well, which I will share:

    When you install WooCommerce into the theme, and you enable header bars with the title and breadcrumb, every product page has two H1 tags on it. This is a big no-no SEO wise as I am sure you know.

    This is what I did:

    Line 28 in archive-product.php in WooCommerce
    <h1 class=”page-title”><?php woocommerce_page_title(); ?></h1>

    Left This heading alone, since the product title is what I would like to be my H1

    Change line 274 in themes\enfold\functions-enfold.php

    ‘heading’ => ‘p’ //headings are set based on this article: http://yoast.com/blog-headings-structure/

    I changed this to P from H1, and then applied some re-sizing to it. the downside is that this change I made was site wide, so I had to go through all of my pages and manually add a H1 tag to the page.

    ————————

    My second issue I just discovered. I use Yoast SEO of course, and I have enabled the option to:

    Sitewide meta settings
    Noindex subpages of archives
    If you want to prevent /page/2/ and further of any archive to show up in the search results, enable this.

    And if you go to my pages, you will see the meta robots. But I plugged my site into Google webmaster tools, and look at what I am seeing:
    http://cl.ly/image/3F2S0o150f2b

    It seems Google is crawling the sort links and other links as well.

    Also while we are on the topic, I use a SEO tool called Raven SEO. They do a crawl of the site as well. I discovered that the TOP search button (The one in the shape of a magnifying glass) which is enabled in Enfold options was getting crawled as well. The result was 1000 failed listings of crawling pages such as site.com/product/s?=

    I solved this by disabling the header search feature.

    But all of these items are check marks against the site in my opinion- Google finding tons of 404 errors because it is trying to crawl a crazy sort link on the page is not right. I am going to go about blocking some of this stuff now with robots.txt… which is against my better judgement, I do not like to use robots.txt except in extreme circumstances.

    Thanks,

    Chris

    #204888

    A downside to changing the H1 to a P is that on special pages which d not have content control there is no H1 tag for SEO purposes. An example is a product category sub page such as https://www.virginiaseo.org/product-category/consulting-services/page/3/

    #204893

    Hey!

    I can only comment on the h1 issue which is mostly considered to be incorrect at this point. You can have multiple h1 elements on a page if they are called for an valid. Everyone is welcome to customize the theme for their own SEO best practices however.

    As for the Woocommerce product feed getting indexed, you will need to take that up with WooCommerce support as I don’t believe the theme has any effect on preventing WordPress SEO from doing its job there.

    The search form at the top is just using the regular WordPress search. It is ajaxed but I’m not sure how that would or should effect crawled behavior. If its causing an issue or you are worried about it then disabling it is your best bet.

    I’ll tag Peter and see if he knows why the search field is getting crawled.

    Best regards,
    Devin

    #204936

    Hi!

    1) You can change the avia title tag with a filter and you don’t need to hack the theme files. Insert following code into your child theme functions.php file

    
    add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
    function fix_single_post_title($args,$id)
    {
    if (is_product()) $args['heading'] = 'strong';
    return $args;
    }
    

    This code just affects product single pages and you don’t need to update the other pages/posts.

    2) The search link must contain the ?s php post var – otherwise the link wouldn’t work without javascript. However another user reported that this may affect seo and we’ll add a rel=”nofollow” attribute to the search link with the next theme update and this should prevent google from indexing/following the link.

    Cheers!
    Peter

    #205014

    Great tip, thanks!

    #205018

    I am trying to add other pages to your function, and it does not seem to be working- what would I need to do to use this same method to change the H1 to a strong on a single page- in this case if(is_page( ‘seo-pricing’ )).

    It would be nice to have this function be a theme option- on every page where you select the header, there might be an option to change it off of a H1 in case someone wants to use their own heading system.

    #205093

    Hi!

    Try to use an array with page ids instead –

    
    add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
    function fix_single_post_title($args,$id)
    {
    if (is_product()) $args['heading'] = 'strong';
    if (is_page(array(42,43,44))) $args['heading'] = 'strong';
    return $args;
    }
    

    and replace 42,43,44 with your page id(s) and separate them with a comma.

    Cheers!
    Peter

    #207021

    Thank you, works great!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘SEO’ is closed to new replies.