weremoose
Forum Replies Created
-
Forum: Plugins
In reply to: [Ridiculously Responsive Social Sharing Buttons] Custom location for buttonsIs there a manual code apart from the shortcode [rrssb] that can be used?
In some places shortcodes do not work or for example you might want to add this in your theme files directly.This plugin is great and I’d like to use it in an e-shop. So I want to add the buttons in the theme for categories and pages too.
Would this work as described in GitHub (https://github.com/kni-labs/rrssb)?
<!-- Buttons start here. Copy this ul to your document. -->
<ul class="rrssb-buttons clearfix">
<li class="email">
<span class="icon">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="28px" height="28px" viewBox="0 0 28 28" enable-background="new 0 0 28 28" xml:space="preserve"><g><path d="M20.111 26.147c-2.336 1.051-4.361 1.401-7.125 1.401c-6.462 0-12.146-4.633-12.146-12.265 c0-7.94 5.762-14.833 14.561-14.833c6.853 0 11.8 4.7 11.8 11.252c0 5.684-3.194 9.265-7.399 9.3 c-1.829 0-3.153-0.934-3.347-2.997h-0.077c-1.208 1.986-2.96 2.997-5.023 2.997c-2.532 0-4.361-1.868-4.361-5.062 c0-4.749 3.504-9.071 9.111-9.071c1.713 0 3.7 0.4 4.6 0.973l-1.169 7.203c-0.388 2.298-0.116 3.3 1 3.4 c1.673 0 3.773-2.102 3.773-6.58c0-5.061-3.27-8.994-9.303-8.994c-5.957 0-11.175 4.673-11.175 12.1 c0 6.5 4.2 10.2 10 10.201c1.986 0 4.089-0.43 5.646-1.245L20.111 26.147z M16.646 10.1 c-0.311-0.078-0.701-0.155-1.207-0.155c-2.571 0-4.595 2.53-4.595 5.529c0 1.5 0.7 2.4 1.9 2.4 c1.441 0 2.959-1.828 3.311-4.087L16.646 10.068z"/></g></svg>
</span>
<span class="text">email</span>
<!-- Buttons end here -->
got it!
you just need to add this in the functions.php file:
add_filter('widget_text', 'do_shortcode');Ok, I figured this out using
<?php $content_to_edit = get_the_block('blockname'); ?>So I used it like this in my code and it worked perfectly:
<!-- Multiblock Code --> <?php $my_block = get_the_block('my_block'); ?> <?php if ($my_block == "") : ?> <?php else : ?> <div class="my_div"> <?php echo $my_block; ?> </div> <?php endif ?>I have exactly the same problem with several of my sites (not all). I am searching around to see if there is any solution to this but didn’t find anything. I think it has something to do with the encoding because the sites that I have that problem are those that are in Greek…