• Resolved RuthVant

    (@ruthvant)


    I have lots of products that are in subcategories of a parent, but not directly in the parent category e.g.

    Product one is in category ‘Applications/Photosynthesis’, but it is not in ‘Applications’, so you have to drill down to get to it. Not a problem yet.

    Pagination works correctly once you get to the products page in e.g.Applications/Photosynthesis as expected

    However, my SEO person is not happy because the system is creating hidden pagination pages for products in ‘Applications’ when there are no products directly in ‘Applications’.

    How can this be happening?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @ruthvant The issue may be related to the theme or a plugin. Are you still running into issues? The page linked to gives a 404 error.

    Thread Starter RuthVant

    (@ruthvant)

    I have found a way around this, but it’s not a plugin.

    I’ve used All in One SEO’s API

    add_filter( ‘aioseop_robots_meta’, ‘change_robots_meta_value’ );

    function change_robots_meta_value( $robots_meta_value ) {
    if( is_product_category( ‘PYO’ ) && is_paged() ) {
    $robots_meta_value = ‘noindex,nofollow’;
    }
    if( is_product_category( ‘Light Engines’ ) && is_paged() ) {
    $robots_meta_value = ‘noindex,nofollow’;
    }
    if( is_product_category( ‘LED Count’ ) && is_paged() ) {
    $robots_meta_value = ‘noindex,nofollow’;
    }
    if( is_product_category( ‘Micromoles’ ) && is_paged() ) {
    $robots_meta_value = ‘noindex,nofollow’;
    }
    if( is_product_category( ‘Size’ ) && is_paged() ) {
    $robots_meta_value = ‘noindex,nofollow’;
    }
    if( is_product_category( ‘Wavelength’ ) && is_paged() ) {
    $robots_meta_value = ‘noindex,nofollow’;
    }
    if( is_product_category( ‘Thermal’ ) && is_paged() ) {
    $robots_meta_value = ‘noindex,nofollow’;
    }
    return $robots_meta_value;
    }

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @ruthvant Sounds like a solid solution for now. I am setting this thread to resolved.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Category Pagination on nonexistent products’ is closed to new replies.