• Resolved gore.m

    (@gorem)


    Hi,
    Im using Woocommerce, If Im using only short product description, icons are not shown.
    How can I fix that?

    thanks you

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author CrestaProject

    (@crestaproject)

    Hi gore.m,
    you can use the WooCommerce hook, paste this PHP code inside the functions.php file of your theme:

    
    if(function_exists('add_social_button_in_content')) {
    	function cresta_counter_echo() {
    		echo add_social_button_in_content();
    	}
    	add_action( 'woocommerce_single_product_summary', 'cresta_counter_echo', 21 );
    }
    

    Then go to the plugin options page under the “Show on” section, and check the “Product” field.
    This way the social buttons will be visible under the summary text.

    Best Regards,
    CrestaProject

    Thread Starter gore.m

    (@gorem)

    Thanks you, I would like to have buttons under product page content, centered, so I changed code to

    if(function_exists('add_social_button_in_content')) {
    	function cresta_counter_echo() {
    		echo add_social_button_in_content();
    	}
    	add_action( 'woocommerce_after_single_product', 'cresta_counter_echo', 21 );
    }

    But I cant center it. Under <div id="crestashareiconincontent"> is empty div <div style="clear: both;"></div>
    Is that right? How can I center it?
    Thanks you

    Plugin Author CrestaProject

    (@crestaproject)

    Hi gore.m,
    you can add this custom CSS code to center the buttons:

    
    #crestashareiconincontent {
        float: none;
        margin: 0 auto;
        display: table;
    }
    

    You can add the code in the plugin options page under the “Advanced” section.

    Best Regards,
    CrestaProject

    Thread Starter gore.m

    (@gorem)

    Hi,
    I have suggested code in CSS. The problem was Woocommerce div that didnt have display property. So I added

    .woocommerce div.product {
        display: table;
    }

    and it solve problem.

    One additional question: Which code should I use If I would call Cresta directly in template?

    Thanks you

    • This reply was modified 8 years ago by gore.m.
    Plugin Author CrestaProject

    (@crestaproject)

    Hi gore.m,
    are you talking about PHP code?
    You can use this code to add the buttons directly in the template:

    
    <?php if(function_exists('add_social_button_in_content')) {
                echo add_social_button_in_content();
    } ?>
    

    PS: remember that the social buttons are shown only in “singular pages” and not in pages such as categories, tags, blog list, etc…
    Best Regards,
    CrestaProject

    Thread Starter gore.m

    (@gorem)

    Thanks you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Buttons are not shown with short description…’ is closed to new replies.