I am using shortcodes. But you need to work differently with this and make it easier for the client.
- On the theme options page you should have inputs with
type="checkbox"
where the client chooses what share buttons to appear. -
In the template you should get the option with get_option(‘registered_option’) and display those buttons for which the checkbox was checked in the theme options.
if( get_option('tweeter_checkbox') ) echo '<a href="https://twitter.com/share" class="twitter-share-button" data-url="' . get_permalink(); . '">Tweet</a>';
Related Posts:
- Shortcode are not working in Option tree textarea
- Shortcode don’t work in custom option field, any solution?
- Pass boolean value in shortcode
- how to show the syntax of a shortcode
- Get first video from the post (both embed and video shortcodes)
- Wordspress add into my javascripts
- Using preg_replace to separate gallery from the_content?
- List of all inbuilt WordPress shortcodes
- Implement If-ElseIf-Else-EndIf with short codes
- using html as shortcode attribute
- shortcode outputs first before the page content [duplicate]
- how to get shortcodes to work inside the text of custom fields
- Shortcode attribute value with dash (hyphen)
- Shortcode content does not show in feed discription/excerpt
- Adding shortcode inside Visual Composer raw HTML [closed]
- Shortcode not working inside html input
- do_shortcode based on _thumbnail_id
- Why does WP not like my container?
- Nested Shortcode Inside [caption] Doesn’t Process
- How to link to a alternative page in CSS
- How to handle a shortcode function directly?
- Turn a snippet of HTML and PHP into a shortcode
- How can I get the current user email instead of user ID?
- How to put an “include” inside a “do_shortcode”?
- Changing playlist shortcode thumbnail sizes?
- Shortcodes output in the wrong order
- Adding short codes from a page’s content on header and hiding the same from page’s content
- Should I cache default WordPress gallery shortcode output?
- Tinymce list of shortcodes button
- Add page title as a javacript variable to specific posts
- WordPress 4.7 Galery shortcode not working
- How to create a shortcode for custom page template
- How to add and submit input fields using a shortcode?
- How can i remove the paragraph from shortcodes content?
- Easy way to show excerpts of specific posts on a page
- Pass javascript array to shortcode
- Shortcode content not displaying on Home page
- WordPress shortcode display as plain text
- Replace / Remove Shortcode after 1st run / post
- Shortcode not working with WordPress updated
- WordPress Shortcode callback function with a plugin
- Can I wrap an unordered list inside a shortcode?
- WordPress shortcode for a section Template
- Saving post content to database with do_shortcode?
- Is it important to sanitize inputs in a shortcode that will be used in site that only I will post to?
- Shortcode Function not working
- Using shortcode to display array in array
- Add the last viewed post title to a contactform with shortcode [closed]
- Adding a template part as part of a shortcode
- Just display content between shortcode brackets
- How can i share codes on my blog?
- How to explode single string IF it’s used in shortcode
- Check if CTP category taxonomy is set in shortcode
- Using the title of the post in a shortcode
- Getting Page Content Using Shortcode
- Turning variable into a value set in shortcode
- tax query shortcode
- Change variable value for different shortcode attributes?
- How can I extract a word from page/post URL using shortcodes
- How to copy [gallery] shortcode between posts using polylang [closed]
- Shortcode question…. javascript
- How to add a shortcode that creates an adjacent column of text in the content editor?
- Template not loading with get_template_part or locate_template
- Check if parent page has child page of certain slug
- Variable inside shortcode or shortcode inside shortcode
- Jetpack gallery shortcode with slideshow
- Shortcode atts for WP Query args
- Remove figcation from excerpt
- Shortcode select another dbbase
- Create Button for Shortcode in Text Editor
- Send Mail with link to current_user
- Geoip shortcodes in comments
- Shortcode not interpreted if parameter set
- Can we add a single caption to the gallery shortcode?
- do_shortcode for is_page(slug)
- Create shortcode to display specific post in relationship current date
- Add custom shortcodes to the Welcome Mail
- How to handle multiple nested shortcodes with different tags?
- Using shortcode to stop post content from displaying
- Shortcode Attribute contains clone of all shortcode attributes
- How to echo an array returned by a function
- Nested WordPress Shortcodes of Different Types
- Creating custom shortcode
- What is short code for following?
- Initialize add_action() for every copy of a specific shortcode
- WP_Editor Shortcode Issue
- Shortcode not working in custom post types
- add php shortcode in return function
- style css to header for shortcodes
- WordPress Shortcode loads at the top
- What does this shortcode do?
- Shortcode leads to white screen [closed]
- How to stop an image link continuing to link adjacent text from a shortcode?
- create shortcodes for posts
- How Do I create a shortcode to dispaly a go to top button on any page or post
- Show realtime Amazon price without API using shortcode
- Identifying first and last instance of shortcode in post
- Executing a shortcode at the top of PAGE template?
- Display a block conditionally based on user input button
- Custom shortcode with < in content