Title: Simple Permalink
Author: Jason
Published: <strong>2012 年 5 月 29 日</strong>
Last modified: 2013 年 4 月 19 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/theme-blvd-simple-permalink.svg)

# Simple Permalink

 由 [Jason](https://profiles.wordpress.org/themeblvd/) 開發

[下載](https://downloads.wordpress.org/plugin/theme-blvd-simple-permalink.1.0.1.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/theme-blvd-simple-permalink/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/theme-blvd-simple-permalink/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/theme-blvd-simple-permalink/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/theme-blvd-simple-permalink/#developers)

 [技術支援](https://wordpress.org/support/plugin/theme-blvd-simple-permalink/)

## 外掛說明

This plugin retrieves the permalink URL for a page or post based on the ID with 
the shortcode [permalink].

#### What’s the point of this plugin?

In creating my own sites with WordPress, I started noticing that I like to link 
to articles within other articles. Then I’m always changing my mind about stuff,
messing around with page/post slugs, and screwing with my permalinks. It’s very 
annoying to then have to go back and change links wherever I placed them.

This plugin is pretty simple. It just retrieves the URL of a page or post based 
on WordPress’s unique, numerical ID for it, which never changes. For me personally,
using the [permalink] shortcode every time I link to another page or post within
my site makes life easier because I don’t have to worry about the URL changing. 
Also, when I move my site from my local dev server to the live web server, I don’t
have to worry about any of these links.

Anyways, I thought what the heck, why not share? — I keep pasting this code snippet
in all my personal website themes anyway.

However, keep in mind this plugin will be more useful for people like me who are
always working under the HTML tab when editing pages and posts. If you’re looking
for a similar shortcode that constructs the entire HTML link for you, check out 
[this plugin](http://justintadlock.com/archives/2008/09/19/get-permalink-wordpress-plugin)
by Justin Tadlock.

#### Usage Examples

Since all this plugin does is retrieve the URL to the post or page, you need to 
format a standard HTML link in whatever way you normally would. Then, instead manually
writing in the post or page’s URL, you retrieve it with the [permalink] shortcode.
Inside, you reference the WordPress’s numeric ID for the post or page.

    ```
    <a href="[permalink id="123"]">Your Text</a>

    <a href="[permalink id="123"]" title="Your Link Title">Your Text</a>

    <a href="[permalink id="123"]#some_section_of_page">Your Text</a>
    ```

#### Extended Usage Examples

In v1.0.1, I added the optional feature to allow you to use a page’s slug to reference
the permalink you’re trying to retrieve.

    ```
    <a href="[permalink slug="your-page"]">Your Text</a>
    ```

If you’re referencing anything other than a page, you need to specify the post type
with the optional “post_type” parameter.

    ```
    <a href="[permalink slug="your-post" post_type="post"]">Your Text</a>
    ```

**If you can use the Post ID, it will consume less resources on your server to retrieve
the permalinks that way.**

So why use the slug at all? Why not just always use the ID? Well personally, I added
this in for myself. When I setup demo websites for my WordPress themes, I’m always
importing many of the same pages that innerlink with eachother. As you know, when
importing pages and posts between different websites, ID’s will generally change.
By using this shortcode and referencing page/post slugs, I can keep URL’s intact
when I’m importing/exporting pages to different websites.

## 安裝方式

 1. Upload `theme-blvd-simple-permalink` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Retrieve the URL to a page or post with its respective numeric ID like this: `[
    permalink id="123"]`

## 使用者評論

![](https://secure.gravatar.com/avatar/389e1a46cb862edd2ce6cc820fcf7350fa1a99d0f1cca984d403b425080e844d?
s=60&d=retro&r=g)

### 󠀁[WORK](https://wordpress.org/support/topic/work-17/)󠁿

 [Adam Pery](https://profiles.wordpress.org/adam1920/) 2017 年 2 月 7 日

nice usefull plugin

 [ 閱讀全部 2 則使用者評論 ](https://wordpress.org/support/plugin/theme-blvd-simple-permalink/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈Simple Permalink〉的開發相關工作。

參與者

 *   [ Jason ](https://profiles.wordpress.org/themeblvd/)

[將〈Simple Permalink〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/theme-blvd-simple-permalink)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/theme-blvd-simple-permalink/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/theme-blvd-simple-permalink/)，
或透過 [RSS](https://plugins.trac.wordpress.org/log/theme-blvd-simple-permalink/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/theme-blvd-simple-permalink/)。

## 變更記錄

#### 1.0.1

 * Added optional feature to get permalink based on slug and post type, opposed 
   to using the post ID.

#### 1.0.0

 * This is the first release.

## 中繼資料

 *  版本 **1.0.1**
 *  最後更新 **13 年前**
 *  啟用安裝數 **30+**
 *  WordPress 版本需求 ** 3.0 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/theme-blvd-simple-permalink/)
 * 標籤:
 * [permalink](https://tw.wordpress.org/plugins/tags/permalink/)[themeblvd](https://tw.wordpress.org/plugins/tags/themeblvd/)
   [url](https://tw.wordpress.org/plugins/tags/url/)
 *  [進階檢視](https://tw.wordpress.org/plugins/theme-blvd-simple-permalink/advanced/)

## 評分

 5 星，滿分為 5 星

 *  [  1 個 5 星使用者評論     ](https://wordpress.org/support/plugin/theme-blvd-simple-permalink/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/theme-blvd-simple-permalink/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/theme-blvd-simple-permalink/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/theme-blvd-simple-permalink/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/theme-blvd-simple-permalink/reviews/?filter=1)

[撰寫評分](https://wordpress.org/support/plugin/theme-blvd-simple-permalink/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/theme-blvd-simple-permalink/reviews/)

## 參與者

 *   [ Jason ](https://profiles.wordpress.org/themeblvd/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/theme-blvd-simple-permalink/)