5 posts
  • Has been part of the Envato Community for over 3 years
  • Has collected 10+ items on Envato Market
UserFriendlyIT says

Hi All,

Working on our first WordPress theme to be converted from an existing, approved, single-page HTML template. Currently considering the best way to handle the structure of pages and how they will be included into the single page layout.

Here is what I’m currently considering: Each section in the one-page layout is a standard WordPress page using our theme’s ‘section’ template. At least one page must use the ‘Home’ template which is used to form the start of the page then loop through and pull in the rest of the sections. There will be a select/sort settings field in the options panel that will enable the user to add which sections they want included in the page and in what order . A toggle will allow switching between an automatically generated menu (based on selected page sections) and the WordPress menu function. Other necessary pages such as ‘blog’ are added to the end of the menu.

Shortcodes will be provided to give user access to the theme’s distinct features such as slide layouts, team, testimonials, columns and all the usual suspects. I understand that native WordPress facilities should be used wherever possible, so featured images etc. will be used where appropriate. It is also my understanding that content should always be portable in case the user changes themes. To support this, the shortcodes will be supplied in a plugin so the user can have access to their content after the change.

Does this sound like I am heading in the right direction? What is the generally accepted standard and best-practices approach to one-pagers? Can anyone offer suggestions?

Looking forward to a long and prosperous Themeforest journey!

Cheers, James

683 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Provided great contribution to our forums
  • Has been a beta tester for an Envato feature
+4 more
Gareth_Gillman says

I am just finishing a one page WP template and what I have done is:

- header and footer files are as normal - index.php pulls in every page via get_pages - loop through pages - shortcodes to add functions such as slider - menu is generated by the page order function, again using the get_pages function

1386 posts How's the surf doing?
  • Has referred 200+ members
  • Has sold $500,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+6 more
tommusrhodus says

index.php pulls in every page via get_pages

I do the same but I do it with child pages so that the user can still create other pages.

Though I’m working on a one-pager at the moment that I’ve managed to get Aqua Page Builder to work for building the full page section by section, which is a little easier for the end user.

EDIT: Though index.php should always be reserved for the main blog loop, use a custom page instead for this or your theme will be rejected.

683 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Provided great contribution to our forums
  • Has been a beta tester for an Envato feature
+4 more
Gareth_Gillman says


index.php pulls in every page via get_pages

I do the same but I do it with child pages so that the user can still create other pages.

Though I’m working on a one-pager at the moment that I’ve managed to get Aqua Page Builder to work for building the full page section by section, which is a little easier for the end user.

EDIT: Though index.php should always be reserved for the main blog loop, use a custom page instead for this or your theme will be rejected.

Balls, I have the blog loop in another file (blog.php) but called from the index.php, basically I have to do a check and based on the check it shows the blog.php or another template for the one page system.

Going to have to rewrite this then?

1386 posts How's the surf doing?
  • Has referred 200+ members
  • Has sold $500,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+6 more
tommusrhodus says

If you’re running specific checks against what’s being viewed then you may not have any issues with the review, but I can’t confirm that.

Personally I prefer to keep index.php as simple as possible and just run the blog loop only from it, tends to minimise conflicts with external plugins etc. as well.

683 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Provided great contribution to our forums
  • Has been a beta tester for an Envato feature
+4 more
Gareth_Gillman says

If you’re running specific checks against what’s being viewed then you may not have any issues with the review, but I can’t confirm that. Personally I prefer to keep index.php as simple as possible and just run the blog loop only from it, tends to minimise conflicts with external plugins etc. as well.

Yeah it’s just a quick if else of the front_page options in the settings > readings, and depending on the answer it either displays blog.php or another template (it’s a 2-in-1 template that the user can run as a multipage or single page).

186 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $1+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
ThemeBuddies says

This is interesting. I tried using get_pages for a one page theme and I found that the function ignored page templates. All it would return was the page text. Did you get it to work?

1029 posts
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
  • Contributed a free file of the month
+6 more
greenline says
Just curious: because Google included web site speed as part of their search ranking algorithm, do you guys use Google Page Speed to test your templates before going live? I mean this is required?
http://developers.google.com/speed/pagespeed/insights/
1602 posts Chris Robinson
  • Located in United States
  • Has sold $500,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 6 years
+10 more
contempoinc says

I use a “Home” custom post type, much better than using pages so they can still be used.

448 posts Don't be a HATER!
  • Has referred 10+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+5 more
webinpixels says


If you’re running specific checks against what’s being viewed then you may not have any issues with the review, but I can’t confirm that. Personally I prefer to keep index.php as simple as possible and just run the blog loop only from it, tends to minimise conflicts with external plugins etc. as well.
Yeah it’s just a quick if else of the front_page options in the settings > readings, and depending on the answer it either displays blog.php or another template (it’s a 2-in-1 template that the user can run as a multipage or single page).

Me, using WordPress filter “template_include” for this. No “if else” etc. An option to activate/deactivate the one page on the theme option. When user activate the one page, WP will automatically read my “custom template” as index file. When it’s turned-off, it will using the settings in “Settings > Reading”.

by
by
by
by
by
by