{"id":4992495,"date":"2014-06-09T15:00:40","date_gmt":"2014-06-09T15:00:40","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/shortcodes-using-slug-name-rather-than-id\/"},"modified":"2016-08-21T21:22:37","modified_gmt":"2016-08-21T21:22:37","slug":"shortcodes-using-slug-name-rather-than-id","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/shortcodes-using-slug-name-rather-than-id\/","title":{"rendered":"Shortcodes using slug name rather than ID"},"content":{"rendered":"<p>Hi Johan,<\/p>\n<p>I&#8217;d really love to know if, and when, you would consider adding support for using the slug name in the shortcode, as has been already discussed and requested by a number of users <a href=\"https:\/\/wordpress.org\/support\/topic\/insert-content-block-by-nameslug-using-shortcode\">here<\/a>.<\/p>\n<p>In my first post in that thread, I explained why I believe it would be an important feature and a big advantage to us, to be able to use slug names in the shortcodes &#8211; primarily because when you have multiple Custom post Widget shortcodes in a single page, it&#8217;s impossible to easily identify which shortcode belongs to which block, because they only reference the id number, not the slug.<\/p>\n<p>Therefore, having the shortcodes support either the slug or the id would be a big help to us:<\/p>\n<p>[content_block id=&#8221;my-block-slug-name&#8221;]<\/p>\n<p>As a number of your users have requested this feature, I really hope that you will consider it again and add it in an upcoming version of your plugin! Eliot even already provided the necessary code to do so, in the other thread I&#8217;ve referenced.<\/p>\n<p>Thanks!<\/p>\n<p>https:\/\/wordpress.org\/plugins\/custom-post-widget\/<\/p>\n","protected":false},"template":"","class_list":["post-4992495","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4992495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4992495\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4992495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}