• 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

Built off Genesis Sample theme and can't get mobile viewport meta tag to appear.

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 › Design Tips and Tricks › Built off Genesis Sample theme and can't get mobile viewport meta tag to appear.

This topic is: not resolved

Tagged: not appearing, Viewport meta tag

  • This topic has 2 replies, 3 voices, and was last updated 12 years, 7 months ago by Doak Heggeness.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 9, 2013 at 3:29 pm #34359
    mattspaeth
    Member

    I have a lot of experience modifying existing Studiopress mobile responsive themes. All of those worked. This is the first built using the Genesis Sample Theme.

    Added the following to my functions.php


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

    add_theme_support( 'genesis-responsive-viewport' );

    It's not appearing in the header. While my theme is responding to resizing the browser window, it's just appearing full width on mobile devices.

    April 9, 2013 at 3:52 pm #34369
    Ozzy
    Member

    do you have a link to the site?


    Ozzy Rodriguez | Twitter | Google+

    April 9, 2013 at 3:56 pm #34375
    Doak Heggeness
    Member

    mattspaeth,

    You are a little ahead of the game. add_theme_support(); will be valid with Genesis 2.0; whenever that is released. For now drop that and use:

    /** Add Viewport meta tag for mobile browsers */
    add_action( 'genesis_meta', 'custom_viewport_meta_tag' );
    function custom_viewport_meta_tag() {
    echo '';
    }

    You should see it in your header. I had trouble finding it myself.


    Doak Heggeness, WordPress Development | Website

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ 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