[WordPress] 外掛分享: Peter’s Blog URL Shortcodes

首頁外掛目錄 › Peter’s Blog URL Shortcodes
400+
安裝啟用
★★★★★
5/5 分(2 則評價)
3772 天前
最後更新
問題解決
WordPress 2.6+ v0.4 上架:2008-11-19

內容簡介

為 WordPress 2.6 及以上版本新增短代碼 [blogurl]、[posturl]、[templateurl] 和 [childtemplateurl]。使用 [blogurl] 生成網站 URL,參數包括「slash」和「noslash」(用於添加尾斜線,[templateurl] 和 [childtemplateurl] 同樣支援此功能),以及「uploads」(用於生成上傳文件夾的 URL)和「wordpress」(用於生成 WP 文件的 URL)。使用 [posturl id=3](將「3」替換為文章 ID)生成任何文章的永久鏈接。

功能

[blogurl] 將生成http://www.yoursite.com/

[blogurl wordpress] 將生成 WordPress 文件的根目錄的 URL,如果它們與您的站點根目錄不同

[blogurl noslash] 將生成http://www.yoursite.com

[blogurl uploads] 將生成 http://www.yoursite.com/wp-content/uploads/

[blogurl uploads noslash] 將生成 http://www.yoursite.com/wp-content/uploads

[posturl id=375] 將為 ID 為 375 的文章生成正確的永久鏈接;例如,<a href=”[posturl id=375]”>post about this plugin</a> 會生成 post about this plugin

[templateurl] 將生成您的父級佈景主題的根目錄 URL

[childtemplateurl] 將生成您的子佈景主題的根目錄 URL。

要求

WordPress 2.6 或更高版本

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.4) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Peter’s Blog URL Shortcodes」→ 直接安裝(推薦)

原文外掛簡介

Adds shortcodes [blogurl], [posturl], [templateurl], and [childtemplateurl] for WordPress 2.6 and up. Use [blogurl] to generate your site URL. It offers the parameters “slash” and “noslash” (to add a trailing slash; [templateurl] and [childtemplateurl] also support this), as well as “uploads” to produce the URL of the uploads folder and “wordpress” to produce the URL of your WP files. Use [posturl id=3] (replace “3” with a post ID) to generate the permalink for any post.
Features

[blogurl] will generate http://www.yoursite.com/

[blogurl wordpress] will generate the URL to the root of your WordPress files, if they are in a different location than your site root

[blogurl noslash] will generate http://www.yoursite.com

[blogurl uploads] will generate http://www.yoursite.com/wp-content/uploads/

[blogurl uploads noslash] will generate http://www.yoursite.com/wp-content/uploads

[posturl id=375] will generate the correct permalink for the post with an ID of 375; for example, post about this plugin would generate post about this plugin

[templateurl] will generate the URL to your parent theme’s root

[childtemplateurl] will generate the URL to your child theme’s root

Requirements

WordPress 2.6 or higher

延伸相關外掛

文章
Filter
Apply Filters
Mastodon