{"id":10709,"date":"2014-02-11T16:02:21","date_gmt":"2014-02-11T16:02:21","guid":{"rendered":"http:\/\/www.oik-plugins.com\/?post_type=shortcode_example&#038;p=10709"},"modified":"2017-12-04T13:07:18","modified_gmt":"2017-12-04T13:07:18","slug":"bw_address-displayed-single-line","status":"publish","type":"shortcode_example","link":"https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/","title":{"rendered":"bw_address  <span class=\"summary\">&#8211; displayed as a single line<\/span>"},"content":{"rendered":"From oik v3.2.2 you can use the <code>tag=span<\/code> parameter to display an address as a single line.<!--more-->\r\n\r\n<div class=\"bw_geshi none\"><pre>\r\nWrite to us at &#091;bw_address tag=span] or phone now. \r\n<\/pre><\/div>\r\n\r\nWrite to us at <span class=\"adr bw_address\"><span class=\"type\">Work<\/span><span class=\"extended-address\">The Long Room<\/span><span class=\"street-address\">41 Redhill Road<\/span><span class=\"locality\">Rowlands Castle<\/span><span class=\"region\">HANTS<\/span><span class=\"postal-code\">PO9 6DE<\/span><span class=\"country-name\">UK<\/span><\/span> or phone now. \r\n\r\n<h3>Alternative method<\/h3>\r\n\r\nIn previous versions of oik it was necessary to use CSS to style the generated HTML. \r\n\r\n<div class=\"bw_geshi none\"><pre>\r\nWrite to us at &#091;bw_address] or phone now.\r\n<\/pre><\/div>\r\n\r\nWrite to us at <div class=\"adr bw_address\"><div class=\"type\">Work<\/div><div class=\"extended-address\">The Long Room<\/div><div class=\"street-address\">41 Redhill Road<\/div><div class=\"locality\">Rowlands Castle<\/div><div class=\"region\">HANTS<\/div><div class=\"postal-code\">PO9 6DE<\/div><div class=\"country-name\">UK<\/div><\/div> or phone now.\r\n\r\nSet the <code>div<\/code>s within the outer <code>div<\/code> to <code>display: inline;<\/code>. \r\n<div><style  type=\"text\/css\" media=\"screen,print\">.bw_address div, .bw_address p { display: inline; }\r\n<\/style><div class=\"bw_css\"><code><span style=\"color: #6666ff;\">.bw_address<\/span> div<span style=\"color: #00AA00;\">,<\/span> <span style=\"color: #6666ff;\">.bw_address<\/span> p <span style=\"color: #00AA00;\">&#123;<\/span> <span style=\"color: #000000; font-weight: bold;\">display<\/span><span style=\"color: #00AA00;\">:<\/span> <span style=\"color: #993333;\">inline<\/span><span style=\"color: #00AA00;\">;<\/span> <span style=\"color: #00AA00;\">&#125;<\/span><br \/>\n&nbsp;<\/code><\/div><\/div>\r\n\r\n<h3>Optional styling<\/h3>\r\n<div><style  type=\"text\/css\" media=\"screen,print\">\r\n.bw_address div::after,\r\n.bw_address span::after { content: \",\"; }\r\n.bw_address div.country-name::after,\r\n.bw_address span.country-name::after { content: \"\"; }\r\n<\/style><div class=\"bw_css\">Add separating commas using the ::after pseudo element<code><br \/>\n<span style=\"color: #6666ff;\">.bw_address<\/span> div<span style=\"color: #00AA00;\">::<\/span><span style=\"color: #F5758F;\">after<\/span><span style=\"color: #00AA00;\">,<\/span><br \/>\n<span style=\"color: #6666ff;\">.bw_address<\/span> span<span style=\"color: #00AA00;\">::<\/span><span style=\"color: #F5758F;\">after<\/span> <span style=\"color: #00AA00;\">&#123;<\/span> <span style=\"color: #000000; font-weight: bold;\">content<\/span><span style=\"color: #00AA00;\">:<\/span> <span style=\"color: #ff0000;\">&quot;,&quot;<\/span><span style=\"color: #00AA00;\">;<\/span> <span style=\"color: #00AA00;\">&#125;<\/span><br \/>\n<span style=\"color: #6666ff;\">.bw_address<\/span> div<span style=\"color: #6666ff;\">.country-name<\/span><span style=\"color: #00AA00;\">::<\/span><span style=\"color: #F5758F;\">after<\/span><span style=\"color: #00AA00;\">,<\/span><br \/>\n<span style=\"color: #6666ff;\">.bw_address<\/span> span<span style=\"color: #6666ff;\">.country-name<\/span><span style=\"color: #00AA00;\">::<\/span><span style=\"color: #F5758F;\">after<\/span> <span style=\"color: #00AA00;\">&#123;<\/span> <span style=\"color: #000000; font-weight: bold;\">content<\/span><span style=\"color: #00AA00;\">:<\/span> <span style=\"color: #ff0000;\">&quot;&quot;<\/span><span style=\"color: #00AA00;\">;<\/span> <span style=\"color: #00AA00;\">&#125;<\/span><br \/>\n&nbsp;<\/code><\/div><\/div>\r\n\r\n<div><style  type=\"text\/css\" media=\"screen,print\">\r\n.bw_address { background-color: #fff; padding:5px; color: #baba54; font-weight: bold;  } \r\n<\/style><div class=\"bw_css\">Style the whole address<code><br \/>\n<span style=\"color: #6666ff;\">.bw_address<\/span> <span style=\"color: #00AA00;\">&#123;<\/span> <span style=\"color: #000000; font-weight: bold;\">background-color<\/span><span style=\"color: #00AA00;\">:<\/span> <span style=\"color: #cc00cc;\">#fff<\/span><span style=\"color: #00AA00;\">;<\/span> <span style=\"color: #000000; font-weight: bold;\">padding<\/span><span style=\"color: #00AA00;\">:<\/span><span style=\"color: #933;\">5px<\/span><span style=\"color: #00AA00;\">;<\/span> <span style=\"color: #000000; font-weight: bold;\">color<\/span><span style=\"color: #00AA00;\">:<\/span> <span style=\"color: #cc00cc;\">#baba54<\/span><span style=\"color: #00AA00;\">;<\/span> <span style=\"color: #000000; font-weight: bold;\">font-weight<\/span><span style=\"color: #00AA00;\">:<\/span> <span style=\"color: #993333;\">bold<\/span><span style=\"color: #00AA00;\">;<\/span> &nbsp;<span style=\"color: #00AA00;\">&#125;<\/span> <br \/>\n&nbsp;<\/code><\/div><\/div>\r\n\r\n<h3>See also<\/h3>\r\n<ul>\r\n<li><a class=\"bw_link\" href=\"https:\/\/www.oik-plugins.com\/wordpress-plugins-from-oik-plugins\/oik-base-plugin\/oik-options\/oik-options-overview\/oik-options-overview-custom-css\/\">oik options &gt; Overview: Custom CSS<\/a><\/li>\r\n<li><span class=\"bw_plug\"><a class=\"plugin\" href=\"https:\/\/www.oik-plugins.com\/oik-plugins\/oik-css\/\" title=\"Link to the oik-css (oik-css: Internal CSS styling) plugin\">oik-css<\/a><\/span><\/li>\r\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>From oik v3.2.2 you can use the <code>tag=span<\/code> parameter to display an address as a single line.<\/p>\n","protected":false},"featured_media":0,"template":"","letters":[523],"class_list":{"0":"post-10709","1":"shortcode_example","2":"type-shortcode_example","3":"status-publish","5":"letters-b","6":"entry"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>bw_address - displayed as a single line - [oik] plugins.com<\/title>\n<meta name=\"description\" content=\"Example use of bw_address to display the address as a line rather than a block.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"bw_address - displayed as a single line - [oik] plugins.com\" \/>\n<meta property=\"og:description\" content=\"Example use of bw_address to display the address as a line rather than a block.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/\" \/>\n<meta property=\"og:site_name\" content=\"[oik] plugins.com\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-04T13:07:18+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/\",\"url\":\"https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/\",\"name\":\"bw_address - displayed as a single line - [oik] plugins.com\",\"isPartOf\":{\"@id\":\"https:\/\/www.oik-plugins.com\/#website\"},\"datePublished\":\"2014-02-11T16:02:21+00:00\",\"dateModified\":\"2017-12-04T13:07:18+00:00\",\"description\":\"Example use of bw_address to display the address as a line rather than a block.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Shortcode examples\",\"item\":\"https:\/\/www.oik-plugins.com\/shortcode_example\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"bw_address &#8211; displayed as a single line\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.oik-plugins.com\/#website\",\"url\":\"https:\/\/www.oik-plugins.com\/\",\"name\":\"[oik] plugins.com\",\"description\":\"WordPress plugins and themes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.oik-plugins.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"bw_address - displayed as a single line - [oik] plugins.com","description":"Example use of bw_address to display the address as a line rather than a block.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/","og_locale":"en_US","og_type":"article","og_title":"bw_address - displayed as a single line - [oik] plugins.com","og_description":"Example use of bw_address to display the address as a line rather than a block.","og_url":"https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/","og_site_name":"[oik] plugins.com","article_modified_time":"2017-12-04T13:07:18+00:00","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/","url":"https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/","name":"bw_address - displayed as a single line - [oik] plugins.com","isPartOf":{"@id":"https:\/\/www.oik-plugins.com\/#website"},"datePublished":"2014-02-11T16:02:21+00:00","dateModified":"2017-12-04T13:07:18+00:00","description":"Example use of bw_address to display the address as a line rather than a block.","breadcrumb":{"@id":"https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.oik-plugins.com\/shortcode_example\/bw_address-displayed-single-line\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Shortcode examples","item":"https:\/\/www.oik-plugins.com\/shortcode_example\/"},{"@type":"ListItem","position":2,"name":"bw_address &#8211; displayed as a single line"}]},{"@type":"WebSite","@id":"https:\/\/www.oik-plugins.com\/#website","url":"https:\/\/www.oik-plugins.com\/","name":"[oik] plugins.com","description":"WordPress plugins and themes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.oik-plugins.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/shortcode_example\/10709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/shortcode_example"}],"about":[{"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/types\/shortcode_example"}],"version-history":[{"count":2,"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/shortcode_example\/10709\/revisions"}],"predecessor-version":[{"id":34825,"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/shortcode_example\/10709\/revisions\/34825"}],"wp:attachment":[{"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/media?parent=10709"}],"wp:term":[{"taxonomy":"letters","embeddable":true,"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/letters?post=10709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}