Find Answers and Get Support › Forums › Gorgo – Multi-Purpose Gutenberg Blog & Magazine Theme › Website Setup › Posts › Adding Follow Button on Single Post Pages
- This topic has 3 replies, 2 voices, and was last updated 4 years, 8 months ago by
Manathan.
-
AuthorPosts
-
Dennis JoverParticipant@dennisjover
- 6 Topics
- 10 Posts
Hi there,
I am using the Buddypress Followers plugin. From the plugin’s github page (https://github.com/r-a-y/buddypress-followers/wiki/Add-a-follow-button-on-a-regular-WP-page) they mentioned of a code snippet that can be used to add the follow button to a regular WP page. Below is the code snippet:
<?php
if ( function_exists( ‘bp_follow_add_follow_button’ ) ) :
if ( bp_loggedin_user_id() && bp_loggedin_user_id() != get_the_author_meta( ‘ID’ ) ) {
bp_follow_add_follow_button( array(
‘leader_id’ => get_the_author_meta( ‘ID’ ),
‘follower_id’ => bp_loggedin_user_id()
) );
}
endif;
?>Is there a way to add the follow button using the above code snippet? Please see below screen shots of specific areas in the the Single Post page where I would want the Follow Button to appear.
Thanks!
DennisAugust 31, 2020 at 15:31 #16915@themodactyl- 0 Topics
- 6750 Posts
Hi @dennisjover, 🙂
To add this code snippet to your site, we recommend that you use the Code Snippets plugin (https://wordpress.org/plugins/code-snippets/). If you have never activated this plugin, please read the following post:
Cheers,
September 1, 2020 at 10:16 #16950Dennis JoverParticipant@dennisjover- 6 Topics
- 10 Posts
Hi @themodactyl,
Thanks for getting back to me.
Is there a way to specify where in the theme I can make this code snippet work? For example, make the Follow Button appear on the place I highlighted in the screen shots I attached?
Best,
DennisSeptember 1, 2020 at 17:24 #16963@themodactyl- 0 Topics
- 6750 Posts
Hi @dennisjover,
To change this feature to your website, the best practice is to create your own child theme and override the template.
For more about creating child themes, please read the following post:
If you have never done this before, we recommend you to require the services from a nearby web developer or from Envato Studio freelancers (https://studio.envato.com/explore/websites-programming). This web platform gives you access to developers who have already experience with theme customizations, and for very competitive prices.
Best regards,
September 2, 2020 at 09:07 #16993 -
AuthorPosts
Hi there,
This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!
Best regards,
The Themosaurus team.
The topic ‘Adding Follow Button on Single Post Pages’ is closed to new replies.