Tagged: , ,

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #519189

    Hi

    I want to add text (specifically BreadCrumbs) to the top of every product page here …

    http://dev2.electrixinternational.com/product/flat-lid-trunking-length/
    http://screencast.com/t/ESr1vgqCiH

    #519468

    Hi richardelectrix!

    Try adding this to the bottom of your functions.php file.

    add_action( 'woocommerce_before_single_product_summary', 'enfold_customization_woocommerce_extra_text', 1);
    function enfold_customization_woocommerce_extra_text(){
    echo 'your text goes here';
    }

    Regards,
    Elliott

    #519729

    So with this one in the your text goes here bt, could I use this?

    [av_textblock size='' font_color='' color='' custom_class='bread-crumb']
    [bread_crumb]
    [/av_textblock]
    #519902

    Hey!

    If you would like to add breadcrumbs, why do not you edit your product and simply choose to display breadcrumbs?

    Regards,
    Yigit

    #519919

    Hi

    How do I do that?

    #519928

    Hi!

    Please edit your product and under Layout section, in Title Bar Settings choose to display them – http://i.imgur.com/2DTg8oP.png

    Best regards,
    Yigit

    #519935

    Hi

    That option is only enabled if I choose Advanced Layout Editor.

    If I switch on Advanced Layout Editor my design of the product page disappears fully.

    Therefore I would have to redesign all of my product pages and enable the breadcrumbs – hence I was hoping for an easier solution.

    #519940

    Hey!

    No, it does appear automatically on my local installation without choosing to use Advanced Layout Builder. Can you please edit your product and post a screenshot of the whole screen?

    Regards,
    Yigit

    #520828

    Hi

    Without choosing the Advanced Layout Builder I get this …

    http://screencast.com/t/yucmQx6Lr9ro

    #520829

    Ah I see what has happened. It only applies to the top section.

    My mistake.

    The breadcrumbs now appear, but they are in the wrong font colour and the wrong position …

    http://screencast.com/t/eSrr12fczLM

    #520830
    add_action( 'woocommerce_before_single_product_summary', 'enfold_customization_woocommerce_extra_text', 1);
    function enfold_customization_woocommerce_extra_text(){
    echo 'your text goes here';
    }

    I have tried the code above to do something different, but I want it to display where my breadcrumbs display rather that directly above the product title …

    http://screencast.com/t/0oVGAvl9o7q

    #520833

    Hey!

    Can you please post a screenshot and show the changes you would like to make? If it is breadcrumbs that you would like to show and make changes on, please enable them as well

    Cheers!
    Yigit

    #520844

    Hi

    On our previous site we were using this code

    <p id="breadcrumbs" style="padding-top:0px; padding-bottom:20px;"><a href="/">Home</a> >> <a href="/products">Products</a> >> <strong><?php echo get_the_title( $ID ); ?></strong></p>

    We cannot use standard breadcrumbs as with products it takes you back to a product category page, but we dont want users to be able to go to that page because we can’t promote the products on it. Which is why we have used Pages for the product category pages.

    The above works to a point except the …

    <?php echo get_the_title( $ID ); ?>

    … bit which doesnt display.

    The current code in my CSS looks like this …

    
    /* CT START Manual Breadcrumbs */
    
    add_action( 'woocommerce_before_single_product_summary', 'enfold_customization_woocommerce_extra_text', 1);
    
    function enfold_customization_woocommerce_extra_text(){
    
    echo '<p id="breadcrumbs" style="padding-top:0px; padding-bottom:20px;">You are here: <a href="/">Home</a> / <a href="/products">Products</a> / <strong></strong></p>';
    
    echo '<?php echo get_the_title( $ID ); ?>';
    
    }
    
    /* CT END Manual Breadcrumbs */
    #525697

    Hey!

    So what your actually trying to do is hide the product categories in the breadcrumbs. Add this to your custom CSS.

    #top .breadcrumb-trail > a, #top .breadcrumb-trail > .trail-before, #top .breadcrumb-trail > :nth-child(3), #top .breadcrumb-trail > :nth-last-child(1) {
        display: block !important;
    }
    .single-product .breadcrumb-trail > * { display: none !important; }
    

    Best regards,
    Elliott

    #529947

    Hi

    That almost works but not quite.

    I wanted it to be Home / Products / SKUTitle

    The above just outputs Home /SKUTitle (with no space before the SKU Title.

    I was extremely close with my previous code in Functions (which also meant that I didnt have to go through every product and turn on breadcrumbs), the only thing wrong with it was the SKUTitle was appear on a separate line to the You are here …… bit.

    #530063

    Hi

    This has been resolved in another thread.

    Thanks

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Add text to the top of every product page’ is closed to new replies.