Giter VIP home page Giter VIP logo

Comments (7)

andyhqtran avatar andyhqtran commented on May 29, 2024

@badcat Yeah, that's not a problem!


From what I can tell, this is set by WordPress itself... However, with the code module, you can set a work around for it.

<script>
  document.querySelector('meta[name="viewport"]').setAttribute("content", "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0");
</script>

from divi-resources.

badcat avatar badcat commented on May 29, 2024

So easy! I thought it was set via the theme and I was trying not to hack the core Divi theme but also didn't want/need to create a child theme just for this one change. - thanks Andy, -- Kel

from divi-resources.

andyhqtran avatar andyhqtran commented on May 29, 2024

@badcat no problem! I know what you mean, which is why the module is so powerful! It basically serves as a "child theme" in a way since you can replace almost anything and create almost anything! The awesome part as well, is the fact that you can set it as a global module and lock it!

from divi-resources.

badcat avatar badcat commented on May 29, 2024

Doh! waitaminute... I think I'm realizing you're expecting this in the "Code Module"-- on a per page/post etc basis in the Builder? I was thinking it would be added in the Theme Options > Integration tab (Enable Header Code then.. add Code to Head)

from divi-resources.

andyhqtran avatar andyhqtran commented on May 29, 2024

@badcat Oh yeah, I forgot about that. That would work as well!

from divi-resources.

badcat avatar badcat commented on May 29, 2024

For anyone following along - I just added as a meta tag in the head as I stated above. Not the JS.
Since it comes after the default Divi metatag, the browser uses the last one it finds (Well I hope that's how it renders out :)
e.g.
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" />

Thanks Andy for making me think 👍

from divi-resources.

andyhqtran avatar andyhqtran commented on May 29, 2024

@badcat That's great to hear! Just like how script tags are handled and CSS selectors, the last one overrides the first! :)

from divi-resources.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.