Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Talk:Using Permalinks

So... now I know how to use permalinks, but what the heck are they? Some kind of introductory information should be included (especially since this is linked from the Main Page). Introduction to Blogging#Pretty Permalinks. --MDAWaffe 22:00, 6 Feb 2005 (GMT)


Go ahead and edit fearlessly,if you'd like to, or tag the page as a stub, or as requiring copyediting, so someone can later :)

Carthik 22:05, 6 Feb 2005 (GMT)

Yeah, I know :) Just don't have time at the moment. Sort of a note to self and/or some willing soul. --MDAWaffe 22:10, 6 Feb 2005 (GMT)

Done --MacManX

*Sound of heavenly chorus* MacManX to the rescue. I was just coming back to look at this. Thanks. --MDAWaffe 06:20, 7 Feb 2005 (GMT)
No prob, glad to help. --MacManX

2005.05.11 11:48 (GMT+2)

re "Fixing Permalink Problems"

Would it be an idea to add something like "If you don't see the .htaccess file, you should add one, simply by touch .htaccess " ... as that solved my (simple) problem ;-) Please don't ask me to enter it myself, as I'm too new on this :-o --Thehammer

Done!, Thehammer, you should really be bold, and start editing pages on the Codex. Read Codex:Contributing to see how to start contributing :)

Carthik ‹ ℂ › Talk 14:35, 11 May 2005 (UTC)

%category%

The %category% placeholder doesn't work in the latest version I downloaded, is this in the development branch or something? I hope so anyway, it's non-availaiblity is preventing me from using WordPress to replace MT. --Dahamsta 12:57, 8 Feb 2005 (GMT)

http://wordpress.org/support/topic.php?id=22883 should answer it for you. Category is a keyword that is used for the category archives, unless you use, say "cats" as the category placeholder... always update .htaccess with the new rules before using the new rules.
Carthik 15:00, 8 Feb 2005 (GMT)
There is a month long bug report discussion on this at http://mosquito.wordpress.org/view.php?id=889 and it is implying that the use of %category% doesn't work across the board. Has this been fixed or is it still questionable? If so, we need to make a mention right in the description of the this element.
We also desperately need more specific examples such as %x%/%y%/%z% will reproduce example.com/cat1/subcat2/article-title-that-explains-something for at least three of the different arrangements that can be made of these. I know there is stuff in Pretty Permalinks, but examples of use need to be here. Lorelle 01:19, 24 Mar 2005 (UTC)
With respect to %category% not working in Apache 1.x, we got it working for 3 levels of category hierarchy by manually editing .htaccess and replacing the regexp where category would appear, namely (.+) with ([0-9a-zA-Z\-]+/?[0-9a-zA-Z\-]*/?[0-9a-zA-Z\-]*)... which works great for the blog I'm working on: our category hierarchy doesn't go over 3 level deep. However, for some reason, when generating pages, wordpress won't add the category name to the permalink, unless the post is in more than one category... strange huh? I'm using 1.5.1. Glutnix 05:37, 12 May 2005 (UTC)

In paragraph about using %category%, there is a reference that says "(see manage categories)" but no link or anything. Did this get missed? Please add the link or clarify the reference. Thanks! Lorelle 18:54, 25 Mar 2005 (UTC)


User Dbabbage 14:59, 13 Feb 2005 (GMT) Clarified information about where .htaccess file should be located relative to WordPress files. Extended note about editing .htaccess via control panel.

Must but Should Not chmod?

Hello, fairly non-technical user here, new to Codex but long time Wikipedian (if that holds any weight - hey, at least I know how to edit the Codex just fine)...

I was interested in changing my links from the p=123 style to the verbose permalinks. But I find this sentence terribly offputting:

" You must chmod the .htaccess file to 666 to edit it with the WordPress template editor, but this is not recommended, since if you do that, any user of your blog, who can edit templates will be able to edit it. You can change the permissions to 660 to make it server-writable, which again will have the same limitation." (My emphasis).

To me there's a terrible tension between being told I must do something to achieve my goal and then being told but it would be a terrible idea to do it. What am I missing? --Bodnotbod 21:00, 20 Sep 2005 (GMT)

