WordPress.org

Ready to get started?Download WordPress

Forums

Sixteen
[resolved] Make top menu bar sticky as you scroll (4 posts)

  1. hcarc
    Member
    Posted 5 months ago #

    Does anyone know how to make the menu bar sticky at the top as you scroll down in Sixteen theme? What codes are needed and any that needs to be deleted, if any in style.css. Thanks for input.

  2. Rohit Tripathi
    Member
    Theme Author

    Posted 5 months ago #

    This is not possible in our theme. But, i will take this suggestion and inculcate it in one of the coming updates.

  3. hcarc
    Member
    Posted 5 months ago #

    Thanks. I have 2 more questions:
    http://www.hcarc3.hcarcheology.org

    1. I was also wondering how I could create four icon images with title for each icon, all four icons below the main body on the homepage that have links to related page. Similar to your sample you give for Sixteen theme.

    The titles would be GENERAL MEETINGS, FIELDWORK, HAPPENINGS, AWARDS & HONORS. This would make the page more simple and classy without having to do a lot of scrolling. thanks for your input. HCAA wants a simple layout as much as possible.

    2. I want to remove the primary sidebar but can't find a way to do that. I like the search option but would rather have it out of the sidebar and somewhere else, such as in the header if possible.

  4. Shr.Khr
    Member
    Posted 4 months ago #

    Not sure if the solution below will work for you (as I cannot confirm until I have seen the code of your theme, but don't see a reason why it work for you too) but I have created a custom sticky menu bar, not specific to any particular theme and does not use a plugin.

    What I used instead is a third party JS called StickyJS which can be downloaded for free.
    This JS is then imported into WP via the functions.php of my WP theme.

    Next you need to call/run this script which is done through some more JS code which can either be placed in the header.php of the theme or imported via functions.php as described above.

    This should be enough to create a sticky menu bar.

    The solution I used is described in full [link redacted] It also describes some of the problems I faced (for example my site is responsive, hence, I needed the menu bar adjust its width according to the width of the screen the site is viewed on), sample code and other reference links.

Reply

You must log in to post.

About this Theme

About this Topic