Widget Blocks
[wp101 video=”widget-blocks”]
In this video, the instructor explores the widget blocks available in WordPress, which allow you to add dynamic content (previously limited to widget areas like sidebars and footers) directly into posts and pages.
1. Categories Block
- Displays a list of post categories.
- Options:
- Show as a dropdown menu.
- Display the hierarchy (parent/child categories).
- Show the number of posts in each category.
2. Custom HTML Block
- Lets you add HTML code anywhere in a page or post.
- Useful for embedding scripts, iframes, or custom code snippets.
- Preview option shows how the HTML will look when published.
3. Latest Comments Block
- Displays a list of recent comments from visitors.
- Options:
- Choose how many comments to display.
- Show/hide comment excerpt.
- Show/hide author name and post title.
4. Latest Posts Block
- Displays a list or grid of recent blog posts.
- Options:
- Show/hide author name, publish date, excerpt, and featured image.
- Set how many posts to display.
- Change the order of posts.
5. Search Block
- Adds a simple search bar to help visitors find content on your site.
- Customize placeholder text in the search field.
6. Social Icons Block
- Add icons that link to your social media profiles.
- Options:
- Choose which networks to display.
- Reorder icons.
- Add or remove icons as needed.
7. Tag Cloud Block
- Displays the most frequently used tags on your site.
- Larger font size = more frequently used tag.
- Helps visitors discover related content easily.
8. Shortcode Block
- Allows you to insert a shortcode, which will be replaced by the corresponding content when published.
- Useful for older plugins or themes that rely on shortcodes.
Key Takeaway:
Widget blocks bring classic sidebar and footer functionality (categories, search, recent posts, etc.) directly into the block editor, giving you more flexibility when designing posts and pages.