WordPress.org

Support

Support » Themes and Templates » Replacing Twenty Twelve mobile device menu button with a single link

Replacing Twenty Twelve mobile device menu button with a single link

  • I’ve tried for hours but can’t quite figure out how to just replace (on mobile devices only) the menu button with a simple link leading to one of my pages…

Viewing 1 replies (of 1 total)
  • paulwpxp

    @paulwp

    Font hero

    Create a child theme
    http://codex.wordpress.org/Child_Themes

    It’s important that you move on only if you got a child theme setup and activated properly.

    Make a copy of header.php from parent theme and put in child theme’s folder, then add the link you want just below the h3 with menu-toggle class.

    Notice the <a class="myownlink">..</a> and its position.

    <nav id="site-navigation" class="main-navigation" role="navigation">
    	<h3 class="menu-toggle">..</h3>
    	<a class="myownlink">..</a>
    	<a class="assistive-text">..</a>
    	<?php wp_nav_menu(); ?>
    </nav>

    And then put this in your child theme’s style.css

    .menu-toggle {display: none;}
    .myownlink {display:inline-block;font-size:16px;line-height:2;font-weight:bold;}
    
    @media screen and (min-width: 600px) {
    	.myownlink {display:none;}
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Replacing Twenty Twelve mobile device menu button with a single link’ is closed to new replies.
Skip to toolbar