Build a one-page site with Polestar, Page Builder by SiteOrigin and the One Pager prebuilt layout. Menu links then scroll to each section. See the one-page demo.
Add the Page
- Install and activate Page Builder by SiteOrigin and the SiteOrigin Widgets Bundle.
- Go to PagesAdd Page.
- To use it as your home page, go to SettingsReading. Under Your homepage displays, select A static page and choose this page.
Set the Page Settings
In the Page Settings box, make these changes.
- Set Page Layout to No Sidebar.
- Clear Header Bottom Margin and Footer Top Margin. The theme margins go away. Row padding still applies.
- Optional: set Header Overlap to Enabled – Light Text and clear Footer Widgets. The demo uses both.
Insert the One Pager Layout
- Click the Page Builder tab above the editor. In the block editor, add a SiteOrigin Layout Block instead.
- Click Layouts. Under Prebuilt Layouts, open Theme Defined Layouts and select One Pager.
- Open the arrow next to Insert and choose Replace current.
- Edit each section and add your own content.
The layout loads its images from purothemes.com. Replace them with images from your Media Library in the Hero widget and in the row with the fixed background. For the row, open Edit RowDesignBackground Image.
Set the Row IDs
Each menu link needs a row with a matching ID. The One Pager layout has IDs on its rows: services, statistics, testimonials, blog, parallax and contact. To add or change an ID:
- Open the row settings and click Attributes.
- Enter a unique word in Row ID, such as
about. - Click Done.
Build the Menu
- Go to AppearanceMenus. Create a menu and assign it to the Header Menu location.
- In the left column, open Custom Links.
- In URL, enter a hash and a row ID, such as
#services. - In Link Text, enter the label visitors see.
- Click Add to Menu.
- Repeat for each row ID, then click Save Menu.
If the menu also links to other pages, use the full address for section links:
https://example.com/#services
Smooth Scroll From Other Links
Menu links scroll smoothly by default. To get the same scroll from a link outside the menu, add the class puro-scroll.
<a href="#contact" class="puro-scroll">Contact us</a>
While a visitor scrolls, the menu item for the section in view takes the current link color. Set it with Current Link Color in the Navigation settings. That setting needs Polestar Premium. Without it, the item uses the Accent Color.
Use a Different Menu on the One-Page
To show a different menu on the one-page only, use the Conditional Menus plugin.
- Create the one-page menu at AppearanceMenus.
- Open the Manage Locations tab.
- Click + Conditional Menu and select the one-page menu.
- Click + Conditions and choose your one-page as the page.
- Save the changes.