Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1221248
    Sam H
    Participant

    Hi,

    I am referencing:https://charlestongiftsonline.com

    I want to add a share on social with the icons on all the products, how would I do that?

    Also want to add the feature of display all for the product and category pages. How do I add that?

    Thanks in advance!
    Sam

    #1221447
    Jade
    Moderator

    Hi Sam,

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices. Then add this to your child theme’s functions.php file

    /*adding social sharing buttons to woocommerce product pages */
    
    add_action("woocommerce_single_product_summary", "add_social_sharing_to_product_page", 60);
    
    function add_social_sharing_to_product_page() {
      echo do_shortcode("[share title='Share this Product' facebook='true' twitter='true' google_plus='true' pinterest='true' email='true' class='mtl']");
    }

    Hope it helps, Cheers!

    #1225462
    Sam H
    Participant

    Thanks Jade!

    Can you also tell me how to add a view all for products instead of the 50 or so per page?

    Thanks!
    Sam

    #1225913
    Nabeel A
    Moderator

    Hi again,

    Please add the following code in your Child Theme’s functions.php file:

    add_filter( 'loop_shop_per_page', create_function( '$cols', 'return -1;' ) );

    Let us know how this goes!

  • <script> jQuery(function($){ $("#no-reply-1221248 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>