{"id":22,"date":"2026-09-16T10:28:32","date_gmt":"2026-09-16T10:28:32","guid":{"rendered":"https:\/\/docs.latw.ai\/uncategorized\/shortcode-and-block-reference\/"},"modified":"2026-09-16T10:28:32","modified_gmt":"2026-09-16T10:28:32","slug":"shortcode-and-block-reference","status":"publish","type":"post","link":"https:\/\/docs.latw.ai\/pl\/esti-to-wordpress\/shortcode-and-block-reference\/","title":{"rendered":"Shortcode and Block Reference"},"content":{"rendered":"<h1>Shortcode and block reference<\/h1>\n<p>The <code>[osfec_offers]<\/code> shortcode and the <strong>Offers<\/strong> block render through exactly the same code, so they accept the same<br \/>\noptions and always produce the same markup.<\/p>\n<pre><code>[osfec_offers type=\"mieszkanie\" city=\"Bia\u0142ystok\" limit=\"12\" filters=\"yes\"]<\/code><\/pre>\n<h2>Attributes<\/h2>\n<table>\n<thead>\n<tr>\n<th>Attribute<\/th>\n<th>Values<\/th>\n<th>Default<\/th>\n<th>What it does<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>type<\/code><\/td>\n<td>An offer type slug, e.g. <code>mieszkanie<\/code>, <code>dom<\/code>, <code>dzialka<\/code><\/td>\n<td>empty<\/td>\n<td>Only offers of that type<\/td>\n<\/tr>\n<tr>\n<td><code>city<\/code><\/td>\n<td>A city name or its slug, e.g. <code>Bia\u0142ystok<\/code> or <code>bialystok<\/code><\/td>\n<td>empty<\/td>\n<td>Only offers in that city<\/td>\n<\/tr>\n<tr>\n<td><code>transaction<\/code><\/td>\n<td><code>sale<\/code>, <code>rent<\/code>, <code>purchase<\/code>, <code>lease<\/code><\/td>\n<td>empty<\/td>\n<td>Only that transaction<\/td>\n<\/tr>\n<tr>\n<td><code>agent<\/code><\/td>\n<td>Esti agent ID (number) or agent name<\/td>\n<td>empty<\/td>\n<td>Only that agent&#8217;s offers<\/td>\n<\/tr>\n<tr>\n<td><code>limit<\/code><\/td>\n<td>A positive integer<\/td>\n<td><strong>Offers per page<\/strong> from the settings (12)<\/td>\n<td>How many offers to show<\/td>\n<\/tr>\n<tr>\n<td><code>sort<\/code><\/td>\n<td><code>date<\/code>, <code>price_asc<\/code>, <code>price_desc<\/code>, <code>area_asc<\/code>, <code>area_desc<\/code><\/td>\n<td><code>date<\/code><\/td>\n<td>Order of the list<\/td>\n<\/tr>\n<tr>\n<td><code>filters<\/code><\/td>\n<td><code>yes<\/code> \/ <code>no<\/code><\/td>\n<td><code>no<\/code><\/td>\n<td>Prints the filter bar above the list<\/td>\n<\/tr>\n<tr>\n<td><code>columns<\/code><\/td>\n<td><code>0<\/code>\u2013<code>6<\/code><\/td>\n<td><code>0<\/code><\/td>\n<td><code>0<\/code> keeps the stacked list; anything else lays the cards out in a grid<\/td>\n<\/tr>\n<tr>\n<td><code>more<\/code><\/td>\n<td><code>no<\/code>, <code>yes<\/code>, or any text<\/td>\n<td><code>no<\/code><\/td>\n<td>Adds a link to the offer archive under the list. <code>yes<\/code> prints &#8220;View all offers&#8221;, any other text becomes the label<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Unknown attributes are ignored. There is no pagination on the shortcode or block: it shows <code>limit<\/code> offers and stops.<br \/>\nPagination lives on the archive.<\/p>\n<h3>Notes on individual attributes<\/h3>\n<p><strong><code>type<\/code><\/strong> takes the slug, not the label. It is the type name with its bracketed variant removed and simplified:<br \/>\n<code>Mieszkanie<\/code> \u2192 <code>mieszkanie<\/code>, <code>Dzia\u0142ka (Rolna)<\/code> \u2192 <code>dzialka<\/code>. The <strong>Property type<\/strong> dropdown in the filter bar lists the<br \/>\nvalues your catalogue actually contains.<\/p>\n<p><strong><code>city<\/code><\/strong> accepts either the raw Esti spelling (<code>Bia\u0142ystok<\/code>) or its slug (<code>bialystok<\/code>); both resolve to the same<br \/>\noffers. An unknown city matches nothing rather than everything.<\/p>\n<p><strong><code>agent<\/code><\/strong> is matched by ID when it is numeric and by name otherwise. The ID is the stable one \u2014 names change.<\/p>\n<p><strong><code>columns<\/code><\/strong> is capped at 6. The grid collapses to two columns below 980px and to one below 600px, so a <code>columns=\"4\"<\/code><br \/>\nlist is still readable on a phone.<\/p>\n<p><strong><code>more<\/code><\/strong> builds its link from the attributes in play, so a block filtered to Bia\u0142ystok links to the archive already<br \/>\nfiltered to Bia\u0142ystok.<\/p>\n<h2>How attributes and visitor filters interact<\/h2>\n<p>Attributes are <strong>defaults<\/strong>. When the same parameter arrives in the URL \u2014 because a visitor used a filter bar, or<br \/>\nfollowed a pre-filtered link \u2014 the URL wins:<\/p>\n<pre><code>[osfec_offers city=\"Bia\u0142ystok\" filters=\"yes\"]\n\n\/landing-page\/                    \u2192 offers in Bia\u0142ystok\n\/landing-page\/?city=suprasl       \u2192 offers in Supra\u015bl<\/code><\/pre>\n<p>This applies to <code>type<\/code>, <code>city<\/code>, <code>transaction<\/code>, <code>agent<\/code> and <code>sort<\/code>. <code>limit<\/code>, <code>columns<\/code>, <code>filters<\/code> and <code>more<\/code> are never<br \/>\noverridden by the URL.<\/p>\n<h2>URL parameters<\/h2>\n<p>The archive, and any list rendered with <code>filters=\"yes\"<\/code>, filter through plain GET parameters. Ordinary parameters, on<br \/>\npurpose: results stay linkable, bookmarkable, cacheable and indexable, and the browser&#8217;s back button works.<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Values<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>type<\/code><\/td>\n<td>type slug<\/td>\n<td><code>?type=dzialka<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>city<\/code><\/td>\n<td>city name or slug<\/td>\n<td><code>?city=bialystok<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>transaction<\/code><\/td>\n<td><code>sale<\/code>, <code>rent<\/code>, <code>purchase<\/code>, <code>lease<\/code><\/td>\n<td><code>?transaction=sale<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>agent<\/code><\/td>\n<td>agent ID or name<\/td>\n<td><code>?agent=42<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>price_min<\/code> \/ <code>price_max<\/code><\/td>\n<td>number<\/td>\n<td><code>?price_min=200000&amp;price_max=500000<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>area_min<\/code> \/ <code>area_max<\/code><\/td>\n<td>number<\/td>\n<td><code>?area_min=40<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>rooms<\/code><\/td>\n<td>number (exact match)<\/td>\n<td><code>?rooms=3<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>sort<\/code><\/td>\n<td><code>date<\/code>, <code>price_asc<\/code>, <code>price_desc<\/code>, <code>area_asc<\/code>, <code>area_desc<\/code><\/td>\n<td><code>?sort=price_asc<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Combine them freely; every criterion must match:<\/p>\n<pre><code>\/offers\/?type=mieszkanie&amp;city=bialystok&amp;price_max=600000&amp;sort=price_asc<\/code><\/pre>\n<p>Rules worth knowing:<\/p>\n<ul>\n<li>Anything not on this list is ignored.<\/li>\n<li>Numbers tolerate spaces and a comma as the decimal separator, and are read as positive values.<\/li>\n<li><code>rooms<\/code> is an exact match, not a minimum.<\/li>\n<li>An unrecognised <code>sort<\/code> value falls back to newest first.<\/li>\n<li>A parameter whose control is hidden in <strong>Settings \u2192 Archive filters<\/strong> still works in the URL. Hiding a control does<br \/>\nnot disable the filter.<\/li>\n<li>Whether a hidden filter shows up in the form of a shortcode-rendered filter bar depends on the same setting, so a link<br \/>\nis the way to apply it.<\/li>\n<\/ul>\n<h2>Where the values come from<\/h2>\n<p>Type and city values are <strong>data from Esti<\/strong>, not interface text, so they stay in the original language \u2014 usually Polish.<br \/>\nThe dropdowns in the filter bar are the authoritative list of what your catalogue contains; they are rebuilt from the<br \/>\nimported offers and refreshed within six hours of a change.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Shortcode and block reference The [osfec_offers] shortcode and the Offers block render through exactly the same code, so they accept the same options and always produce\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_latwm_translated_slug":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-22","post","type-post","status-publish","format-standard","hentry","category-esti-to-wordpress"],"_links":{"self":[{"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":1,"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/posts\/22\/revisions"}],"predecessor-version":[{"id":48,"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/posts\/22\/revisions\/48"}],"wp:attachment":[{"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/media?parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/categories?post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.latw.ai\/pl\/wp-json\/wp\/v2\/tags?post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}