• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

duplicated Viewport meta tag

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › duplicated Viewport meta tag

This topic is: not resolved

Tagged: meta tag

  • This topic has 3 replies, 2 voices, and was last updated 10 years, 9 months ago by Victor Font.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • February 22, 2015 at 12:48 pm #141771
    zed85
    Member

    Hi

    I have added the following code inside function.php

    //* Add custom Viewport meta tag for mobile browsers
    add_action( 'genesis_meta', 'sp_viewport_meta_tag' );
    function sp_viewport_meta_tag() {
    echo '<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no"/>';
    }

    it works but i still can see the original meta tag if i check the source code

    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no"/>

    how do i remove the first one?

    thanks

    http://www.simontaxi.com
    February 22, 2015 at 1:38 pm #141781
    Victor Font
    Moderator

    Comment out the following line in functions.php:

    add_theme_support( 'genesis-responsive-viewport' );


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 22, 2015 at 3:56 pm #141804
    zed85
    Member

    Hi

    Yes i have found that line in genesis/init.php

    and i have commented it out like this
    //* add_theme_support( 'genesis-responsive-viewport' );

    but i still get the same result on the page source code

    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no"/>

    any idea?

    February 23, 2015 at 6:05 am #141847
    Victor Font
    Moderator

    You didn't say you were using Dynamik. Under the Dynamic Settings, you need to turn off Responsive Design. It will get rid of the additional viewport line, but it will also kill all of the responsive css.

    When using Dynamik to build a site, if you want to change the viewport settings, remove the code you added to functions.php. You don't need it. Go to the Genesis/Dynamik Design/Responsive menu. Click the Show/Hide options button. The first option is the Dynamik viewport settings. Change the meta name parameters there and you'll be good to go.

    Also, never, ever change code in the Genesis Core (Genesis/init.php). You will break Genesis.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble