How to Create Editable Blocks of Text for the Homepage?

I’m making a site based on WordPress. It’s not going to seem a blog or WP. Just a website. So WP acts like backend where the client can edit the text blocks.

Question:

Read More
  • How can I put block of text on my designed template wich users can edit from admin panel?

Let’s say something like this:

homepage wireframe

The 3 top blocks (about us, mission, why us…), how do you fill them from admin panel? Or specific text from header or footer.
Do I have to create 3 posts, and reference them on template through get_post($id)?

Which is the best way to do it?

Related posts

Leave a Reply

6 comments

  1. You have multiple options here, depending on the amount of flexibility you want to give the editor of the text blocks.

    1. Create a custom loop with WP_Query. See our examples and the Codex page for usage. Then you print the excerpts of the page these boxes are linked to.
      You can use attachments (images) and the full formatting here.

    2. Use widgets. See our examples and the Codex page. Limited formatting because the visual editor doesn’t work too well in widget forms.

    3. Use a custom navigation menu and print the description.

    You can combine these methods: Use widgets for header and footer, WP_Query and page or post excerpts for the other boxes.

  2. My ten cents worth:

    • if your page editor has admin access and can edit widgets, then you can create a widget zone for each of those items and provide an appropriate widget for each
    • if your page editor doesn’t have admin access, e.g. they have role editor or author, then they won’t be able to edit the widgets to update them; use custom fields on the page. You can use plain old custom fields for that, or drop in the Advanced Custom Fields plugin.
  3. For singular, one time pieces of content on the home page you might consider using widgets. Register a “sidebar” in your functions file and then call that sidebar into your home template. Drag text widgets into that sidebar and voila.

    For your feeds, use Posts or custom post types. Header and Footer really depend on what they’d contain.

  4. I had to do a similar thing a few months ago on a WordPress build. The easiest way I found was to use a plugin called Spots.

    Description
    Content manage those little snippets of text that you need across your WordPress site and in widgets properly. Forget the text widget.

    Create a spot through the admin panel, add the content and then drop the ‘Spot’ tag into your code.

  5. Another great way to do this would be with Advanced Custom Fields – creating an Options page and having a central location called Home (for example) where they could edit these blocks. If you use ACF, you can then also allow them to add just about anything there, with more control over formatting, like repeaters of images, text blocks, etc.

  6. Adding to the nice answers of my colleagues, where you see

    • the importance of the Widgets
    • the extensive documentation in the Codex
    • the use of free Plugins to make tasks easier and add functionality to your site
    • using this Stack as source of in-depth information

    I’ll add that you have lots of Free Themes.

    And many of them will provide an Options Page, where you can customize the look and content of many parts of the site (header and footer, for example).

    There are Market Places where you’ll find themes completely packed with features. But that’s not necessarily a good thing. Contrary to what happens in WordPress.org, coding standards are not always followed by these themes. And sometimes this can bring severe headaches.
    I believe the most famous is ThemeForest, and they recently have been taking steps to improve the quality of what is sold there.

    Then you have the Theme Houses, like Woo, Elegant Themes, Graph Paper Press, to name a few, where the code is so well done as the aesthetics.

    Then, Theme Frameworks. For which this article provides an overview.

    Whatever you choose, stay away from shady Theme providers.