WordPress.org

Ready to get started?Download WordPress

Forums

Spun
[resolved] Home-button instead of the whole menu (8 posts)

  1. rschulze
    Member
    Posted 1 year ago #

    Hey guys,
    first of all: thanks to Caroline for this great theme ;)

    Here's my problem:
    I don't have any pages, so I don't need a drop-down menu. I do like the Home-button of the menu though.

    When I delete the menu (respectively choose a blank menu; doesn't make any difference) and delete all pages then the Home-button is the only thing left in the upper right corner and that's great.
    However, when I scale the window down to less than 600px width, the Home-button is replaced with the Menu. When you click it, the Home button drops down.
    I don't want the menu to replace the Home-button.

    My first clue was that there's probably some responsive code in the CSS that influences the navigation in this way, but there isn't (or is it?)
    I figured out which code is responsible for the menu in the header.php, but deleting it only prevents the menu from appearing. The Home button still doesn't stay in the header. So basically the only thing that happens at less than 600px is that the Home button vanishes.

    Thanks in advance
    Rico

  2. keyaspects
    Member
    Posted 1 year ago #

    Add the following to the BOTTOM of your style.css file.
    Under Appearance -> Editor -> style.css in the WP Dashboard or via FTP.

    #masthead nav {
    display: none;
    }
  3. rschulze
    Member
    Posted 1 year ago #

    Now, unfortunately, even the Home button is gone.

    There must be a way to disable the "automatically change to drop-down menu when down-scaling"-function.

  4. keyaspects
    Member
    Posted 1 year ago #

    Add the following code instead.

    .main-small-navigation .menu { display: block;}
    .menu-toggle { display: none;}
  5. keyaspects
    Member
    Posted 1 year ago #

    If you want the 'Home' link to sit over to the right update with this.

    .main-small-navigation .menu {
    display: block;
    width: inherit;
    float: right;
    clear: none;
    padding: 0;
    }
  6. rschulze
    Member
    Posted 1 year ago #

    Thanks, that worked much better, however, it worked not perfectly though.
    "Home" now stays there and nothing drops down but it still changes its class and its style.

    Happily, I finally found the code that changes the class at 600px!
    It's in the "toggle.js".
    It even says in the code: "Toggle the the main navigation menu for small screens."
    It's so obvious (actually... ;) )

    Now, without these lines, it works perfectly.
    Nevertheless thank you @keyaspects ;)

  7. Andrew
    Forum Moderator
    Posted 1 year ago #

    Are you aware that edits to the theme's files will be erased when the theme updates?

  8. rschulze
    Member
    Posted 1 year ago #

    Yes, I'm aware of that. I'm not going to update, because I used Spun simply as a basis for my own theme.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.