{"id":370,"date":"2012-07-10T07:59:29","date_gmt":"2012-07-10T07:59:29","guid":{"rendered":"https:\/\/www.frozenlogistic.com\/?p=370"},"modified":"2013-05-09T11:30:38","modified_gmt":"2013-05-09T11:30:38","slug":"widget-rules-2","status":"publish","type":"post","link":"https:\/\/www.frozenlogistic.com\/?p=370","title":{"rendered":"Widget rules"},"content":{"rendered":"<p>Widget rules is a mechanism which introduces a completely new way to manage widgets on a website. Thanks to it, it is possible to specify widget features such as:<\/p>\n<ul>\n<li>displaying on subpages chosen,<\/li>\n<li>displaying on devices chosen,<\/li>\n<li>displaying for a group of users chosen,<\/li>\n<li>displaying with a widget style use chosen.<\/li>\n<\/ul>\n<p>After switching on widget rules in theme&#8217;s advanced settings, under each widget, the following options should be displayed:<\/p>\n<p><a href=\"https:\/\/www.frozenlogistic.com\/wp-content\/uploads\/2012\/07\/widgets1.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"size-full wp-image-862 aligncenter\" alt=\"widgets1\" src=\"https:\/\/www.frozenlogistic.com\/wp-content\/uploads\/2012\/07\/widgets1.jpg\" width=\"258\" height=\"200\" \/><\/a><\/p>\n<p>The most extensive options are those connected with a widget visibility on subpages chosen &#8211; after choosing an option to show a widget on pages chosen (or an option not showing a widget on pages chosen), such a panel will appear:<\/p>\n<p><a href=\"https:\/\/www.frozenlogistic.com\/wp-content\/uploads\/2012\/07\/widgets2.jpg\"><img decoding=\"async\" class=\"size-full wp-image-863 aligncenter\" alt=\"widgets2\" src=\"https:\/\/www.frozenlogistic.com\/wp-content\/uploads\/2012\/07\/widgets2.jpg\" width=\"240\" height=\"203\" \/><\/a><\/p>\n<p>Then, you have to choose a page&#8217;s type to add, e.g. Category, and then give category ID:<\/p>\n<p><a href=\"https:\/\/www.frozenlogistic.com\/wp-content\/uploads\/2012\/07\/widgets3.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-864\" alt=\"widgets3\" src=\"https:\/\/www.frozenlogistic.com\/wp-content\/uploads\/2012\/07\/widgets3.jpg\" width=\"242\" height=\"216\" \/><\/a><\/p>\n<p>After clicking \u00abAdd page\u00bb button, a page will appear on a list of pages chosen on which in our case a widget will be displayed:<\/p>\n<p><a href=\"https:\/\/www.frozenlogistic.com\/wp-content\/uploads\/2012\/07\/widgets4.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-865\" alt=\"widgets4\" src=\"https:\/\/www.frozenlogistic.com\/wp-content\/uploads\/2012\/07\/widgets4.jpg\" width=\"233\" height=\"77\" \/><\/a><\/p>\n<p>Of course, it is possible to add more pages:<\/p>\n<p><a href=\"https:\/\/www.frozenlogistic.com\/wp-content\/uploads\/2012\/07\/widgets5.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-866\" alt=\"widgets5\" src=\"https:\/\/www.frozenlogistic.com\/wp-content\/uploads\/2012\/07\/widgets5.jpg\" width=\"230\" height=\"100\" \/><\/a><\/p>\n<p>To make it clearer, , each page&#8217;s type is displayed with a different color. A page added can be removed by clicking a removing icon placed on the right side of each page.<\/p>\n<p>In this way, you may set a widget so as to be shown on pages chosen or to be shown on all pages except the chosen ones.<\/p>\n<p>Recent Updates bring new features. An option of displaying a widget on chosen\u00a0pages has now twelve options:<\/p>\n<div role=\"group\">\n<ul>\n<li><strong>Homepage<\/strong><\/li>\n<li><strong>Page<\/strong><\/li>\n<li><strong>Post<\/strong><\/li>\n<li><strong>Category<\/strong><\/li>\n<li><strong>Tag<\/strong><\/li>\n<li><strong>Archive<\/strong><\/li>\n<li><strong>Author<\/strong><\/li>\n<li><strong>Page Template<\/strong> (Contact, Gallery, Login, Latest, Tagcloud etc.)<\/li>\n<li><strong><a title=\"Taxonomy - WordPress Codex\" href=\"http:\/\/codex.wordpress.org\/Taxonomies\">Taxonomy<\/a> <\/strong>(to group things together)\n<p><a href=\"https:\/\/www.frozenlogistic.com\/wp-content\/uploads\/2012\/07\/meetgavern_wp_widget_rules_new1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-944 aligncenter\" alt=\"meetgavern_wp_widget_rules_new1\" src=\"https:\/\/www.frozenlogistic.com\/wp-content\/uploads\/2012\/07\/meetgavern_wp_widget_rules_new1.png\" width=\"238\" height=\"271\" \/><\/a><\/li>\n<li><strong><a title=\"Post Types - WordPress Codex\" href=\"http:\/\/codex.wordpress.org\/Post_Types\">Post type <\/a><\/strong>(Other than default e.g. products from shop plugin)<\/li>\n<li><strong>Search page<\/strong><\/li>\n<li><strong>404 page<\/strong><\/li>\n<\/ul>\n<\/div>\n<p>Generally, widgets are shown on all pages.<\/p>\n<p>An option of displaying a widget on devices chosen has five options to choose:<\/p>\n<ul>\n<li><strong>All devices<\/strong> &#8211; a widget will be displayed everytwhere &#8211; on every device<\/li>\n<li><strong>Desktop<\/strong> &#8211; a widget will be displayed only when neither a <strong>tablet.css<\/strong> file nor a <strong>mobile.css<\/strong> is loaded <strong><\/strong><\/li>\n<li><strong>Tablets<\/strong> &#8211; a widget displays only when a <strong>tablet.css<\/strong> file will be loaded and, at the same time, a <strong>mobile.css<\/strong> file will not be loaded <strong><\/strong><\/li>\n<li><strong>Smartphones<\/strong> &#8211; a widget will be displayed only when a <strong>mobile.css<\/strong> file will be loaded<\/li>\n<li><strong>Tablets\/Smartphones<\/strong> &#8211; a widget will be displayed when at least one file will be loaded: <strong>tablet.css<\/strong> or <strong>mobile.css<\/strong>.<\/li>\n<\/ul>\n<p>Thanks to these settings, it is possible to limit significantly the amount of content displayed on devices with small screens.<\/p>\n<p>An option of displaying widget for a chosen groups of users has four options to choose:<\/p>\n<ul>\n<li><strong>All users<\/strong> &#8211; a widget will be displayed to all users<\/li>\n<li><strong>Only guests<\/strong> &#8211; a widget will be displayed to not logged in users<\/li>\n<li><strong>Only registered users<\/strong> &#8211; a widget will be displayed to logged in users only<\/li>\n<li><strong>Only administrator<\/strong> &#8211; a widget will be displayed to administrators only<\/li>\n<\/ul>\n<p>Thanks to this option, it is possible e.g. to display messages specified by using widgets for a group of users chosen.<\/p>\n<p>The last optio from widget rules is an option for choosing a widget style &#8211; it causes appending to a widget main container an additional class giving styling specified by a user.<\/p>\n<p>Widget styles are defined in widget.styles.json file and in CSS code &#8211; in this case in <strong>css\/wp.extensions.css<\/strong>.<strong><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Widget rules is a mechanism which introduces a completely new way to manage widgets on a website. Thanks to it, it is possible to specify widget features such as: displaying &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[39,54,30],"class_list":["post-370","post","type-post","status-publish","format-standard","hentry","category-theme-features","tag-css","tag-widget-rules","tag-widgets"],"_links":{"self":[{"href":"https:\/\/www.frozenlogistic.com\/index.php?rest_route=\/wp\/v2\/posts\/370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.frozenlogistic.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.frozenlogistic.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.frozenlogistic.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.frozenlogistic.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=370"}],"version-history":[{"count":3,"href":"https:\/\/www.frozenlogistic.com\/index.php?rest_route=\/wp\/v2\/posts\/370\/revisions"}],"predecessor-version":[{"id":443,"href":"https:\/\/www.frozenlogistic.com\/index.php?rest_route=\/wp\/v2\/posts\/370\/revisions\/443"}],"wp:attachment":[{"href":"https:\/\/www.frozenlogistic.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.frozenlogistic.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.frozenlogistic.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}