Add more sections to Twenty Seventeen Home Page

The Twenty Seventeen theme allows up to five sections in the default homepage.

Less is possible without any changes, but if you need/want more sections, you have to use a theme filter: twentyseventeen_front_page_sections to override the default settings.

Here is the code:

function tsct_front_page_sections() {
  return 6; // or 7, or more
add_filter( 'twentyseventeen_front_page_sections', 'tsct_front_page_sections' );

You can put this code either in the functions.php file of your child theme, if you have one, either in a special container thru Code Snippets plugin if you don’t need a child theme. Check Run snippet everywhere, save it and activate it. That’s all!

You also can reduce the sections allowed in the same way, with a lower number, setting 4 (or less) in the code instead of 6 (or more) in tsct_front_page_sections function: return 4; // or 3, or less

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.