WordPress Reference
-
General WordPress
- How to change the WordPress sender e-mail address without a plugin?
- How to completely disable WordPress comments
- How to create a WordPress menu logout link that bypasses the "are you sure you want to log out" message
- How to get rid of the “Sorry, this file type is not permitted for security reasons” when uploading to WordPress
- How to get rid of the error message "Too many failed login attempts. Please try again in..." if the WP Limit Login Attempts plugin is not installed
- How to hide PHP Warnings in WordPress
- How to redirect all the pages from an old domain to the homepage of a new domain
- MAMP: How to get rid of the error message "The link you followed has expired" when attempting to upload a WordPress theme
-
WordPress Themes
-
- Extra Theme - How to change body link color
- Extra Theme - How to change the widget title background color
- Extra Theme - How to remove the credits from the bottom footer
- Extra Theme - How to remove the Previous and Next navigation on all posts
- Sabai Discuss Q & A: How to style the Question Page in Divi Builder
-
WordPress Plugins
- How to add a "display current date" capability to a WordPress theme
- SiteGround Optimizer Plugin, SiteGround Security Plugin and the JNews Import Demo & Style process
-
- BuddyPress: How to hide profile Export Data link
- BuddyPress: How to hide the WordPress top admin bar for Logged Out users
- BuddyPress: How to remove the setting Profile Visibility
- How to change the default BuddyPress profile landing tab
- How to disable BuddyPress Public Message Button
- How to remove the BuddyPress profile ‘last active’ status
- Why create a BuddyPress bp-custom.php file?
-
- Directories Pro Demo
- Directories Pro documentation
- Directories Pro Documentation - Reviews
- Directories Pro: How to create a directories homepage like the Demo
- Directories Pro: How to put elements like Opening Hours, etc. in the sidebar like the demo
- Directories Pro: How to use views to display directory content
-
- Elementor Blog
- Elementor Integration with Adanced Custom Fields
- Elementor Knowledge base and help center
- Elementor: How do I learn about Flexbox Containers?
- How to Create a Custom Author Archive Page in Elementor
- How to use Elementor with Advanced Custom Fields Tutorial
- What is the Elementor Theme Builder?
-
- Articles coming soon
< All Topics
Print
X | The Theme: How to add social sharing buttons after the post content
Posted
Updated
Bynetpressionist
Adding the following code to the x-theme child theme’s function.php file worked for me.
// Add Social Sharing after the single post content // ============================================================================= function x_add_social_sharing ( $content ) { if ( is_singular('post') ) { echo do_shortcode('[share title="Share this Post" facebook="true" twitter="true" linkedin="true" pinterest="true" reddit="true" email="true"]'); } } add_action('x_before_the_content_end', 'x_add_social_sharing');
The code above is a variation of a solution I obtained from an old theme.co forum, and, though it worked for me, the forum notice says that it is no longer supported. The variation I made was to remove Google+ from the shares. A link to the forum post follows:
https://theme.co/apex/forums/topic/adding-social-share-buttons-to-all-posts/
Table of Contents