If you’d like to build a one-page website, Ultra and SiteOrigin Page Builder make the job easy.
Create the page you’ll be using by going to PagesAdd New. If you’d like this page to be your home page, go to SettingsReading to assign it as your static home page once saved.
Next, we’ll setup the page design to make it suitable for a full-width one-page website. In the Attributes meta box, set the Template drop-down to Default Template. Next, scroll down to the Page Settings meta box and set the Page Layout to No Sidebar. Finally, disable the Header Bottom Margin and Footer Top Margin settings as we’d like our first and last rows to be flush with the header and footer respectively.
Click on the Page Builder tab to switch to the Page Builder interface. In this example, we’ll be using a pre-built layout to get started. Click the Layouts button and then Layouts Directory on the left. Select any of the pre-built layouts then click the Insert button bottom right followed by Replace current.
Once inserted your can edit each section of the pre-built layout and insert your own content. You can of course build your one-pager from scratch using Page Builder but for this tutorial we’ll use a pre-built layout to speed things up.
Our page is now setup, albeit with a pre-built layout. Our next task is to ready the page for navigation links that will take the user to each section. We’ll do this by inserting an ID in each row. From the Page Builder interface, edit the first row by clicking the wrench icon on the right then Edit Row. Click the Attributes heading in the right column and locate the Row ID field at the top. Type a word to identify this row by, for example, if your first row had information about the page/service/company you might enter about as the ID. Once inserted, click the Done button in the bottom right of the modal window and repeat this process for each row. Each ID should be unique.
Go to AppearanceMenus. If you don’t yet have a custom menu created and assigned to Ultra’s primary menu location, click create a new menu, name your menu and use the checkbox at the bottom of the page to assign it to the theme’s Primary Menu location.
To insert links to your page sections, click Custom Links in the left column, in the URL field, insert a hash followed by the name of your first row ID. For example
about was the name of your first ID. In the Link Text field, insert the menu item label, this is what users will see. Finally, click Add to Menu. Repeat this process for all of your section IDs. Finally, click Save Menu.
In the above paragraph we used section links as follows:
If other pages are present in your menu you can use the full URL:
If you’d like to smooth scroll from a link outside of the main menu, simply add the following class to it:
An example of this class added to a link:
<a href="#colophon" class="puro-scroll">Scroll to the footer</a>
When scrolling the menu will highlight using the current menu item color, the section that’s being viewed. When a link is clicked on, the page will smooth scroll to that section.