{"id":71914,"date":"2017-07-20T03:56:03","date_gmt":"2017-07-20T03:56:03","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/basic-url-shortcodes\/"},"modified":"2026-08-11T06:54:59","modified_gmt":"2026-08-11T06:54:59","slug":"basic-url-shortcodes","status":"publish","type":"plugin","link":"https:\/\/frp.wordpress.org\/plugins\/basic-url-shortcodes\/","author":15298435,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"4.1.0","stable_tag":"4.1.0","tested":"7.0.4","requires":"4.0","requires_php":"7.0","requires_plugins":null,"header_name":"BASIC URL ShortCodes","header_author":"Vikas Sharma","header_description":"Adds support for a [home_url] and [theme_url_template] shortcodes for use in your post\/page editor.","assets_banners_color":"","last_updated":"2026-08-11 06:54:59","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/basic-url-shortcodes\/","header_author_uri":"https:\/\/profiles.wordpress.org\/devikas301","rating":5,"author_block_rating":0,"active_installs":4000,"downloads":14754,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"4.0":{"tag":"4.0","author":"devikas301","date":"2022-02-26 19:00:14"},"4.0.1":{"tag":"4.0.1","author":"devikas301","date":"2024-10-06 16:41:27"},"4.0.2":{"tag":"4.0.2","author":"devikas301","date":"2026-08-11 06:48:26"},"4.1.0":{"tag":"4.1.0","author":"devikas301","date":"2026-08-11 06:54:59"}},"upgrade_notice":{"4.1.0":"<p>Adds nine new URL shortcodes plus <code>path<\/code> and <code>esc<\/code> attributes. Existing shortcodes are unchanged.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":2},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["4.0","4.0.1","4.0.2","4.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3641423,"resolution":"1","location":"assets","locale":"","width":640,"height":263},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3641423,"resolution":"2","location":"assets","locale":"","width":788,"height":182}},"screenshots":{"1":"Sample short code use.","2":"Rendered output."}},"plugin_section":[],"plugin_tags":[2662,80,1141,85,538],"plugin_category":[43],"plugin_contributors":[144127],"plugin_business_model":[],"class_list":["post-71914","plugin","type-plugin","status-publish","hentry","plugin_tags-permalink","plugin_tags-shortcode","plugin_tags-theme","plugin_tags-uploads","plugin_tags-url","plugin_category-customization","plugin_contributors-devikas301","plugin_committers-devikas301"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/basic-url-shortcodes.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/basic-url-shortcodes\/assets\/screenshot-1.png?rev=3641423","caption":"Sample short code use."},{"src":"https:\/\/ps.w.org\/basic-url-shortcodes\/assets\/screenshot-2.png?rev=3641423","caption":"Rendered output."}],"raw_content":"<!--section=description-->\n<p>Sometimes you need to display your website's base URL, active theme URL or uploads folder URL directly inside your content editor.<\/p>\n\n<p>Basic URL Shortcodes lets you insert important WordPress URLs using simple shortcodes inside posts, pages and widgets. Every shortcode accepts an optional <code>path<\/code> attribute so you can build a full URL in one go, and the output is escaped for you.<\/p>\n\n<h4>Available Shortcodes<\/h4>\n\n<p><strong>[home_url]<\/strong>\nThe website's home URL, as set in WordPress Settings.\nExample: <code>http:\/\/localhost\/wp-demo<\/code><\/p>\n\n<p><strong>[site_url]<\/strong>\nThe URL where WordPress itself is installed. This differs from <code>[home_url]<\/code> when WordPress lives in a sub-directory.\nExample: <code>http:\/\/localhost\/wp-demo\/wp<\/code><\/p>\n\n<p><strong>[theme_url_template]<\/strong>\nThe URL of the currently active theme. Child themes are supported and return the child directory.\nExample: <code>http:\/\/localhost\/wp-demo\/wp-content\/themes\/mytheme<\/code><\/p>\n\n<p><strong>[parent_theme_url]<\/strong>\nThe URL of the parent theme, even when a child theme is active.\nExample: <code>http:\/\/localhost\/wp-demo\/wp-content\/themes\/parenttheme<\/code><\/p>\n\n<p><strong>[UPLOAD_URL]<\/strong> (also available as <strong>[upload_url]<\/strong>)\nThe base URL of the WordPress uploads directory.\nExample: <code>http:\/\/localhost\/wp-demo\/wp-content\/uploads<\/code><\/p>\n\n<p><strong>[content_url]<\/strong>\nThe URL of the <code>wp-content<\/code> directory.<\/p>\n\n<p><strong>[plugins_url]<\/strong>\nThe URL of the plugins directory.<\/p>\n\n<p><strong>[admin_url]<\/strong>\nThe URL of the WordPress admin area.\nExample: <code>[admin_url path=\"options-general.php\"]<\/code><\/p>\n\n<p><strong>[rest_url]<\/strong>\nThe base URL of the REST API.\nExample: <code>[rest_url path=\"wp\/v2\/posts\"]<\/code><\/p>\n\n<p><strong>[login_url]<\/strong> and <strong>[logout_url]<\/strong>\nLogin and logout URLs, with an optional <code>redirect<\/code> attribute.\nExample: <code>[login_url redirect=\"http:\/\/localhost\/wp-demo\/account\"]<\/code><\/p>\n\n<p><strong>[current_url]<\/strong>\nThe full URL of the page currently being viewed, query string included.<\/p>\n\n<h4>Attributes<\/h4>\n\n<pre><code>path \u2014 appended to the URL. Works on every shortcode except `[login_url]`, `[logout_url]` and `[current_url]`.\n<\/code><\/pre>\n\n<p>Example: <code>[home_url path=\"contact\"]<\/code> outputs <code>http:\/\/localhost\/wp-demo\/contact<\/code><\/p>\n\n<p>For safety, a <code>path<\/code> that starts with a scheme (<code>http:<\/code>), a protocol-relative prefix (<code>\/\/<\/code>) or a backslash is ignored, so a shortcode can never be used to point at another site.<\/p>\n\n<pre><code>esc \u2014 set to `raw` to skip HTML entity encoding when the value is consumed by JavaScript rather than an `href`. Defaults to `html`.\n<\/code><\/pre>\n\n<p>Example: <code>[home_url esc=\"raw\"]<\/code><\/p>\n\n<pre><code>redirect \u2014 where to send the visitor after login or logout. Off-site targets are rejected.\n<\/code><\/pre>\n\n<h4>Prefixed aliases<\/h4>\n\n<p>Short tags such as <code>[home_url]<\/code> are generic and another plugin may already own them. Every shortcode is therefore also registered with a <code>burl_<\/code> prefix \u2014 <code>[burl_home_url]<\/code>, <code>[burl_upload_url]<\/code>, and so on \u2014 which is guaranteed not to clash. If a tag is already taken by another plugin, this plugin leaves it alone rather than overriding it.<\/p>\n\n<p>These shortcodes are useful when building custom layouts, inserting dynamic links or when theme customization options are limited.<\/p>\n\n<p>Lightweight, simple and fully compatible with modern WordPress editors.<\/p>\n\n<h3>License<\/h3>\n\n<p>This plugin uses the GPLv3 license.<\/p>\n\n<!--section=installation-->\n<p>Use WordPress Add New Plugin feature, searching \"BASIC URL ShortCodes\", or download the archive and:<\/p>\n\n<ol>\n<li>Unzip the archive on your computer<\/li>\n<li>Upload <code>basic-url-shortcodes<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Use shortcode &amp; enjoy<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"the%20shortcode%20shows%20as%20plain%20text%20instead%20of%20a%20url\"><h3>The shortcode shows as plain text instead of a URL<\/h3><\/dt>\n<dd><p>Shortcode tags are case sensitive. <code>[UPLOAD_URL]<\/code> and <code>[upload_url]<\/code> both work, but the other tags are lower case only.<\/p>\n\n<p>If a tag still renders literally, another plugin or theme is likely registering the same tag. Use the prefixed alias instead, for example <code>[burl_home_url]<\/code>.<\/p><\/dd>\n<dt id=\"can%20i%20use%20these%20in%20a%20widget%3F\"><h3>Can I use these in a widget?<\/h3><\/dt>\n<dd><p>Yes. The plugin runs shortcodes through classic text widgets. In the block editor, use a Shortcode block.<\/p><\/dd>\n<dt id=\"does%20%60path%60%20accept%20a%20query%20string%3F\"><h3>Does `path` accept a query string?<\/h3><\/dt>\n<dd><p>Yes. <code>[home_url path=\"search?s=hello\"]<\/code> works. Absolute or off-site values are ignored.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>4.1.0<\/h4>\n\n<ul>\n<li>Added <code>[site_url]<\/code>, <code>[parent_theme_url]<\/code>, <code>[content_url]<\/code>, <code>[plugins_url]<\/code>, <code>[admin_url]<\/code>, <code>[rest_url]<\/code>, <code>[login_url]<\/code>, <code>[logout_url]<\/code> and <code>[current_url]<\/code>.<\/li>\n<li>Added a <code>path<\/code> attribute to every URL shortcode, with off-site values rejected.<\/li>\n<li>Added an <code>esc<\/code> attribute for raw (non HTML-encoded) output.<\/li>\n<li>Added <code>[upload_url]<\/code> as a lower-case alias of <code>[UPLOAD_URL]<\/code>.<\/li>\n<li>Added <code>burl_<\/code> prefixed aliases for every shortcode.<\/li>\n<li>Shortcodes are no longer registered if another plugin already owns the tag.<\/li>\n<li>Shortcodes now run inside classic text widgets, as the description claimed.<\/li>\n<li>Fixed the uploads URL not detecting a <code>wp_upload_dir()<\/code> error.<\/li>\n<li>Added the missing licence, text domain and PHP requirement headers.<\/li>\n<li>Renamed internal functions to a <code>ro_burl_<\/code> prefix and removed the closing PHP tag.<\/li>\n<\/ul>\n\n<h4>4.0.2<\/h4>\n\n<ul>\n<li>Maintenance release.<\/li>\n<\/ul>","raw_excerpt":"Simple shortcodes that output essential WordPress URLs inside posts, pages and widgets.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/frp.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/71914","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/frp.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/frp.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/frp.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=71914"}],"author":[{"embeddable":true,"href":"https:\/\/frp.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/devikas301"}],"wp:attachment":[{"href":"https:\/\/frp.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=71914"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/frp.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=71914"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/frp.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=71914"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/frp.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=71914"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/frp.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=71914"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/frp.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=71914"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}