WordPress.org

Ready to get started?Download WordPress

Forums

Querying TwentyEleven's mobile responsiveness (3 posts)

  1. Arfa__
    Member
    Posted 1 year ago #

    I'm really liking how the twentyeleven will respond to mobile devices and arrange stuff more appropriately.

    However, how can I query pragmatically in PHP API whether the theme is being displayed on a desktop or mobile device, whether stuff as been shifted about etc?

    I've like to further tailor my layout and widgets for mobile users. i.e. smaller and less widgets for mobile users.

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    I'm not sure what you mean with PHP API, do you want to find who has been viewing your website through some-sort of analytic approach?

  3. Arfa__
    Member
    Posted 1 year ago #

    What I want to do, is when the site is viewed on a mobile device, I want to dynamically serve up different widgets/content, that fits the rearranged twenty eleven theme better and is more light weight.

    So I'm looking for a WP php function, that'll let me determine if twentyeleven has responded it's layout to a mobile device. Something I can use in my own child theme and/or plugin.

    Though digging some more, it seems all of twentyeleven's responsiveness is implemented within CSS, so I'm not sure if the theme php code is even aware of the device...

Topic Closed

This topic has been closed to new replies.

About this Topic