Community Forums › Forums › Genesis Blocks › How do I hook Genesis Blocks Sharing after content
- This topic has 9 replies, 3 voices, and was last updated 1 year, 6 months ago by zombie.
-
AuthorPosts
-
March 30, 2021 at 4:32 pm #503632vukmilicevicParticipant
Dear StudioPress people,
I tried placing the following in the Genesis Simple Hooks to get Blocks Sharing buttons after every post:
<!-- wp:genesis-blocks/gb-sharing {"linkedin":true,"pinterest":true,"email":true,"reddit":true,"shareButtonStyle":"gb-share-icon-only","shareButtonColor":"gb-share-color-social"} /-->
But it "ate" it. Nothing doesn't appear. Is there a function I should use? Please help. Thank you in advance.
Vuk Milicevic
https://hipnoterapijabeograd.rs/da-li-preterano-ugadjamo-svojoj-deci/
hipnoterapijabeograd.rsMarch 30, 2021 at 4:53 pm #503634AnitaCKeymasterI see some buttons down there on the post. Is that not where you'd like them to be located?
Need help with customization or troubleshooting? Reach out to me.
March 30, 2021 at 6:14 pm #503641vukmilicevicParticipantThese are leftovers, not GB Sharing. Deleted that plugin and cleared the cache.
March 30, 2021 at 6:40 pm #503643AnitaCKeymasterThe buttons - are they the default Gutenberg Blocks? Or Genesis Blocks Share Icons?
Need help with customization or troubleshooting? Reach out to me.
March 30, 2021 at 7:15 pm #503644vukmilicevicParticipantWe are in the Genesis Blocks area talking about new Sharing Buttons, they look like this:
So, no, they are not "default" sharing buttons, Atomic Blocks became Genesis Blocks, migration was made properly and the backend simply doesn't render that part of commented wp:foo stuff. It burps a part of a first image and drops everything else out.
March 31, 2021 at 7:41 pm #503655AnitaCKeymaster@vukmilicevic well, after a day and a half I have a solution for you 😊.
I found this code from Brad Potter on Github yesterday and tested it out. It wasn't working for the Share icons, but the second code Phil added makes it work. 😊
I added the snippet from Bill Erickson's tutorial to display the Reusable Blocks tab on the sidebar. You can use the "Add New" button to add a new reusable block.
Then add this snippet to the functions.php file or a core functionality plugin:
// Add reusable Gutenberg block via a Genesis hook. (Where 1356 is the Post ID of your reusable block) add_action( 'genesis_after_entry_content', 'my_custom_query' ); function my_custom_query() { if ( ! is_single() ) { return; } $post_id = 1356; $queried_post = get_post($post_id); echo do_blocks( $queried_post->post_content ); }
This will place the buttons at the bottom of the posts like this.
Need help with customization or troubleshooting? Reach out to me.
March 23, 2023 at 2:34 pm #507045austinrowParticipantReddit allows you to join different forums and discover a lot of other copypastas that are being very viral for any specific reason. You can get more of them based on different topics and conversation based. The best thing about searching Reddit is that you can get a lot more Reddit copypasta emojis and Reddit copypasta vaporeon as well.
March 24, 2023 at 12:12 pm #507054austinrowParticipantFor more detail, click the below link,
https://copypastatexts.com/best-reddit-copypasta/March 25, 2023 at 4:03 am #507059Jelly4567BlockedYou can add the Genesis Blocks Sharing block after your content by dragging the block into the correct position in the content editor. You may also add it by clicking on minkycm the "+" symbol and searching for "Sharing". Once the block is in place, you can customize it to your liking by adjusting the share settings and the look of the buttons.
April 4, 2023 at 7:08 am #507164zombieParticipantI tried placing the following in the Genesis Simple Hooks to get Blocks Sharing buttons after every post:
<!-- wp:genesis-blocks/gb-sharing {"linkedin":true,"pinterest":true,"email":true,"reddit":true,"shareButtonStyle":"gb-share-icon-only","shareButtonColor":"gb-share-color-social"} /-->
But it "ate" it. Nothing doesn't appear. Is there a function I should use? Please help. Thank you in advance.
-
AuthorPosts
- You must be logged in to reply to this topic.