Coder Social home page Coder Social logo

Comments (7)

nuritsha avatar nuritsha commented on May 29, 2024 1

Hi @not-enough-yet,
To use the new filter you need implement it in your child theme's functions.php.
You can use this snippet as inspiration:

function my_viewport_content( $content ) {
   $my_viewport_content = 'viewport-fit=cover';
   // if you need any of the default settings use the following (note the comma separator):
   // return $content .  ', ' . $my_viewport_content;
   // if you need only the new settings, use this:
   return $my_viewport_content;
}
add_filter( 'hello_elementor_viewport_content', 'my_viewport_content' );

from hello-theme.

not-enough-yet avatar not-enough-yet commented on May 29, 2024

Just to clarify and follow up on this issue I am attaching visuals.

This is what it looks like at the moment:
Issue

This is what it should look like:
Fixed

from hello-theme.

nuritsha avatar nuritsha commented on May 29, 2024

Hi @not-enough-yet,

Please check the next version of the theme, it will include a new filter designed to address your request.

Thanks!

from hello-theme.

not-enough-yet avatar not-enough-yet commented on May 29, 2024

@nuritsha,

Thanks for the help! I can't seem to get it to work. Could you explain how to add viewport-fit=cover to what already exists? Also shouldn't this change be added to the code as the default?

Thank you!

from hello-theme.

ramiy avatar ramiy commented on May 29, 2024

You can also add your own meta tag to override the previous meta tag:

function custom_viewport() {
    ?>
    <meta name="viewport" content="viewport-fit=cover"
    <?php
}
add_action('wp_head', 'custom_viewport');

from hello-theme.

philmatt avatar philmatt commented on May 29, 2024

+1

I would like better iPhone compatibility without the need to create a child-theme. Is that possible with Hello Theme?

from hello-theme.

noisybird avatar noisybird commented on May 29, 2024

Hi @not-enough-yet,
To use the new filter you need implement it in your child theme's functions.php.
You can use this snippet as inspiration:

function my_viewport_content( $content ) {
   $my_viewport_content = 'viewport-fit=cover';
   // if you need any of the default settings use the following (note the comma separator):
   // return $content .  ', ' . $my_viewport_content;
   // if you need only the new settings, use this:
   return $my_viewport_content;
}
add_filter( 'hello_elementor_viewport_content', 'my_viewport_content' );

Hmmm, thanks, but it also modifies the design in portrait mode, it does not only affect the landscape mode of the iPhone X. The header becomes all tiny in portrait mode.

from hello-theme.

Related Issues (20)

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.