1

The situation is, I'm currently creating a website from scratch for a client, one requirement is Wordpress, and the layout is a "One Page Layout". Since it's my first project developing a scratch theme for wordpress, I have question concerning the method used by experienced users here to achieve the One Page functionality.

So, I achieved this functionality by:

1 - Creating Child pages of Home, and assigning a page template that matches a section (team, hero, about, contact ...). The cons in my opinion is the custom labels for each diff section, hard for client to manage, the wordpress "page editor" lacks functionality.

2 - (method used) created a "one page template", and implemented a widget area (sidebar) for the sections, and created a custom plugin for the team that adds widgets to the wordpress dashboard, then the user can add them in "Widgets > One Page Area", and edit the contents of each sections. Pros, it's easier for the client to manage the widgets and order the sections in homepage. Cons, I think that it's not a "good" way of achieving one page functionality with widgets.

So, I would like to know in what kind of way you implement a onepage functionality in wordpress theme developing.

PS: I don't want to use a plugin already created since it's also for University and they don't want me to use other developers plugins.

brasofilo
  • 25,496
  • 15
  • 91
  • 179
  • We are using [ACF-Pro](https://www.advancedcustomfields.com/). It has a super easy Content-Type "flexible content" which you can define custom block like 2 columns or gallery. `hey don't want me to use other developers plugins` => This is bulls$!t. You don't want to greate the whell again. – Sysix Apr 11 '18 at 18:15
  • I would do what Sysix recommended. No reason to reinvent a wheel and generally most "real world" developers wouldn't want to spend the time doing so (and most clients wouldn't want to spend the money). For #2 Gutenberg might be able to handle. Your real question isn't really what this forum is for... but we both answered it :) – Aibrean Apr 11 '18 at 18:23
  • Its not my decision to not reinvent the wheel. Trust me, I don't agree with it, but can't do nothing about it. Thank you for your answers, i'll do more research on ACF-Pro, and ask my client if i can use it. – user2603055 Apr 11 '18 at 18:59

0 Answers0