Here is a quick shortcode for you. You’ll still have to style it the way you want it.
Just use:[social-share]
to share.
// social sharing shortcode, use [social-share]
add_shortcode( 'social-share', 'render_social_share' );
function render_social_share( $atts ){
$social_output="<p>Share on:</p>
<ul>
<li><a href="https://www.facebook.com/sharer/sharer.php?u=" . get_the_permalink() . '" target="_blank">Facebook</a></li>
<li><a href="https://twitter.com/share?text=" . get_the_title() . "&url=" . get_the_permalink() . "" target="_blank">Twitter</a></li>
<li><a href="https://www.linkedin.com/cws/share?url=" . get_the_permalink() . "" target="_blank">LinkedIn</a></li>
</ul>';
return $social_output;
}
Related Posts:
- Woocommerce – Specific template for product category? [closed]
- WooCommerce – How to Add a Custom Field to Cart Items and Cart Totals [closed]
- Inherit plugin settings to new site in Multisite
- Show Similar Post Titles ( Similar to Stack Exchange )
- How to parse nested shortcodes?
- Custom wp_nav_menu output (displaying all child elements of top menu element in current branch)
- Can plugins become obsolete?
- Removing user contact methods works from functions.php but not from a plugin
- Help!! I Screwed up my WP
- Dynamic homepage according to user role
- How to extract images of post and pages excluding header and logo image in wordpress?
- Subscribe2 Configuration
- Customize the Sorting Dropdown in WooCommerce
- Does the WordPress API have Modal Dialogs
- Dropzone.js and wordpress plugin
- Filter or action hook to insert content on admin pages before tag
- How do I change the default WordPress e-mail ID for sent e-mail?
- Good website screenshot plugin [closed]
- Cannot upload All-in-One WP Migration file to WordPress hangs at 28%
- How to enqueue a theme style-sheet to my admin settings page?
- W3 Total Cache: Load CSS asynchronously for better PageSpeed score? [closed]
- Custom page slug without creating a WP page
- Pass a php string to a javascript variable
- How to include a file for admin and 2 pages without being loaded on other parts of the site?
- Menus, but not by theme location
- How to upload images to WP Panel keeping correct folder in FTP
- Email Bounce Address
- NGiNX + PHP5-fpm + CDN Tools (plugin) [closed]
- Snippets: is it better to add them in functions.php or make site-specific plugins?
- Can someone please tell me what is wrong with my plugin?
- Trigger Elementor Popup via code [closed]
- How to use WP-CLI / WC-CLI to bulk import 1000s of products (variable and simple)?
- Can’t view ‘More details’ on plugins pop up is blank and Authy pop up
- import posts with dutch/special letters
- Installing Jplayer in WordPress
- Does plugin’s uninstall.php file have access to the plugin ‘s object?
- Disabling plugin but wpenqueue is not available
- WP-TweetButton is not displaying the tweet button if this is set to “Manual.” [closed]
- Related posts widget or plugin needed
- Implementing an “Email this” button?
- How to add a dvi tag to a shortcode then change a generated text using jQuery
- Are links allowed in the Upgrade Notice section of a plugin’s readme.txt file?
- Use conditional logic for woocommerce variable product
- How to customize a title by passing query string?
- Remove Advanced Custom Fields plugin for client?
- Gutenberg Blocks – Cannot retrieve block saved attributes in edit post
- Order posts by meta key ( Using ACF )
- How to add fields in the WordPress editor?
- Plugin scheduled event not working
- Advanced Custom Fields (acf) – Filter Relationship by Taxonomies not Post Type
- change or add css to theme from plugin
- At a Loss on over Page Peel Plugin Customization [closed]
- Custom Fields for Page Edits
- jQuery(‘#news-ticker’).cycle is not a function
- Looking for a photo management solution
- How to display an alert when deleting a plugin?
- Directorist – Dropdown doesn’t open
- How to make sure settings are not lost when plugin is updated?
- Effeciently adding Checkboxes to TablePress table cells
- Import a folder containing HTML files and images to WordPress
- Can i stream data to a custom_post_type?
- Is there a hook similar to “save_post” which only fires AFTER the post is completely published?
- How to Fix WordPress multisite woocommerce 403 file error
- Define global variable in theme file and call that variable in plugin file
- Revolution Slider Toggle Devices not working
- Custom Plugin Update
- automatically set random featured image by category in wordpress on post
- Using Shortcode Result In Custom HTML Block (Using Google Sheet JQuery Result As NumScroller data-max)
- How to create different views for different user roles?
- How to publish post to individual based on date
- How To Export User’s Custom Fields in CSV or XLSX
- Some resources of my website are pointing to www.mysite.com/dev/ and trying to get rid of that append has been a headache
- Is it possible to disable a theme programmatically?
- Members-only page, but accessible via sharable link
- Change hook to add_action in a plugin class
- The dropdown list in autocomplete is not showing
- How to overlay a webcomic plugin on top of a header image?
- Does WordPress have a way of changing the ‘Natural’ size of uploaded images?
- Infinite 301 redirects after definitions in “Redirections” plugin?
- How do I change tab url
- Disqus comments count taking long to update
- Escaping and sanitization
- Things that saved lose when logout
- How to save default values into an option and delete those upon actvation and deactivation in wordpress?
- how to open image gallery in a post/page?
- Ajax, jQuery and WordPress
- PHP and Jquery pass value from form. Update function on DataBase
- Advanced Custom Field User Help URL
- Trying to output a “Most visited blogs” list in wordpress multisite
- No plugin updates after moving wp-config.php above root map
- Simple Amazon Affiliate Plugin [closed]
- Snippet displaying LearnDash parent course title with lesson title [closed]
- Helpdesk solution which is not form based
- Want to show pop up image on home page every time when i refresh it [closed]
- woocommerce show cities state as dropdown list
- WordPress portfolio pagination on home page
- Increased max_upload_filesize, but still can’t upload plugin [closed]
- How to connect WordPress media to another host?
- How to add product author carousel in wordpress? [closed]
- public custom posts not showing in my wordpress plugin