• Hi,

    I use a theme called The Ken, that use Visual Composer. In VC there is a feature where you can show/hide content depending on whether the visitor uses a mobile or a computer. Problem is that Accelerated Mobile Pages doesn’t seem to recognize this feature. Instead it show both contents, which of course is a big problem. Any idea how to remedy this?

    Regards

    Johan

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Hey Johan @ninjamankid

    hmmm… that’s complex. Let me understand it properly, Do you mean a specific content area editor for AMP content?

    Thread Starter Ninjamankid

    (@ninjamankid)

    Hi Ahmed,

    I’ll try to be more precise. 🙂

    1.
    In Visual Composer i add a Text field and put some text there meant especially for people with computers, like: “Buy my cheap computer för $100”. Then under the Visibility For Devices settings in VC I set it to “Hidden on phones” for that particular text field. Now the Text field will be completely hidden to all phones but visible to desktops. Save and close the Text field.

    2.
    I then add another Text field right below the previous one and add the text: “Buy my IPhone for $50” and set that Text field to “Visible on phones”. Now the Text field will be hidden to desktops, but not phones. Save and close Text field. Save page.

    If I now open the page’s regular url on my computer it will only “see” the first Text field. The second is hidden. If I go to the page with my IPhone it will see only the second Text field. The first is hidden.

    But if I add the “?amp” to the url and the page loads as an AMP page, both computer and IPhone sees both text fields on top of each other. The show/hide feature of VC doesn’t work anymore.

    If I turn off the plug in it all then works as it should. So somehow VC and the plug in isn’t communicating and both Text fields get displayed.

    I hope that clarifies the matter a bit more. Btw, the plug in is awesome in all other aspects!

    Kind regards
    Johan

    Thread Starter Ninjamankid

    (@ninjamankid)

    *Bump*

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Hey @ninjamankid

    Thank you so much for amazing explanation. Can you create a test page or give me a URL that has this ‘Hide on mobile’ feature enabled?

    It will help me go to the code and help me fix it.

    Regards,
    Ahmed

    Thread Starter Ninjamankid

    (@ninjamankid)

    Hi Ahmed,

    our site is a developer site so it’s not possible to show you a page right now since it’s hidden. I also noticed another problem: the menu goes missing when the plug in is turned on, so you can’t navigate the site.

    Regards
    Johan

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Plug in shows hidden content’ is closed to new replies.