该插件尚未通过WordPress的最新3个主要版本进行测试。 当与较新版本的WordPress一起使用时,可能不再受到维护或支持,并且可能会存在兼容性问题。

Basic URL ShortCodes

描述

Sometimes you want to put the base URL (that of the blog, or that of the active template) in your content editor. Times when the template customising isn’t quite flexible enough.
With this plugin you can use [home_url] to output the base URL of the blog (as set in your Settings). Or, you can use [theme_url_template] to output the URL of the active template. And You can use the [UPLOAD_URL] to output the URL of the upload folder.

For example <img src="[UPLOAD_URL]/2022/02/test.png /> in your editor might output <img src="http://localhost/wp-demo/wp-content/uploads/2022/02/test.png" /> (if http://localhost/wp-demo is what you have configured as your blog URL in Settings).

The supported short codes are as follows:
* [home_url] – the configured blog URL (set in Settings). E.g. http://localhost/wp-demo
* [theme_url_template] – the URL of the active template. E.g. http://localhost/wp-demo/wp-content/themes/mytheme
* [UPLOAD_URL] – the URL of the upload folder. E.g. http://localhost/wp-demo/wp-content/uploads

License

This plugin uses the GPLv3 license.

屏幕截图

  • Sample short code use.
  • Rendered output.

安装

Use WordPress Add New Plugin feature, searching “BASIC URL ShortCodes”, or download the archive and:

  1. Unzip the archive on your computer
  2. Upload basic-url-shortcodes directory to the /wp-content/plugins/ directory
  3. Activate the plugin through the ‘Plugins’ menu in WordPress
  4. Use shortcode & enjoy

常见问题

There are no FAQs at this time. Feel free to suggest some!

评价

2025 年 2 月 5 日
I’m a developer and hate installing bloat or generally plugins that have 2MB of code to just do one simple thing. This one is just a screen-height of simplicity that just adds the shortcodes it says it does. Perfect 🙂
2019 年 9 月 19 日
Great basic plugin Exactly what I was looking for. Great works for website with any theme. Thanks!
阅读所有2条评价

贡献者及开发者

「Basic URL ShortCodes」是开源软件。 以下人员对此插件做出了贡献。

贡献者