WordPress.org

Ready to get started?Download WordPress

Forums

Hueman
[resolved] Mobile Version - Different Content (5 posts)

  1. mirilailai
    Member
    Posted 6 months ago #

    Greetings,
    I'm using plugin to load content on my pages. It's a livescore service.
    When I activate the mobile version (which is great) my content doesn't appear with its full width cuz its fixed. It is just hidden.
    Is there a way to load a different content for the mobile version where I can load content with the proper width.

    Thank you,
    Stamen Yanev.

  2. Alexander Agnarson
    Member
    Theme Author

    Posted 6 months ago #

    Hi Stamen. What you can do is wrap the content you want to show on mobile in one div, and one for full-screen. Like this

    <div id="widget-fullscreen">my fullscreen content</div>
    <div id="widget-mobile">my mobile content</div>

    Then add a CSS like this, so fullscreen content is hidden for mobile, and mobile content is hidden for fullscreen:

    #widget-fullscreen { display: block; }
    #widget-mobile { display: none; }
    
    @media only screen and (max-width: 719px) {
    #widget-fullscreen { display: none; }
    #widget-mobile { display: block; }
    }
  3. mirilailai
    Member
    Posted 6 months ago #

    wow great solution!
    where to wrap these? on page edit or somewhere in the theme files?

  4. Alexander Agnarson
    Member
    Theme Author

    Posted 6 months ago #

    It would be added around the content, where ever you have that.

    So you would add both the mobile content and fullscreen content on the page, and have those two divs around it to control what is shown where.

  5. mirilailai
    Member
    Posted 6 months ago #

    got it... thank you!

Reply

You must log in to post.

About this Theme

About this Topic