WordPress.org

Ready to get started?Download WordPress

Forums

Dynamic Widgets
[resolved] widget visible ONLY in mobile (19 posts)

  1. neverone
    Member
    Posted 4 months ago #

    Hi there!

    your plugin is great and adds many possibilites for handling widgets. I use i especially when i want to hide some ads and widgets when viewing the site on a smartphone or tablet.

    however....

    is there a way to make a widget hidden when viewed on a PC but still visible on mobile? i tried messing with the options and didn't manage to do so.

    any help would be appreciated

    thanks in advance!

    Ivan L.

    http.://omnomnom.com.hr
    omnomnom.hr@gmail.com

    https://wordpress.org/plugins/dynamic-widgets/

  2. Qurl
    Member
    Plugin Author

    Posted 4 months ago #

    I knew this question would be raised. Unfortunately I haven't found a way to do that. Sounds silly, I know. The problem here is that WordPress (and so DW) starts from the 'Show the widget' position. Not from a 'Hide the widget'. All other so called 'Overrule types' have extra arguments to be able to make the distinguishment. But for mobile there are no extra arguments.

  3. neverone
    Member
    Posted 4 months ago #

    I'm sorry to hear that. :(

    Do you know any workaround method for such a problem? I don't understand php much, but i can find all and every php file concerning my wordpress site/theme, so i actually can make any changes or add chunks of text in it. it's jut sthat i don't know what/where to do :) (great, huh?) i tried several plugins and searched the whole of internet for it (even the third page in google search results), and still haven't found a working solution.

    there is a plugin that can do this, i do not wish to advertise it here, but upon activating it, it messes with the standard desktop layout of my page, so there is no way i am going to use that.

    i do not know what to do. :(

  4. Qurl
    Member
    Plugin Author

    Posted 4 months ago #

    I think I know which plugin advertises in doing such a job. That plugin is using a completely different approach by showing and hiding using javascript, not PHP. That's probably the reason why it's messing around with your layout.

    Unfortunately no, I don't have a solution for you right now. It's on the ToDO list. But aas I said, I have to work around a couple of issues. I do have some ideas about that

  5. Qurl
    Member
    Plugin Author

    Posted 4 months ago #

    Sometimes ideas turn out to be the solution. Yes, I've found a way around it. Will be included in the new version and now available in the dev version 1.5.7.2

    There are some things to keep in mind. I had to remove the Mobile device option and merge it together with the new option: Devices. When you upgrade, be sure to remove mobile_module.php from the mods folder under the dynamic-widgets installation folder.

  6. neverone
    Member
    Posted 4 months ago #

    thank you for such dedication! will try it soon and let you know how it works :)

  7. neverone
    Member
    Posted 4 months ago #

    hey... i tried to find version 1.5.7.2, and i couldn't find it. maybe i didn't know where to look for.

    eventually i went to your website and downloaded development version 1.5.7.1, uploaded it via ftp and right away i had the device option. however, unfortunately, the option doesn't work :(

    i tried messing with the facebook widget that on the main page looks like this:
    https://imagizer.imageshack.us/v2/223x127q90/849/vncr.png

    and i edited the options like this:
    https://imagizer.imageshack.us/v2/458x646q90/59/7ker.png

    but it didn't work. i tried vice versa, to hide it on the desktop version, and that didn't work either...

    any ideas?

  8. Qurl
    Member
    Plugin Author

    Posted 4 months ago #

    Hmmm... that's why it's in a dev version (read: beta). At my dev server it does work. Do other options in DW work for you? Did
    you remove the mobile_modules.php file?

  9. neverone
    Member
    Posted 4 months ago #

    i just tested other options, and none of them work. i can turn them on and off in the DW options, but the frontpage does not show any changes:(

    not only have i removed the mobile_modules.php file. i deleted the standard dynamic-widgets folder via FTP, and uploaded the beta version, so it's a clean upload. and as i can see, beta version doesn't have mobile_modules.php file in the mods folder.

  10. neverone
    Member
    Posted 4 months ago #

    ok, no i seriously don't know what's going on!

    i just removed the beta version and returned to the standard stable 1.5.7 version.

    after the plugin was activated it showed me previously set up options for individual widgets.

    but now, no matter what or how i set them, whether it is mobile or desktop view, nothing changes! i make the changes in the settings of the plugin, but in the frontend, nothing changes.

    i am scared that i may have done something wrong :(

  11. neverone
    Member
    Posted 4 months ago #

    I FIGURED IT OUT!! :) :) :)

    okay, first of all, i am terribly sorry for this, because it will seem as if i have messed with you and this was not my intention!

    your beta version works!

    the reason it didn't work previously for me is that when editing settings for individual widget in DW settings, i was actually editing inactive widgets. i completely overlooked the fact that they are under "inactive widgets"

    as soon as i tried making changes in active widgets, everything started working as it should :)

  12. Qurl
    Member
    Plugin Author

    Posted 4 months ago #

    Great to read everything is working now.

  13. courtkizer
    Member
    Posted 4 months ago #

    Qurl where can I get this beta version? I want to try it as well. I need to hide widgets on desktop version.

  14. Qurl
    Member
    Plugin Author

    Posted 4 months ago #

    The latetst beta (development) version is always availabe at http://downloads.wordpress.org/plugin/dynamic-widgets.zip

  15. courtkizer
    Member
    Posted 3 months ago #

    How does your software keep variants of the SAME widget with separate settings? If I have 4 versions of my weather widget, and change the settings on one of the widgets to MOBILE ONLY it seems to change the settings for all the other widgets.

    Any suggestions? I need it to keep settings per each widget I drag out in my left or right column. I'm using the software to reorder the widgets for mobile by having multiple instances of the same widget.

  16. WebmistressM
    Member
    Posted 3 months ago #

    Definitely looking to create a "replacement" widget that only shows up in mobile sites. The replacement it will do is for a widget that I have hidden from mobile view because it uses alot of data and therefore would be inconsiderate for those accessing via their mobile provider's data plan.

    The 1.5.7.2 version seems to do the trick but definitely dont want to roll that out on a live site. Any ETA on when the "mobile only" changes might be released officially?

  17. WebmistressM
    Member
    Posted 2 months ago #

    Oop, spoke too soon. With the current release of 1.5.7.2, Im still finding that there is no way to restrict a widget's display between tablets and smartphones.

    In the device setting (for my slideshow widget), I can only check these boxes.

    [ ] Desktop
    [ ] Mobile

    Just like WordPress' wp_is_mobile function, it defines mobile device as any sort of touch device. So, Im still unable to specifically target smartphones as the one to hide this widget but allow tablets to still use it.

    Is the next rendition of your beta able to differentiate tablets from smartphones? Is this even possible?

  18. Qurl
    Member
    Plugin Author

    Posted 2 months ago #

    Correct, the conditional function being used here is wp_is_mobile(). Not sure a distinction can be made between smartphone or tablet, other then via CSS viewport.

  19. mailnov
    Member
    Posted 1 month ago #

    Great - I tested 1.5.7.2 to appear a menu on mobile only (Using the Twenty Fourteen theme). This works fine. When is this beta ready for release?

Reply

You must log in to post.

About this Plugin

About this Topic