SEO Friendly URL's with PHP
Posted In: PHP, regular expressions
Commentary
Wordpress was not displaying my backslash and the code was not working if you cut and paste directly from the html. I just put in the HTML character entity and now the code should work fine.
Hey, good post. I was stumped on how to remove that last '-'. I find this code a little cleaner, and it also generated slightly cleaner output, IMHO. Punctuation characters are ugly. function news_link_title ($t) { return strtolower ( preg_replace( '/-$/', '', preg_replace ( '/[^a-zA-Z0-9]+/', '-', $t ) ) ); }
Is there any special techniques that can be used to optimize a wordpress blog on my server for SEO. One issue I see is no way to change the title tags on each page, where it seems to take the blog name for the home page. I have several hundred 600+ inbound links. I have pinged Technorati manually and used pingoat as well as pingomatic every time I add a new blog. There is plenty of content, about 30 articles. What else can I do? What else should I do to optimize my blog?
Could make a blog post out of this... 1.Under permalink in the admin panel, add this to structure field: /%postname% 2.In the file /wp-content/themes/default/header.php, you can alter the title tags and meta description tag to display the name of the post 3. Make your title tags SEO friendly, by making it descriptive and including commonly searched words