You either have to include/require the WPMD file that includes the function(s) you are using, or just use the globally defined $detect
object, like so:
global $detect;
if (! $detect->isMobile() || $detect->isTablet()) {
// output your share buttons
}
// EDIT
The above conditional is the equivalent of your ! wpmd_is_phone()
conditional. However, if you want to restrict this to desktop devices only, you should use the following:
global $detect;
if (! ($detect->isMobile() || $detect->isTablet())) {
// output your share buttons
}
Related Posts:
- Disable plugin / plugin action via theme
- Building a custom REST API
- How can I have two different urls for the same page that load two different templates?
- Deactivate plugins only for mobile devices
- Is there a plugin which disables other plugins for mobile browers?
- Create mobile navigation header with settings integration
- Disabling plugin but wpenqueue is not available
- Disabling Wp_is_mobile from backend?
- How to load different homepage on Mobile.?
- Edit / Change Jetpack Mobile Theme [closed]
- WPTouch – how to remove shortcodes or make shortcodes function
- Photo Gallery Plugin and Touch Devices
- Readable titles in mobile
- PHP mobile redirect Endless loop
- Mobilepress fails to translate short codes
- Button and Countdown overlapping mobile menu
- problem disabling plugin only for mobile
- Shortcode function not showing up on mobile browser
- Remove metatag from a particular page
- Different Google Analytics code based on Users Device
- Mobile and Tablet responsive in Elementor but not on the actual site?
- Upload image to wordpress using ionic/cordova with WP REST API V2
- MobilePress plugin and WordPress 4.1 update
- Making WordPress-built website mobile friendly
- How do I show data from gravity forms in my template? [closed]
- Show a different number of posts per page depending on context (e.g., homepage, search, archive)
- How to customize a plugin whilst maintaining ability to upgrade
- How to generate/update a XML sitemap without plugins?
- How can I reduce the amount of files loaded/included per plugin?
- How to assign user a role if none is present when logging in
- Registration Form Validation in wordpress
- Access wordpress functions inside a plugin class
- How to add product images using script?
- How do I make a wordpress plugin with menu item etc
- How to implement Sentry on WordPress? [closed]
- Make specific products accessible only to a user role in WooCommerce
- Namespaces declared by a theme/plugin should start with the theme/plugin prefix. Found: “eustatos\test_plugin”
- How to prevent users to download videos from lms website?
- scrolltop always 0, can’t trigger script
- mp3 audio metadata upload integration: can I autopopulate title, caption, description from id3 tags?
- Removing Super Cache Plugin
- How to change File URL in file uploaded to s3 compatible storage with self written plugin [closed]
- Add comments for template variables
- Theme/Plugin installation through url on button click
- Enabling plugin failed because MySQL user do not have CREATE permissions
- How to split test a menu item
- Access WP_REST_Server from within plugin namespace
- YouTube Sidebar Widget – YouTube service unavailable
- Understanding State in WordPress Multisites
- How to activate a plugin on the activation of a theme?
- Custom Login Page — wp_signon Headers Already Sent?
- Plugin that will let me specify a number of image sizes?
- How to make a dynamic css class whose name changes every visit to confuse scraper
- Add_rewrite_endpoint doesn’t work with post name permalink structure
- Deactivation Hook does not remove database
- Why is my WordPress Plugin page requesting my FTP Login Credentials?
- WordPress Editor completely blank [closed]
- Assign all Post in Wp to a specific Category
- Cross Sells are not being shown in Cart Page. Please Help!
- How to display registered customer list as dropdown in WooCommerce checkout?
- adding custom code as a wordpress plugin
- Cannot add edit themes and add plugins after multisite update
- Regarding plugin security
- How To Create A File Archive in WordPress?
- Custom Post Type, Custom Columns List
- StackExchange-like flag system for WordPress
- JOIN and SUM different statement results (Mailster Database)
- need click to clipboard button on my site
- Classes registration in WordPress useing woocommers
- How to add styles to a submenu page?
- How to add a PW Gift Card to a Woocommerce Order request API?
- issue concerning ob_end_flush functions.php
- Create a link that calls our custom function in WordPress
- On my WordPress 5.4 website, how to remove all feeds? Including Category and Tags
- How do I make my site multi language? [closed]
- Update a previous version of plugin when the new plugin is built from the scratch
- plugin: rewrite rules are lost when WP updates
- {status}_{post_type} does not run correctly?
- Plugin json page
- search into subcategories plugin subcategory value not come
- Should I Save widget HTML to a file cache?
- How Can the_post Be Hooked Like the_content and the_excerpt?
- using href when creating wordpress plugin calls empty page instead of php file
- New User Approval
- How to add php stylesheet to admin section instead of admin_head hook
- set cookies for my whole site is not working
- Change text “My Basket” in woocommerce artificer theme
- How to create custom content on custom page from plugin?
- functions.php conditional output for a single plugin
- How do I access cPanel features within WordPress?
- Do you know a video plugin that allows embedding in the home.php file?
- What is the recommended way to be notified of security updates to my plugins? [closed]
- How to provide access to specific plugin to all the user roles except subscriber in wordpress
- Please Check this ‘.htaccess’ File
- WordPress Cumulus
- WordPress create permalink structure for custom post type with userid
- how to remove a rel=”nofollow” using call to action plugin
- Can’t save formdata in DB
- Event Made Easy – Block registration to two or more events that have the same category
- Allow manage_options capability for specific user only for specific plugin?