{"id":15082,"date":"2010-12-20T08:00:00","date_gmt":"2010-12-20T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/2024\/02\/22\/aside\/"},"modified":"2011-10-05T22:15:00","modified_gmt":"2011-10-05T22:15:00","slug":"aside","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/aside\/","title":{"rendered":"Aside Widget"},"content":{"rendered":"<p>Aside widget allows a page or post to insert arbitrary content into a<br \/>\nsidebar (or other dynamic widget area), supporting something similar to the<br \/>\ntypographic notion of a \u2018pull-quote\u2019.<\/p>\n<p>Aside widget is triggered by the presence, in those pages which require it,<br \/>\nof one or more \u2018aside\u2019 custom fields with values that specify the content<br \/>\nof one or more widgets.  Shifting the locus of widget content control from<br \/>\nthe widget to the page makes for more natural authoring of conditional<br \/>\ncontent which needs to be associated with just a small number of pages.<\/p>\n<p>As well as text, an \u2018aside\u2019 custom field may contain HTML and\/or PHP code.<br \/>\nOf course, any HTML should be crafted so as not to break the containing<br \/>\npage structure.  PHP parsing must be explicitly enabled in the widget<br \/>\nadministration panel and any PHP in the \u2018aside\u2019 field value must be enclosed<br \/>\nin the usual tags for it to be recognised.<\/p>\n<p>A little bit of short-form magic can be triggered by formatting the aside<br \/>\nfield value in the following way.<\/p>\n<pre><code>{#|!|!!}id[,prefix,suffix]\n<\/code><\/pre>\n<p>A value of the form #id (e.g. \u2018#232\u2019) causes the the page or post<br \/>\nidentified by the integer id to be used as the widget content.<\/p>\n<p>A value of the form !id (e.g. \u2018!myasidediv\u2019) causes the contents of the<br \/>\nHTML DIV identified by id to be used as the widget content.  The selected<br \/>\nDIV must reside withing the current page or post.  Normally, the selected<br \/>\nDIV is removed from display within the page proper, but a value of the form<br \/>\n!!id causes the DIV to remain in the normal page flow.  Processing of page<br \/>\ncontent for the identified DIV is unsophisticated: the DIV must not itself<br \/>\ncontain any other DIVs and the DIV id attribute must be the first attribute<br \/>\nafter the tag name.<\/p>\n<p>Prefix and suffix can be used to specify arbitrary text\/HTML which will<br \/>\nbe used to bracket the selected widget content.  PHP can also be used, but<br \/>\nwill only work if parsing is enabled as described above.<\/p>\n<h3>Examples<\/h3>\n<p>A few examples of the use of magic values in the \u2018aside\u2019 field.<\/p>\n<pre><code>#232  \n<\/code><\/pre>\n<p>Display page 232 in the aside widget.<\/p>\n<pre><code>!mydiv  \n<\/code><\/pre>\n<p>Remove the contents of <code><\/p>\n<div id='mydiv'>...<\/div>\n<p><\/code> from the current<br \/>\npage and display it in the aside widget.<\/p>\n<pre><code>!!mydiv  \n<\/code><\/pre>\n<p>As above, but leave the content in the page.<\/p>\n<pre><code>!!mydiv,<span style=\u201dbigquote\u201d>,<\/span>  \n<\/code><\/pre>\n<p>As above, but style the widget output in some special way.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Display arbitrary sidebar content conditional upon a particular post or page.<\/p>\n","protected":false},"author":65,"featured_media":235977,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Aside Widget - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"Display arbitrary sidebar content conditional upon a particular post or page."},"footnotes":""},"categories":[1],"tags":[5948,1342,257,5949,120],"class_list":["post-15082","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-aside","tag-conditional","tag-php","tag-pull-quote","tag-widget"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/15082","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=15082"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/15082\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/235977"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=15082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=15082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=15082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}