• 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

Replace Header with different mobile header

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 › Replace Header with different mobile header

This topic is: not resolved

Tagged: media queries, site-header

  • This topic has 5 replies, 3 voices, and was last updated 6 years, 8 months ago by hackette.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • October 26, 2018 at 5:46 pm #224011
    hackette
    Participant

    I have a client who wants a completely different header for mobile (cell phones) than for desktop. I mean different content and layout. He wants hamburger far left, logo, email icon, phone icon, search icon/function.
    What would be the best way to attack this (apart from drinking too much) and how? These are initial thoughts:
    Adding a new mobile-header widget. Use custom html in widget to make layout.
    THEN
    1. use an after-header hook to install it and use css to display only on mobile and hide main header on mobile OR
    2. use conditional php (based on screen size) in the functions.php file to remove_action and add_action on show regular header or the mobile-header (HELP).

    Any help is appreciated. This is already costing me a ton of time.

    http://webintheworks.com/KKM2/
    October 27, 2018 at 5:49 am #224015
    Brad Dalton
    Participant

    You could use CSS for media queries to change the site header elements at any screen width.

    
    @media only screen and (max-width: 1023px) {
    
    Add your CSS rules here
    
    }
    

    Tutorials for StudioPress Themes.

    October 27, 2018 at 11:30 am #224019
    hackette
    Participant

    Thanks Brad, I thought of that but am not sure how to implement it.
    Wouldn't they still fall in the order they are now in the desktop view? Also, where/how would I add a bunch of stuff that isn't in the desktop view (or would I add them all in the right header and then just turn on or off display depending in which screen size)?

    October 27, 2018 at 6:07 pm #224020
    andytc
    Participant

    I think I’d start with the mobile view first and work my way up to desktop and hide what’s not required.

    October 28, 2018 at 12:00 am #224022
    Brad Dalton
    Participant

    Here's the options for visibility https://www.w3schools.com/css/css_display_visibility.asp

    You could also use jQuery .addClass() and .removeClass() at a specific screen width.


    Tutorials for StudioPress Themes.

    October 28, 2018 at 1:34 pm #224025
    hackette
    Participant

    Thanks Brad. Worked great. I just thought it would be more difficult. Just goes to show the simple solution is often the best.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 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