Single Page Design, Storing in Theme Options

So I’m developing a theme where essentially all content will be displayed on a single page (index).

Well, the content isn’t exactly conventional. In other words, it’s not just a title and body, maybe a few custom post fields. It’s very different from section to section.

Read More

What I was thinking of doing was just creating all of the content fields using the Theme Options API. So, instead of editing a page, you just go into the theme options area and fill in the content for each section.

My main question is… is there a limit to how much data should be stored as “theme” options? Or, after understanding what I’m doing, is there a better way of accomplishing this?

Related posts

Leave a Reply

2 comments

  1. Option values are longtext. So you can store up to 4,294,967,295 or 4GB (232 – 1) bytes in an option value. I wouldn’t do that … but feel free to test the edge cases. 🙂

  2. It would be helpful to have a better description of what each type of content will be. Is it just text? Or will some content be image, video or other types of content.
    Also, I am assuming that each section of content is static, but should be editable from the back-end.

    (I believe) There is a way to display content from certain pages on a single page. That would be one option. The advantage being that the page editor in has some formatting tools and such.

    The other option would be to create a custom post type for each block of content on your homepage, and then call the most recent post (or 2 or 3 posts) from that type of content.
    That would be a little more flexible in that each section could easily be updated by adding new posts to that post type. You can also use thumbnails for each post.

    Lastly, one other approach might be to use Categories to organize your content. You can call a page or post by its category, and you can also use some of the Category metafields as well. This would be more simple than crating Custom Post Types and might suffice for what you are doing. I just did a page for someone where I listed all of their different “Services” by categories. The Category description is at the top of each different type of Service, and then it lists each one, and then starts with the next category. Works well.