Another example of using the column block: how to add a sidebar to posts


In spanish

Do you have WordPress 5.9 and a block theme? Does the individual post template not have a sidebar? In this post we teach you how to add a sidebar to posts.

In An example of the use of the column block: an acceptance box (in spanish) we saw how we could use the column block to make an acceptance box. That was a very simple case. Here we propose something a little more substantial: add a sidebar (side column) to the publications (posts) of a blog.

Take a look at the video, how the template corresponding to the individual posts is modified to add a sidebar.

As a summary, the following should be highlighted:

  • We use the list view to help us. Go to our Full Site Editing course (in spanish) for a review of how the site editor works. The list view allows you not only to see the structure of the block layout from a bird’s eye view, but also to easily perform block insert, delete, and move operations.
  • Column block. We use the column block (inserted after the group block) to get the typical blog layout: content on the left and sidebar on the right. The operation that we are going to execute must not affect either the header block or the footer block.
  • To move. Move the group with the block layout, corresponding to the content of the post, inside the block of the left column. This is done very simply using the list view.
  • We already have sidebar. Now you just have to «fill» it with other blocks.