

{"id":2552,"date":"2019-02-28T14:28:52","date_gmt":"2019-02-28T13:28:52","guid":{"rendered":"https:\/\/codeermeneer.nl\/?p=2552"},"modified":"2019-02-28T14:28:52","modified_gmt":"2019-02-28T13:28:52","slug":"how-to-use-the-shortcode-in-companion-sitemap-generator","status":"publish","type":"post","link":"https:\/\/wijzijnqreative.nl\/web\/documentation\/how-to-use-the-shortcode-in-companion-sitemap-generator\/","title":{"rendered":"How to use the shortcode in Companion Sitemap Generator"},"content":{"rendered":"\n<p class=\"has-medium-font-size\">Since version 3.7 we&#8217;ve introduced a block for the new <strong>gutenberg<\/strong> editor that comes with WordPress since version 5.0. While we will continue to update this block with more features and thus recommend this block over the shortcode we will not drop the shortcode.<\/p>\n\n\n\n<p>But, we will remove the shortcode generator from the plugin in a future update. Instead, we&#8217;ll explain how to use the shortcode on this page.<\/p>\n\n\n\n<p>[show_ads]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Use the basic version<\/h2>\n\n\n\n<p>The basic shortcode will load the the sitemap with default settings. (1 column, orderby date (ASC) ).<\/p>\n\n\n\n<pre class=\"wp-block-code shortcode\"><code>html-sitemap<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Double columns<\/h2>\n\n\n\n<p>With the shortcode you can display two columns (the gutenberg block offers up to four). This can be done by using the columns=&#8221;2&#8243; argument.<\/p>\n\n\n\n<pre class=\"wp-block-code shortcode\"><code>html-sitemap columns=\"2\"<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Order by title instead of by date<\/h2>\n\n\n\n<p>By default the shortcode orders by date, but you can change this to title using the orderby=&#8221;name&#8221; argument.<\/p>\n\n\n\n<pre class=\"wp-block-code shortcode\"><code>html-sitemap orderby=\"name\"<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Changing the order<\/h2>\n\n\n\n<p>You can invert the sorting order by using the sort=&#8221;desc&#8221; argument.<\/p>\n\n\n\n<pre class=\"wp-block-code shortcode\"><code>html-sitemap sort=\"desc\"<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Limits<\/h2>\n\n\n\n<p>You can limit the number of posts to display per block. (-1 for all posts)<\/p>\n\n\n\n<pre class=\"wp-block-code shortcode\"><code>html-sitemap limit=\"100\"<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">The full shortcode<\/h2>\n\n\n\n<p>The full shortcode with all arguments is as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code shortcode\"><code>html-sitemap columns=\"2\" orderby=\"name\" sort=\"desc\" limit=\"100\"<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Since version 3.7 we&#8217;ve introduced a block for the new gutenberg editor that comes with WordPress since version 5.0. While we will continue to update this block with more features and thus recommend this block over the shortcode we will not drop the shortcode. But, we will remove the shortcode generator from the plugin in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":714,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,32],"tags":[],"class_list":["post-2552","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-documentation","category-sitemap-generator"],"_links":{"self":[{"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/posts\/2552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/comments?post=2552"}],"version-history":[{"count":0,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/posts\/2552\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/media\/714"}],"wp:attachment":[{"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/media?parent=2552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/categories?post=2552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/tags?post=2552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}