Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #183269

    Hi,
    Can you provide me with instructions as to how to activate breadcrumbs on the Woocommerce pages within the Flashlight theme? When you browse to a product page there really isn’t anyway back to the category page etc.

    Thanks
    peter

    #183622

    Hey peterbarlow23!

    Please refer to this link: http://www.kriesi.at/support/topic/trying-to-add-breadcrums-to-my-web/

    You can add the breadcrumb code on config-woocommerce > config.php, find the avia_shop_nav function and look for the line 299. Add the yoast breadcrumb code below.

    Regards,
    Ismael

    #184062

    Hi,
    I have activated latest Yoast breadcrumb plugin and was looking at the code around line 299 to add in the yoast if function. I’m a bit confused as to where to actually put it as around line 299 is this:
    /* check for images in the wordpress gallery */
    $args = array(
    ‘post_type’ => ‘attachment’,
    ‘numberposts’ => -1,
    ‘post_status’ =>’any’,
    ‘post_parent’ => get_the_ID(),
    ‘exclude’ => $ids
    );
    $attachments = get_posts($args);
    if ($attachments) {
    foreach ( $attachments as $attachment ) {
    $ids[] = $attachment->ID;
    }
    }

    if(!empty($ids))
    {
    $ids = ‘ids=”‘ . implode(‘,’, $ids) . ‘”‘;
    }
    else
    {
    $ids = ”;
    }
    echo do_shortcode(“[gallery $ids]“);
    }
    }
    }

    Also should I do this sort of change in the child theme? What if the woocommerce config file gets updated in a future theme update.

    The ‘function avia_shop_nav()’ is on line 140 in my current config file in Woocommerce config folder.

    This is code that I was putting in after avia_shop_nav function on line 140:
    <?php if ( function_exists(‘yoast_breadcrumb’) ) {
    yoast_breadcrumb(‘<p id=”breadcrumbs”>’,'</p>’);
    } ?>

    thanks

    #185464

    Hi!

    Install this plugin: http://yoast.com/wordpress/seo/

    Activate then go to SEO > Internal Links > Breadcrumb Settings > check the Enable Breadcrumbs option. Edit woocommerce-config > config.php, find this code:

    $output .= "<li class='shopping_cart_link'><a href='".$url['cart']."'>".__('Shopping Cart', 'avia_framework')."</a></li>";
    	$output .= "<li class='checkout_link'><a href='".$url['checkout']."'>".__('Checkout', 'avia_framework')."</a></li>";
    	$output .= "</ul>";
    
    	echo $output;

    Replace it with:

    $output .= "<li class='shopping_cart_link'><a href='".$url['cart']."'>".__('Shopping Cart', 'avia_framework')."</a></li>";
    	$output .= "<li class='checkout_link'><a href='".$url['checkout']."'>".__('Checkout', 'avia_framework')."</a></li>";
    	$output .= "</ul>";
    
    	echo $output;
    	if ( function_exists('yoast_breadcrumb') ) {
    	yoast_breadcrumb('<p id="breadcrumbs">','</p>');

    Regards,
    Ismael

    #186016

    thanks for that. I got it to work after removing the { at the end of the 2nd last line of the if statement. One strange thing is when I go into a Category which holds some images to purchase. The breadcrumb only goes straight back to home and doesn’t include the Product page I came from. Here is a link so you can see what I mean. http://imagecreator.com.au/product-category/bluesfest-2013/

    I guess I need to contact the support area of the SEO plugin rather than bug you guys but I thought you might have a quick answer for me.

    thanks for your help.

    :peter

    #186775

    Hey!

    I’m not sure why it doesn’t include the category page but maybe you need to install http://yoast.com/wordpress/yoast-woocommerce-seo/ to use it with WooCommerce.

    Best regards,
    Peter

    #186842

    Thanks. Was able to get things right with the settings in the plug-in. Just needed to spend more time in the settings to get it right. Thanks for your help.
    :peter

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Breadcrumbs in Woocommerce in Flashlight Theme’ is closed to new replies.