|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * Title: Sidebar |
| 4 | + * Slug: {{theme_slug}}/sidebar |
| 5 | + * Description: A sidebar with search, recent posts, categories, tags, and archives widgets. |
| 6 | + * Categories: {{theme_slug}}-components |
| 7 | + * Keywords: sidebar, widgets, search, categories, tags, archives |
| 8 | + * Block Types: core/template-part/sidebar |
| 9 | + * Viewport Width: 400 |
| 10 | + */ |
| 11 | +?> |
| 12 | +<!-- wp:group {"layout":{"type":"constrained"}} --> |
| 13 | +<div class="wp-block-group" role="complementary" aria-label="<?php esc_attr_e( 'Blog sidebar', '{{theme_slug}}' ); ?>"> |
| 14 | + <!-- wp:heading {"level":2,"className":"screen-reader-text"} --> |
| 15 | + <h2 class="wp-block-heading screen-reader-text"><?php esc_html_e( 'Sidebar', '{{theme_slug}}' ); ?></h2> |
| 16 | + <!-- /wp:heading --> |
| 17 | + |
| 18 | + <!-- wp:search {"label":"<?php esc_attr_e( 'Search', '{{theme_slug}}' ); ?>","showLabel":false,"placeholder":"<?php esc_attr_e( 'Search…', '{{theme_slug}}' ); ?>","buttonText":"<?php esc_attr_e( 'Search', '{{theme_slug}}' ); ?>"} /--> |
| 19 | + |
| 20 | + <!-- wp:separator --> |
| 21 | + <hr class="wp-block-separator has-alpha-channel-opacity"/> |
| 22 | + <!-- /wp:separator --> |
| 23 | + |
| 24 | + <!-- wp:heading {"level":3} --> |
| 25 | + <h3 class="wp-block-heading"><?php esc_html_e( 'Recent Posts', '{{theme_slug}}' ); ?></h3> |
| 26 | + <!-- /wp:heading --> |
| 27 | + |
| 28 | + <!-- wp:latest-posts {"postsToShow":5,"displayPostDate":true} /--> |
| 29 | + |
| 30 | + <!-- wp:separator --> |
| 31 | + <hr class="wp-block-separator has-alpha-channel-opacity"/> |
| 32 | + <!-- /wp:separator --> |
| 33 | + |
| 34 | + <!-- wp:heading {"level":3} --> |
| 35 | + <h3 class="wp-block-heading"><?php esc_html_e( 'Categories', '{{theme_slug}}' ); ?></h3> |
| 36 | + <!-- /wp:heading --> |
| 37 | + |
| 38 | + <!-- wp:categories {"showPostCounts":true} /--> |
| 39 | + |
| 40 | + <!-- wp:separator --> |
| 41 | + <hr class="wp-block-separator has-alpha-channel-opacity"/> |
| 42 | + <!-- /wp:separator --> |
| 43 | + |
| 44 | + <!-- wp:heading {"level":3} --> |
| 45 | + <h3 class="wp-block-heading"><?php esc_html_e( 'Tags', '{{theme_slug}}' ); ?></h3> |
| 46 | + <!-- /wp:heading --> |
| 47 | + |
| 48 | + <!-- wp:tag-cloud {"numberOfTags":20} /--> |
| 49 | + |
| 50 | + <!-- wp:separator --> |
| 51 | + <hr class="wp-block-separator has-alpha-channel-opacity"/> |
| 52 | + <!-- /wp:separator --> |
| 53 | + |
| 54 | + <!-- wp:heading {"level":3} --> |
| 55 | + <h3 class="wp-block-heading"><?php esc_html_e( 'Archives', '{{theme_slug}}' ); ?></h3> |
| 56 | + <!-- /wp:heading --> |
| 57 | + |
| 58 | + <!-- wp:archives {"showPostCounts":true} /--> |
| 59 | +</div> |
| 60 | +<!-- /wp:group --> |
0 commit comments