Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Child theme of Twenty Seventeen with adjustments for an one page / single page site

License

NotificationsYou must be signed in to change notification settings

strarsis/twentyseventeen-onepage

Repository files navigation

Child theme of Twenty Seventeen with adjustments for an one page / single page site.

Features

  • Page slugs as anchors! 🦄
  • Updates anchor in URL (location) when scrolling! 🦄
  • Menu link is highlighted when linked page is scrolled in. 🦄
  • Fixed anchor offset (when admin bar on frontend is shown).
  • Uses theBootstrap Scrollspy plugin.
  • Live example with Docker container.

Setup

  1. Create a single, normal page for each section in WordPress.
  2. In Customizer, set the 'Static Front Page' option to the page to be shown as first section.
  3. In Customizer, in "Theme Options", define the sections.
  4. If you need more than the default 4 sections, enable and adjustthis commented out code in functions.php (#2):
/* * A simple function to control the number of Twenty Seventeen Theme Front Page Sections * Source: wpcolt.com */functiontwentyseventeen_custom_front_sections($num_sections ){return7;// Change this number to change the number of the sections.}add_filter('twentyseventeen_front_page_sections','twentyseventeen_custom_front_sections' );
  1. In Menu settings, create a new menu and create new menu items of type 'Custom Link'.The 'page-slug' is showing on every Page directly after the input field for the page title ('Permalink:'). The 'page slug' is the last part. E.g.:http://test.domain.com/page-1 → 'page-1' → URL='/#page-1'. Use/ for index page in case you still have sub-pages so the links can go back.

  2. For smooth scrolling you can install the Wordpress-PluginjQuery Smooth Scroll.

Live demo

See README inlive-demo/.

TODO

Make top navigation always sticky (also sticky on mobile).

Acknowledgements

Thanks to @nydeggerm forREADME improvements.

About

Child theme of Twenty Seventeen with adjustments for an one page / single page site

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp