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:

  • 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?

6 s
6

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.

Leave a Comment