{"id":1736,"date":"2018-11-01T06:14:47","date_gmt":"2018-11-01T06:14:47","guid":{"rendered":"https:\/\/wpthemetestdata.wordpress.com\/?p=1736"},"modified":"2018-11-01T06:14:47","modified_gmt":"2018-11-01T06:14:47","slug":"blocks-widgets","status":"publish","type":"post","link":"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=1736","title":{"rendered":"Block category: Widgets"},"content":{"rendered":"\n\t\n<p>The shortcode widget:<\/p>\n\n\n\n\n\n\n<p>The Archive Widget:<\/p>\n\n\n<ul class=\"wp-block-archives-list extraclass wp-block-archives\">\t<li><a href='https:\/\/07bd5f78db.363.mcms.ovh.net\/?m=202605'>May 2026<\/a>&nbsp;(3)<\/li>\n\t<li><a href='https:\/\/07bd5f78db.363.mcms.ovh.net\/?m=202604'>April 2026<\/a>&nbsp;(1)<\/li>\n\t<li><a href='https:\/\/07bd5f78db.363.mcms.ovh.net\/?m=202301'>January 2023<\/a>&nbsp;(7)<\/li>\n\t<li><a href='https:\/\/07bd5f78db.363.mcms.ovh.net\/?m=201811'>November 2018<\/a>&nbsp;(11)<\/li>\n\t<li><a href='https:\/\/07bd5f78db.363.mcms.ovh.net\/?m=201810'>October 2018<\/a>&nbsp;(1)<\/li>\n<\/ul>\n\n\n<p>The same Archive widget but as a dropdown:<\/p>\n\n\n<div class=\"wp-block-archives-dropdown wp-block-archives\"><label for=\"wp-block-archives-1\" class=\"wp-block-archives__label\">Archives<\/label>\n\t\t<select id=\"wp-block-archives-1\" name=\"archive-dropdown\">\n\t\t<option value=\"\">Select Month<\/option>\t<option value='https:\/\/07bd5f78db.363.mcms.ovh.net\/?m=202605'> May 2026 &nbsp;(3)<\/option>\n\t<option value='https:\/\/07bd5f78db.363.mcms.ovh.net\/?m=202604'> April 2026 &nbsp;(1)<\/option>\n\t<option value='https:\/\/07bd5f78db.363.mcms.ovh.net\/?m=202301'> January 2023 &nbsp;(7)<\/option>\n\t<option value='https:\/\/07bd5f78db.363.mcms.ovh.net\/?m=201811'> November 2018 &nbsp;(11)<\/option>\n\t<option value='https:\/\/07bd5f78db.363.mcms.ovh.net\/?m=201810'> October 2018 &nbsp;(1)<\/option>\n<\/select><script>\n( ( [ dropdownId, homeUrl ] ) => {\n\t\tconst dropdown = document.getElementById( dropdownId );\n\t\tfunction onSelectChange() {\n\t\t\tsetTimeout( () => {\n\t\t\t\tif ( 'escape' === dropdown.dataset.lastkey ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( dropdown.value ) {\n\t\t\t\t\tlocation.href = dropdown.value;\n\t\t\t\t}\n\t\t\t}, 250 );\n\t\t}\n\t\tfunction onKeyUp( event ) {\n\t\t\tif ( 'Escape' === event.key ) {\n\t\t\t\tdropdown.dataset.lastkey = 'escape';\n\t\t\t} else {\n\t\t\t\tdelete dropdown.dataset.lastkey;\n\t\t\t}\n\t\t}\n\t\tfunction onClick() {\n\t\t\tdelete dropdown.dataset.lastkey;\n\t\t}\n\t\tdropdown.addEventListener( 'keyup', onKeyUp );\n\t\tdropdown.addEventListener( 'click', onClick );\n\t\tdropdown.addEventListener( 'change', onSelectChange );\n\t} )( [\"wp-block-archives-1\",\"https:\/\/07bd5f78db.363.mcms.ovh.net\"] );\n\/\/# sourceURL=block_core_archives_build_dropdown_script\n<\/script>\n<\/div>\n\n<div class=\"wp-block-calendar\"><table id=\"wp-calendar\" class=\"wp-calendar-table\">\n\t<caption>June 2026<\/caption>\n\t<thead>\n\t<tr>\n\t\t<th scope=\"col\" aria-label=\"Monday\">M<\/th>\n\t\t<th scope=\"col\" aria-label=\"Tuesday\">T<\/th>\n\t\t<th scope=\"col\" aria-label=\"Wednesday\">W<\/th>\n\t\t<th scope=\"col\" aria-label=\"Thursday\">T<\/th>\n\t\t<th scope=\"col\" aria-label=\"Friday\">F<\/th>\n\t\t<th scope=\"col\" aria-label=\"Saturday\">S<\/th>\n\t\t<th scope=\"col\" aria-label=\"Sunday\">S<\/th>\n\t<\/tr>\n\t<\/thead>\n\t<tbody>\n\t<tr><td>1<\/td><td>2<\/td><td>3<\/td><td>4<\/td><td>5<\/td><td>6<\/td><td>7<\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td>8<\/td><td>9<\/td><td>10<\/td><td>11<\/td><td id=\"today\">12<\/td><td>13<\/td><td>14<\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td>15<\/td><td>16<\/td><td>17<\/td><td>18<\/td><td>19<\/td><td>20<\/td><td>21<\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td>22<\/td><td>23<\/td><td>24<\/td><td>25<\/td><td>26<\/td><td>27<\/td><td>28<\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td>29<\/td><td>30<\/td>\n\t\t<td class=\"pad\" colspan=\"5\">&nbsp;<\/td>\n\t<\/tr>\n\t<\/tbody>\n\t<\/table><nav aria-label=\"Previous and next months\" class=\"wp-calendar-nav\">\n\t\t<span class=\"wp-calendar-nav-prev\"><a href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?m=202605\">&laquo; May<\/a><\/span>\n\t\t<span class=\"pad\">&nbsp;<\/span>\n\t\t<span class=\"wp-calendar-nav-next\">&nbsp;<\/span>\n\t<\/nav><\/div>\n\n\n<p>The Category widget block has an additional option for showing category hierarchies:<\/p>\n\n\n<div class=\"wp-block-categories-dropdown wp-block-categories\"><label class=\"wp-block-categories__label\" for=\"wp-block-categories-1\">Categories<\/label><select  name='category_name' id='wp-block-categories-1' class='postform'>\n\t<option value='-1'>Select Category<\/option>\n\t<option class=\"level-0\" value=\"6-1\">6.1&nbsp;&nbsp;(7)<\/option>\n\t<option class=\"level-0\" value=\"block\">Block&nbsp;&nbsp;(18)<\/option>\n\t<option class=\"level-0\" value=\"media-2\">Media&nbsp;&nbsp;(1)<\/option>\n\t<option class=\"level-0\" value=\"uncategorized\">Uncategorized&nbsp;&nbsp;(5)<\/option>\n<\/select><script>\n( ( [ dropdownId, homeUrl ] ) => {\n\t\tconst dropdown = document.getElementById( dropdownId );\n\t\tfunction onSelectChange() {\n\t\t\tsetTimeout( () => {\n\t\t\t\tif ( 'escape' === dropdown.dataset.lastkey ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( dropdown.value && dropdown instanceof HTMLSelectElement ) {\n\t\t\t\t\tconst url = new URL( homeUrl );\n\t\t\t\t\turl.searchParams.set( dropdown.name, dropdown.value );\n\t\t\t\t\tlocation.href = url.href;\n\t\t\t\t}\n\t\t\t}, 250 );\n\t\t}\n\t\tfunction onKeyUp( event ) {\n\t\t\tif ( 'Escape' === event.key ) {\n\t\t\t\tdropdown.dataset.lastkey = 'escape';\n\t\t\t} else {\n\t\t\t\tdelete dropdown.dataset.lastkey;\n\t\t\t}\n\t\t}\n\t\tfunction onClick() {\n\t\t\tdelete dropdown.dataset.lastkey;\n\t\t}\n\t\tdropdown.addEventListener( 'keyup', onKeyUp );\n\t\tdropdown.addEventListener( 'click', onClick );\n\t\tdropdown.addEventListener( 'change', onSelectChange );\n\t} )( [\"wp-block-categories-1\",\"https:\/\/07bd5f78db.363.mcms.ovh.net\"] );\n\/\/# sourceURL=build_dropdown_script_block_core_categories\n<\/script>\n\n<\/div>\n\n\n<p>The Latest Comments widget can display or hide the avatars, the date, and the comment excerpt:<\/p>\n\n\n<ol class=\"has-avatars has-dates has-excerpts wp-block-latest-comments\"><li class=\"wp-block-latest-comments__comment\"><img alt='' src='https:\/\/secure.gravatar.com\/avatar\/8e1606e6fba450a9362af43874c1b2dfad34c782e33d0a51e1b46c18a2a567dd?s=48&#038;d=mm&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/8e1606e6fba450a9362af43874c1b2dfad34c782e33d0a51e1b46c18a2a567dd?s=96&#038;d=mm&#038;r=g 2x' class='avatar avatar-48 photo wp-block-latest-comments__comment-avatar' height='48' width='48' \/><article><footer class=\"wp-block-latest-comments__comment-meta\"><a class=\"wp-block-latest-comments__comment-author\" href=\"https:\/\/wordpress.org\/\">A WordPress Commenter<\/a> on <a class=\"wp-block-latest-comments__comment-link\" href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=1#comment-1\">Hello world!<\/a><time datetime=\"2026-04-28T09:34:00+00:00\" class=\"wp-block-latest-comments__comment-date\">April 28, 2026<\/time><\/footer><div class=\"wp-block-latest-comments__comment-excerpt\"><p>Hi, this is a comment. To get started with moderating, editing, and deleting comments, please visit the Comments screen in&hellip;<\/p>\n<\/div><\/article><\/li><li class=\"wp-block-latest-comments__comment\"><img alt='' src='https:\/\/secure.gravatar.com\/avatar\/74ae204a44e1141c881471d095ea156341407e1057d338063d0e06d1509a9410?s=48&#038;d=mm&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/74ae204a44e1141c881471d095ea156341407e1057d338063d0e06d1509a9410?s=96&#038;d=mm&#038;r=g 2x' class='avatar avatar-48 photo wp-block-latest-comments__comment-avatar' height='48' width='48' \/><article><footer class=\"wp-block-latest-comments__comment-meta\"><a class=\"wp-block-latest-comments__comment-author\" href=\"https:\/\/wpthemetestdata.wordpress.com\/\">themedemos<\/a> on <a class=\"wp-block-latest-comments__comment-link\" href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=51#comment-2\">WP 6.1 Theme block category<\/a><time datetime=\"2023-01-16T07:17:56+00:00\" class=\"wp-block-latest-comments__comment-date\">January 16, 2023<\/time><\/footer><div class=\"wp-block-latest-comments__comment-excerpt\"><p>This test post needs a comment.<\/p>\n<\/div><\/article><\/li><\/ol>\n\n\n<p>Here is an example of the Comments widget with all the options disabled. The number of comments has been reduced to two.<\/p>\n\n\n<ol class=\"wp-block-latest-comments\"><li class=\"wp-block-latest-comments__comment\"><article><footer class=\"wp-block-latest-comments__comment-meta\"><a class=\"wp-block-latest-comments__comment-author\" href=\"https:\/\/wordpress.org\/\">A WordPress Commenter<\/a> on <a class=\"wp-block-latest-comments__comment-link\" href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=1#comment-1\">Hello world!<\/a><\/footer><\/article><\/li><li class=\"wp-block-latest-comments__comment\"><article><footer class=\"wp-block-latest-comments__comment-meta\"><a class=\"wp-block-latest-comments__comment-author\" href=\"https:\/\/wpthemetestdata.wordpress.com\/\">themedemos<\/a> on <a class=\"wp-block-latest-comments__comment-link\" href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=51#comment-2\">WP 6.1 Theme block category<\/a><\/footer><\/article><\/li><\/ol>\n\n\n<p>And here is the Latest Posts widget in the list view, with dates:<\/p>\n\n\n<ul class=\"wp-block-latest-posts__list has-dates wp-block-latest-posts\"><li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=1823\">29052026  17:42 FR<\/a><time datetime=\"2026-05-29T15:43:06+00:00\" class=\"wp-block-latest-posts__post-date\">May 29, 2026<\/time><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=1817\">DEMO NKO FROM MAINWP<\/a><time datetime=\"2026-05-22T13:20:56+00:00\" class=\"wp-block-latest-posts__post-date\">May 22, 2026<\/time><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=1815\">Bonjour \u00e0 tous from MAINWP<\/a><time datetime=\"2026-05-19T15:33:19+00:00\" class=\"wp-block-latest-posts__post-date\">May 19, 2026<\/time><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=1\">Hello world!<\/a><time datetime=\"2026-04-28T09:34:00+00:00\" class=\"wp-block-latest-posts__post-date\">April 28, 2026<\/time><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=163\">WP 6.1 Font size scale<\/a><time datetime=\"2023-01-16T07:08:31+00:00\" class=\"wp-block-latest-posts__post-date\">January 16, 2023<\/time><\/li>\n<\/ul>\n\n\n<p>Grid view, now sorted from A -Z.<\/p>\n\n\n<ul class=\"wp-block-latest-posts__list is-grid columns-3 wp-block-latest-posts\"><li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=1823\">29052026  17:42 FR<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=1730\">Block category: Common<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=1738\">Block category: Embeds<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=1732\">Block category: Formatting<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?p=1734\">Block category: Layout Elements<\/a><\/li>\n<\/ul>\n\n\n<p>You can also change the number of columns used to display the latest posts. The block below only displays posts from the Block category:<\/p>\n\n\n<ul class=\"wp-block-latest-posts__list is-grid columns-5 has-dates wp-block-latest-posts\"><\/ul>\n\n\n<p>Search widget:<\/p>\n\n\n<form role=\"search\" method=\"get\" action=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/\" class=\"wp-block-search__button-outside wp-block-search__text-button wp-block-search\"    ><label class=\"wp-block-search__label\" for=\"wp-block-search__input-2\" >Search<\/label><div class=\"wp-block-search__inside-wrapper\" ><input class=\"wp-block-search__input\" id=\"wp-block-search__input-2\" placeholder=\"\" value=\"\" type=\"search\" name=\"s\" required \/><button aria-label=\"Search\" class=\"wp-block-search__button wp-element-button\" type=\"submit\" >Search<\/button><\/div><\/form>\n\n\n<p>Tag Cloud widget:<\/p>\n\n\n<p class=\"wp-block-tag-cloud\"><a href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?tag=codex\" class=\"tag-cloud-link tag-link-80 tag-link-position-1\" style=\"font-size: 8pt;\" aria-label=\"Codex (1 item)\">Codex<\/a>\n<a href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?tag=columns\" class=\"tag-cloud-link tag-link-188 tag-link-position-2\" style=\"font-size: 11.405405405405pt;\" aria-label=\"Columns (2 items)\">Columns<\/a>\n<a href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?tag=content\" class=\"tag-cloud-link tag-link-187 tag-link-position-3\" style=\"font-size: 22pt;\" aria-label=\"content \u03c0\u03b5\u03c1\u03b9\u03b5\u03c7\u03cc\u03bc\u03b5\u03bd\u03bf (10 items)\">content \u03c0\u03b5\u03c1\u03b9\u03b5\u03c7\u03cc\u03bc\u03b5\u03bd\u03bf<\/a>\n<a href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?tag=embeds-2\" class=\"tag-cloud-link tag-link-90 tag-link-position-4\" style=\"font-size: 11.405405405405pt;\" aria-label=\"embeds (2 items)\">embeds<\/a>\n<a href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?tag=formatting-2\" class=\"tag-cloud-link tag-link-99 tag-link-position-5\" style=\"font-size: 8pt;\" aria-label=\"formatting (1 item)\">formatting<\/a>\n<a href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?tag=gallery\" class=\"tag-cloud-link tag-link-102 tag-link-position-6\" style=\"font-size: 11.405405405405pt;\" aria-label=\"gallery (2 items)\">gallery<\/a>\n<a href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?tag=image\" class=\"tag-cloud-link tag-link-109 tag-link-position-7\" style=\"font-size: 15.567567567568pt;\" aria-label=\"image (4 items)\">image<\/a>\n<a href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?tag=sample\" class=\"tag-cloud-link tag-link-185 tag-link-position-8\" style=\"font-size: 8pt;\" aria-label=\"Sample (1 item)\">Sample<\/a>\n<a href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?tag=tags\" class=\"tag-cloud-link tag-link-162 tag-link-position-9\" style=\"font-size: 8pt;\" aria-label=\"Tags (1 item)\">Tags<\/a>\n<a href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?tag=test-tag\" class=\"tag-cloud-link tag-link-186 tag-link-position-10\" style=\"font-size: 8pt;\" aria-label=\"test tag (1 item)\">test tag<\/a>\n<a href=\"https:\/\/07bd5f78db.363.mcms.ovh.net\/?tag=video\" class=\"tag-cloud-link tag-link-173 tag-link-position-11\" style=\"font-size: 8pt;\" aria-label=\"video (1 item)\">video<\/a><\/p>\n\n\n<p>RSS Feed widget:<\/p>\n\n\n<ul class=\"wp-block-rss\"><li class='wp-block-rss__item'><div class='wp-block-rss__item-title'><a href='https:\/\/make.wordpress.org\/themes\/2026\/06\/29\/xpost-wordpress-credits-updates\/'>X-post: WordPress Credits Updates<\/a><\/div><\/li><li class='wp-block-rss__item'><div class='wp-block-rss__item-title'><a href='https:\/\/make.wordpress.org\/themes\/2026\/06\/23\/themes-team-meeting-agendas-for-june-23-2026\/'>Themes Team Meeting Agendas for June 23, 2026<\/a><\/div><\/li><li class='wp-block-rss__item'><div class='wp-block-rss__item-title'><a href='https:\/\/make.wordpress.org\/themes\/2026\/06\/09\/themes-team-meeting-agendas-for-june-9-2026\/'>Themes Team Meeting Agendas for June 9, 2026<\/a><\/div><\/li><li class='wp-block-rss__item'><div class='wp-block-rss__item-title'><a href='https:\/\/make.wordpress.org\/themes\/2026\/05\/06\/xpost-accessibility-ready-requirements-updated\/'>X-post: Accessibility-Ready Requirements Updated<\/a><\/div><\/li><li class='wp-block-rss__item'><div class='wp-block-rss__item-title'><a href='https:\/\/make.wordpress.org\/themes\/2026\/04\/21\/xpost-wordpress-documentation-team-closes-200-issues-and-needs-your-help\/'>X-post: WordPress Documentation Team Closes 200+ Issues \u2014 and Needs Your Help<\/a><\/div><\/li><\/ul>\n\t","protected":false},"excerpt":{"rendered":"<p>The shortcode widget: The Archive Widget: The same Archive widget but as a dropdown: The Category widget block has an additional option for showing category hierarchies: The Latest Comments widget can display or hide the avatars, the date, and the comment excerpt: Here is an example of the Comments widget with all the options disabled. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[187],"class_list":["post-1736","post","type-post","status-publish","format-standard","hentry","category-block","tag-content"],"_links":{"self":[{"href":"https:\/\/07bd5f78db.363.mcms.ovh.net\/index.php?rest_route=\/wp\/v2\/posts\/1736","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/07bd5f78db.363.mcms.ovh.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/07bd5f78db.363.mcms.ovh.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/07bd5f78db.363.mcms.ovh.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/07bd5f78db.363.mcms.ovh.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1736"}],"version-history":[{"count":0,"href":"https:\/\/07bd5f78db.363.mcms.ovh.net\/index.php?rest_route=\/wp\/v2\/posts\/1736\/revisions"}],"wp:attachment":[{"href":"https:\/\/07bd5f78db.363.mcms.ovh.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/07bd5f78db.363.mcms.ovh.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/07bd5f78db.363.mcms.ovh.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}