Hi, this simple plugin is EXACTLY what i was looking for so thank you. I have two questions–
1.) After installation & activation, the tablet view of the site editor is still showing the mobile layout, not the desktop layout. Will the actual view in a tablet be that of desktop regardless, or is this a sign that the plugin is not working for me? (i don’t have access to a tablet at the moment, and my website is not live yet either)
2.) In the plugin description, you’ve mentioned this is for sites that use different content for desktop vs mobile. By that did you mean sites that are mobile-responsive and simply show a different layout for the content on desktop, or did you mean sites that actually have some different content items on the two versions (like some content that may show only on mobile version but not desktop for example)? I am very new to WP, the first condition is true for my site so i’m trying to figure out if the plugin will work for me or not.
I really want tablet users to see desktop version of my site ;~; Any help will be much appreciated
]]>My website totally down after the latest update.
]]>Hi,
Are you able to update to the latest version of Mobile_Detect 4.8.x ? That is the current recommended version.
The 2.8.x version currently used by this plugin is deprecated and intended for the (obsolete) versions of PHP <7
https://github.com/serbanghita/Mobile-Detect
Thanks
]]>Hey,
I’ve just been testing this plugin on php 8.1 and i’m getting 1000’s of deprecated notices.
Version 1.3.0
[03-Nov-2022 09:18:23 UTC] PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in xxxxxx\wp-content\plugins\tinywp-mobile-detect\inc\TinyWP_Mobile_Detect.php on line 1460
Is resolving this deprecation notice being implemented in the next release? and is there a rough ETA?
Thank you for your time
]]>I think the description of this plugin could be better –
Mobile Detect replaces the very simplistic mobile detection that WordPress utilises (Mobile/Android/Silk/Kindle/Blackberry/Opera Mini/Opera Mobi) with an always up-to-date and exhaustive list covering even the most obscure devices.
AND it allows over-riding the default “treat tablets as mobiles”.
AND it uses the same detection method as WP-Rocket, so if you use a seperate mobile cache you know it won’t get contaminated when WP-Rocket detects the user is mobile but WordPress doesn’t.
One suggestion – detect if WP-Rocket is activated, and if so, link to their copy of mobile-detect.php rather than maintaining a second copy. (maybe other caches also if they use the same library).
]]>Hi there,
I’m using the following code:
$detect = new TinyWP_Mobile_Detect;
if ($detect->isMobile()) {
$image = IMAGE FOR MOBILE
} else {
# imagen de 1070px por lo que sea
$image = IMAGE FOR DESKTOP
}
I’m still on vacation working in my laptop and my laptop is detected as mobile?
It’s a Macbook Pro. Could it be? It’s really weird!
Let me know!
its possible detect mobile or tablet vertically or horizontally?
]]>Is it possible to target only iOS (whether iPhone or iPad) with this plugin installed ?
]]>Looks like Mobile Detect is up to version 2.8.37
Will you be updating to the latest version?
]]>Hi,
How can i detect tablet with this?
]]>You can view android versions in beta mobile_detect.
Does the plug-in support it? I wanted to display relevant content for androids older than 5 and other for newer ones.
]]>After installing and activating. My site still shows the mobile version when using a Microsoft Surface Pro 3 with edge(Chromium).
Regards
Tony
Not being an expert, I struggled with this plugin initially when trying to define mobile and non-mobile only content. However, method two on this page was of great help to make shortcodes
https://wp-snippet.com/snippets/display-content-mobile-desktop-using-wordpress-wp_is_mobile/
I’ve included the relevant parts of this page below in case the URL changes.
And then this plugin is great, because before I found this there was no easy way to distinguish between mobile phones and tablets. Good work!
==
Relevant material from above link:
Method 2 instructions
This snippet will allow you to use shortcodes
[desktoponly] desktop content [/desktoponly]
or
[mobileonly] mobile content [/mobileonly]
to determine what content should be returned to the visitor.
Add this code to your functions.php
<?php
// [desktoponly] shortcode
add_shortcode('desktoponly', 'wp_snippet_desktop_only_shortcode');
function wp_snippet_desktop_only_shortcode($atts, $content = null){
if( !wp_is_mobile() ){
return wpautop( do_shortcode( $content ) );
} else {
return null;
}
}
// [mobileonly] shortcode
add_shortcode('mobileonly', 'wp_snippet_mobile_only_shortcode');
function wp_snippet_mobile_only_shortcode($atts, $content = null){
if( wp_is_mobile() ){
return wpautop( do_shortcode( $content ) );
} else {
return null;
}
}
?>
]]>
Just a quick question on how to use this awesome plugin.
Are all the methods from the Mobile Detect PHP library available:
$detect->isMobile();
$detect->isTablet();
$detect->isIphone();
$detect->isSamsung();
How do you include in a template file. obviously this won’t work:
require_once ‘Mobile_Detect.php’;
$detect = new Mobile_Detect;
Hello,
While trying to send a fix for https://www.ads-software.com/support/topic/activation-causes-500-server-error/ , I made a series of mistakes that could have caused the plugin not to update resulting in multiple errors. All have been fixed in version 1.1.3. If anyone tried to update from version 1.0.1 to any version lower than 1.1.3, please accept my apologies.
I didn’t know how to use SVN. Entirely my mistake.
Thanks,
Pothi.
As the subject says, upon activation the site returns a 500 server error (front and backend). We have 512mb memory available so I would be surprised if this was the cause. Any ideas?
]]>Hello,
There is always an Embedded browser in a APP, but the problem is there are always different cache issue or compatibility issue with different embedded browser, and I just want to redirect access from an specific embedded browser to a custom url or website.
I checked this plugin, https://www.ads-software.com/plugins/php-browser-detection/, unfortunately, I can not make it work.
is it possible to achieve my purpose?
Thanks
]]>Hi, we would like to use your plugin but we would like to use shortcode, so, we could show page section if in mobile or other page section if not mobile…
shortcode like this
[phone]Put content here that you only want displayed on Phones NOT Tablets or Desktops[/phone]
[tablet]Put content here that you only want displayed on Tablets NOT Phones or Desktops[/tablet]
[device]Put content here that you only want displayed on Phones OR Tablets NOT Desktops[/device]
[notphone]Put content here that you only want displayed on Tablets OR Desktops NOT Phones[/notphone]
[nottab]Put content here that you only want displayed on Phones OR Desktops NOT Tablets[/nottab]
we usually use this plugin but their are not mantaining it….
thank you very much
]]>