The fact that anyone can add anything here and some things get missed. ;-) We'll clean this up. Thanks for bringing this to our attention. Lorelle 03:55, 21 Sep 2005 (GMT)
  • The page still says - " 1. Change File Permissions: You must chmod the .htaccess file to 666 to edit it with the WordPress template editor, but this is not recommended, since if you do that, any user of your blog, who can edit templates will be able to edit it. You can change the permissions to 660 to make it server-writable, which again will have the same limitation."
As such I still don't want to change my file permissions, because I am still under the impression that doing so allows the rest of the world the same rights to edit my blog layout as I do. Can they or can't they? It seems ludicrous that they can so I assume the page is wrong. But then this is suppsoed to be my guide to using Wordpress and that's what it says. All my searches on this matter don't seem to come with strong warnings about this, as I presume they would, however, I've yet to read that the above bolded statement is wrong.
Can I change them safely or not? I know - technically - how to do it, I just want to know if it's safe. --Bodnotbod 01:09, 28 Sep 2005 (GMT)

Change them, set up your permalinks, change them back. Done. Lorelle 03:14, 28 Sep 2005 (GMT)

I don't agree with deleting the tip on ending with an html extension. I agree that it are not html pages, but that was not the point. It's point was to have pages that look like they are html. Many people choose to have pages ending in html, so it's a useful tip. The wording can be changed to more accurately describe what is going on instead of deleting the whole piece. Other opinions on this are welcome.

Month names?

Has anyone seen anything (or is there demand for) the ability to use a month name as part of their permalink structure, instead of its number? I remember MovableType having the ability to generate URLs of the form
/blog/2005/december/31/postname/
...which I liked. Since the current tag is called %monthnum%, I had expected there to be a corresponding %monthname% or simply %month% tag too. Has this feature ever been proposed for WordPress? --Rufous 14:30, 4 Jan 2006 (GMT)

Question

Aagh! I've update my permalink option in the dashboard, and updated my .htaccess file. So how do I get the permalinks on my posts?!? The slug is there, but when I post, I only get the categories and a link for commenting. Where do I tell WP to provide a permalink.??

Help! email@tonyfleming.org

User:Tfleming you might want to ask that question at the WordPress Support Forum.
MichaelH (talk) 20:39, 10 Jan 2006 (GMT)

Pages and Categories permalinks

I have tried implementing Permalinks on my site using the "Without mod_rewrite" instructions on IIS.

Unfortunately I can only get it going for the Posts. The Pages and Categories on my site still does not work using the two cgi.* directives in php.ini

Has anyone managed to successfully implement Pages and Categories permalinks using this method?

Anchor

Something that appears to be lacking and sorely needed is a way to designate links as "anchors" (aka "bookmarks") instead of hard links. When I give out the "permalink" to a blog entry, clinking on it shows that one entry and nothing else. The visitor must click on the Home link to view the other posts.

Unless I am missing something, there does not appear to be a "built in" way to link to a specific post further down the page (rather than on a page by itself). Currently, I'm embedding HTML "<a name=" links in my blog enties to circumvent this limitation, but it would be nice to see it integrated into the next Wordpress update.

User:Mugsy December 8 2007


Adding html can provide benefits...

The Tips & Tricks section claims that adding .html to the end of permalinks provides no benefits. I disagree, while the SEO benefits of .html are diminished, it can help with making inbound links themselves canonical (though WordPress 301's them later... it still helps to get them right the first time). In addition, it can help for archival purposes.

Read here for more details. I'd like your input though before I edit the page.

FrontPage and WordPress - Permalinks and .htaccess issues

There is a fix for this problem in the article from May 2006. Does anyone know if this is still a problem with WordPress v 2.3, and if so, does the fix still solve the problem? (I'm adding a Wordpress blog to a FrontPage 2000 built domain site). Thanks. M

Structure Tags

Under %postname%

Starting Permalinks with %postname% is strongly not recommended for performance reasons.. *** Note - this has been changed and is ok to do since ver. 2.0

Since ver 2.0?? Can this be confirmed or corrected as it's likely to cause some confusion?

Esmi 21:43, 9 February 2010 (UTC)

Structure Tags - again

Re: http://core.trac.wordpress.org/ticket/9466

Strikethrough/del added to %tag%

Esmi 21:46, 9 February 2010 (UTC)