Aug 16, 2005 Nomadig, Technology, WordPress:

Fixing WP links on the front page

I’m on a long vendetta to get Nomadig URLs more search engine friendly — the aim is to replace all URL parameters with a path that has the same information.

When I launched the site, I was too lazy to make a proper link structure for the journal section. That was fixed when I installed WP 1.5 and got the rewrite rules in order.

After I finished the new URL schema for reviews a week ago, the front page requested my attention. I had changed the front page links to reviews, but for some reason most of the links to journal were in form of /journal/index.php?p=….

I was using the guid field from the WordPress database. For most of the posts, it contains a proper URL with year, month, data and the post name with dashes. But for other posts, it had still index.php?p=…

To cut the long story short, I had to add a new function to the front page PHP code to create proper links to the articles, and use that function every single time the front page has a link to journal. Now the links are brilliantly search engine friendly.

Comments

The URI to TrackBack this entry is: http://www.nomadig.com/2005/08/16/fixing-wp-links-on-front-page/trackback

No comments yet.

Leave a comment

The following Textile shortcuts are available:

_emphasis_
*strong*
@code@
^superscript^
~subscript~
+inserted text+

Hyperlink:
"link text":http://link.url

Image:
!http://image.url!

Lists:
* bulleted
# numbered

Hide help

Please be polite and use common sense when posting. Any comment is subject to removal. The e-mail address is required, but it is not shown to anybody else than the administrator.

Commenting uses Textile and your message is previewed below. Show Textile help

Write your comments

 

Preview

1.  — Aug 30 2008