• Resolved mrboats

    (@wpseiskaadmin)


    The automatic placement of the icons puts them in the Description tab for Woocommerce products. This is not a very optimal placement as the Description is mainly “extra info”. A better solution would be to recognize Woocommerce products and allow the placement of the icons in the actual product info field as most other sharing plugins do for Woocommerce.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jan-Peter

    (@starguide)

    Will take a look at better placement options for WooCommerce soon! Thanks for the reminder.

    Cheers
    JP

    Plugin Author Jan-Peter

    (@starguide)

    In 4.5.0 we added the ability to add Shariff to any WordPress hook you like. On the basic tab you can simply enter the hook you want Shariff to be added to. In your case this could be woocommerce_single_product_summary or woocommerce_after_single_product_summary. Since the “right” place differs substantially based on the theme you are using, there is no general “best” way where to add them. Maybe your theme offers even better places/hooks. But this might get you on the right track.

    Cheers
    JP

    Thread Starter mrboats

    (@wpseiskaadmin)

    Supercool! As I’m not too familiar with php and programming, could you perhaps provide an example of the code I would need to add to the functions.php to add Shariff to some specicif location in WC?

    Plugin Author Jan-Peter

    (@starguide)

    No need to add anything to your functions.php. Just enter the desired hook directly in the Shariff settings on the basic tab. The two examples above could already be what you want. Just try it and enter one of them in the settings.

    Thread Starter mrboats

    (@wpseiskaadmin)

    Ah, brilliant, it was so simple I did not come to think of this alternative!

    ps: for others who would like to use this, the hook that i ended up using was “woocommerce_share” which puts the buttons in the “right hand” column, just after the add to cart button.

    • This reply was modified 6 years, 6 months ago by mrboats.
    Plugin Author Jan-Peter

    (@starguide)

    Ah, perfect. Thanks for the feedback! I’ll might start a collection of possible hooks in the FAQ later on.

    Hi, i just stumbled across this thread. i had success with the hook solution ?? very elegant!
    since my theme has a very fine control over the sharing on/off, location etc. i was wondering if i could change the sharing.php file of my (child) theme instead.

    which is the “html block” to “place” the shariff wrapper plugin? i tried <div class=”shariff”></div> but had no success. even not in a plain “text” page in wp…
    thanks in advance ??

    Plugin Author Jan-Peter

    (@starguide)

    Hi ctk75,

    I don‘t really understand what you mean by HTML block. Of course you can use the shortcode directly in your theme.

    Q: Can I use the Shariff buttons in my theme?
    A: Yes. Simply use the WordPress PHP shortcode function do_shortcode(‘[shariff]’).
    You can use all options of the shorttag as described on the help tab in the plugin settings.

    Cheers
    JP

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Suggestion: better location for icon for Woocommerce products’ is closed to new replies.