- Notifications
You must be signed in to change notification settings - Fork0
Child theme of Twenty Seventeen with adjustments for an one page / single page site
License
strarsis/twentyseventeen-onepage
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Child theme of Twenty Seventeen with adjustments for an one page / single page site.
- 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.
- Create a single, normal page for each section in WordPress.
- In Customizer, set the 'Static Front Page' option to the page to be shown as first section.
- In Customizer, in "Theme Options", define the sections.
- 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' );
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.For smooth scrolling you can install the Wordpress-PluginjQuery Smooth Scroll.
See README inlive-demo/.
Make top navigation always sticky (also sticky on mobile).
Thanks to @nydeggerm forREADME improvements.
About
Child theme of Twenty Seventeen with adjustments for an one page / single page site
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.