{"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:\/\/demo.moralthemes.com\/lawman\/2018\/11\/01\/blocks-widgets\/","title":{"rendered":"Block category: Widgets"},"content":{"rendered":"\n    \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:\/\/demo.moralthemes.com\/lawman\/2020\/08\/'>August 2020<\/a>&nbsp;(11)<\/li>\n\t<li><a href='https:\/\/demo.moralthemes.com\/lawman\/2018\/11\/'>November 2018<\/a>&nbsp;(3)<\/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:\/\/demo.moralthemes.com\/lawman\/2020\/08\/'> August 2020 &nbsp;(11)<\/option>\n\t<option value='https:\/\/demo.moralthemes.com\/lawman\/2018\/11\/'> November 2018 &nbsp;(3)<\/option>\n<\/select><script type=\"text\/javascript\">\n\/* <![CDATA[ *\/\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:\/\/demo.moralthemes.com\/lawman\"] );\n\/\/# sourceURL=block_core_archives_build_dropdown_script\n\/* ]]> *\/\n<\/script>\n<\/div>\n\n<div class=\"wp-block-calendar\"><table id=\"wp-calendar\" class=\"wp-calendar-table\">\n\t<caption>April 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>\n\t\t<td colspan=\"2\" class=\"pad\">&nbsp;<\/td><td>1<\/td><td>2<\/td><td>3<\/td><td>4<\/td><td>5<\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td>6<\/td><td>7<\/td><td>8<\/td><td>9<\/td><td>10<\/td><td>11<\/td><td>12<\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td>13<\/td><td>14<\/td><td>15<\/td><td>16<\/td><td>17<\/td><td>18<\/td><td>19<\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td>20<\/td><td>21<\/td><td>22<\/td><td>23<\/td><td>24<\/td><td>25<\/td><td>26<\/td>\n\t<\/tr>\n\t<tr>\n\t\t<td id=\"today\">27<\/td><td>28<\/td><td>29<\/td><td>30<\/td>\n\t\t<td class=\"pad\" colspan=\"3\">&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:\/\/demo.moralthemes.com\/lawman\/2020\/08\/\">&laquo; Aug<\/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=\"attorneys\">Attorneys&nbsp;&nbsp;(3)<\/option>\n\t<option class=\"level-0\" value=\"copyright\">Copyright&nbsp;&nbsp;(1)<\/option>\n\t<option class=\"level-0\" value=\"law\">Law&nbsp;&nbsp;(3)<\/option>\n\t<option class=\"level-0\" value=\"law-firm\">Law Firm&nbsp;&nbsp;(2)<\/option>\n\t<option class=\"level-0\" value=\"lawyer\">Lawyer&nbsp;&nbsp;(1)<\/option>\n\t<option class=\"level-0\" value=\"uncategorized\">Uncategorized&nbsp;&nbsp;(4)<\/option>\n<\/select><script type=\"text\/javascript\">\n\/* <![CDATA[ *\/\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:\/\/demo.moralthemes.com\/lawman\"] );\n\/\/# sourceURL=build_dropdown_script_block_core_categories\n\/* ]]> *\/\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\/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:\/\/demo.moralthemes.com\/lawman\/about\/page-with-comments\/#comment-5\">Page with comments<\/a><time datetime=\"2007-09-04T10:48:51+00:00\" class=\"wp-block-latest-comments__comment-date\">September 4, 2007<\/time><\/footer><div class=\"wp-block-latest-comments__comment-excerpt\"><p>Author comment.<\/p>\n<\/div><\/article><\/li><li class=\"wp-block-latest-comments__comment\"><img alt='' src='https:\/\/secure.gravatar.com\/avatar\/e3eee336b0968f93554afdae5ee49f00c14a4f25be66a9f75355b5ca429096d5?s=48&#038;d=mm&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/e3eee336b0968f93554afdae5ee49f00c14a4f25be66a9f75355b5ca429096d5?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\"><span class=\"wp-block-latest-comments__comment-author\">Anon<\/span> on <a class=\"wp-block-latest-comments__comment-link\" href=\"https:\/\/demo.moralthemes.com\/lawman\/about\/page-with-comments\/#comment-3\">Page with comments<\/a><time datetime=\"2007-09-04T10:49:28+00:00\" class=\"wp-block-latest-comments__comment-date\">September 4, 2007<\/time><\/footer><div class=\"wp-block-latest-comments__comment-excerpt\"><p>Anonymous comment.<\/p>\n<\/div><\/article><\/li><li class=\"wp-block-latest-comments__comment\"><img alt='' src='https:\/\/secure.gravatar.com\/avatar\/10929b6db9ba753e33c2431aeb556a1de4c474867de3f830e72b3c77084f10f9?s=48&#038;d=mm&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/10929b6db9ba753e33c2431aeb556a1de4c474867de3f830e72b3c77084f10f9?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\"><span class=\"wp-block-latest-comments__comment-author\">tellyworthtest2<\/span> on <a class=\"wp-block-latest-comments__comment-link\" href=\"https:\/\/demo.moralthemes.com\/lawman\/about\/page-with-comments\/#comment-4\">Page with comments<\/a><time datetime=\"2007-09-04T10:49:03+00:00\" class=\"wp-block-latest-comments__comment-date\">September 4, 2007<\/time><\/footer><div class=\"wp-block-latest-comments__comment-excerpt\"><p>Contributor 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:\/\/wpthemetestdata.wordpress.com\/\">themedemos<\/a> on <a class=\"wp-block-latest-comments__comment-link\" href=\"https:\/\/demo.moralthemes.com\/lawman\/about\/page-with-comments\/#comment-5\">Page with comments<\/a><\/footer><\/article><\/li><li class=\"wp-block-latest-comments__comment\"><article><footer class=\"wp-block-latest-comments__comment-meta\"><span class=\"wp-block-latest-comments__comment-author\">Anon<\/span> on <a class=\"wp-block-latest-comments__comment-link\" href=\"https:\/\/demo.moralthemes.com\/lawman\/about\/page-with-comments\/#comment-3\">Page with comments<\/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:\/\/demo.moralthemes.com\/lawman\/2020\/08\/12\/real-estate-attorneys\/\">Real Estate Attorneys<\/a><time datetime=\"2020-08-12T15:58:04+00:00\" class=\"wp-block-latest-posts__post-date\">August 12, 2020<\/time><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/demo.moralthemes.com\/lawman\/2020\/08\/12\/pre-nuptial-agreement\/\">Nuptial Agreement<\/a><time datetime=\"2020-08-12T15:48:46+00:00\" class=\"wp-block-latest-posts__post-date\">August 12, 2020<\/time><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/demo.moralthemes.com\/lawman\/2020\/08\/12\/florida-justice-system\/\">Florida Justice System<\/a><time datetime=\"2020-08-12T12:31:11+00:00\" class=\"wp-block-latest-posts__post-date\">August 12, 2020<\/time><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/demo.moralthemes.com\/lawman\/2020\/08\/12\/copyright-fraud\/\">Copyright Fraud<\/a><time datetime=\"2020-08-12T12:11:05+00:00\" class=\"wp-block-latest-posts__post-date\">August 12, 2020<\/time><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/demo.moralthemes.com\/lawman\/2020\/08\/12\/everything-you-need-to-know-about-american-law\/\">Everything to Know About American Law<\/a><time datetime=\"2020-08-12T09:58:24+00:00\" class=\"wp-block-latest-posts__post-date\">August 12, 2020<\/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:\/\/demo.moralthemes.com\/lawman\/2018\/11\/01\/blocks-formatting\/\">Block category: Formatting<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/demo.moralthemes.com\/lawman\/2018\/11\/01\/blocks-layout-elements\/\">Block category: Layout Elements<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/demo.moralthemes.com\/lawman\/2018\/11\/01\/blocks-widgets\/\">Block category: Widgets<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/demo.moralthemes.com\/lawman\/2020\/08\/12\/copyright-fraud\/\">Copyright Fraud<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/demo.moralthemes.com\/lawman\/2020\/08\/12\/everything-you-need-to-know-about-american-law\/\">Everything to Know About American Law<\/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:\/\/demo.moralthemes.com\/lawman\/\" 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\">There&#8217;s no content to show here yet.<\/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\/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><li class='wp-block-rss__item'><div class='wp-block-rss__item-title'><a href='https:\/\/make.wordpress.org\/themes\/2026\/04\/08\/xpost-tt7-team\/'>X-post: Twenty Twenty-Seven: Team Announcement<\/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\/03\/contribute-to-wordpress-patterns-at-wordcamp-asia-2026\/'>Contribute to WordPress Patterns at WordCamp Asia 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\/03\/31\/wordcamp-asia-2026-themes-team-table-on-contributor-day\/'>WordCamp Asia 2026: Theme\u2019s team table on contributor day<\/a><\/div><\/li><li class='wp-block-rss__item'><div class='wp-block-rss__item-title'><a href='https:\/\/make.wordpress.org\/themes\/2026\/01\/27\/themes-team-meeting-agendas-for-january-27-2026\/'>Themes Team Meeting Agendas for January 27, 2026<\/a><\/div><\/li><\/ul>\n    ","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. The number of comments has [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1736","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/demo.moralthemes.com\/lawman\/wp-json\/wp\/v2\/posts\/1736","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demo.moralthemes.com\/lawman\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/demo.moralthemes.com\/lawman\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/demo.moralthemes.com\/lawman\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/demo.moralthemes.com\/lawman\/wp-json\/wp\/v2\/comments?post=1736"}],"version-history":[{"count":0,"href":"https:\/\/demo.moralthemes.com\/lawman\/wp-json\/wp\/v2\/posts\/1736\/revisions"}],"wp:attachment":[{"href":"https:\/\/demo.moralthemes.com\/lawman\/wp-json\/wp\/v2\/media?parent=1736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/demo.moralthemes.com\/lawman\/wp-json\/wp\/v2\/categories?post=1736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demo.moralthemes.com\/lawman\/wp-json\/wp\/v2\/tags?post=1736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}