News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Standards-compliant Link Targets with Wordpress
December 19, 2007 @ 11:15:00

A new tutorial on DevShed today shows how to work with WordPress (a popular PHP-based blogging tool) to improve the search engine optimization (SEO) of the site you have running it.

I ran into an issue on one of my own Wordpress sites the other day, so I decided to share with you my solution. What happened was I added an SEO modification to my site that finds all external links in my page and adds a rel="nofollow" attribute to them. However, I also like to target my external links to new windows, but the target attribute for the "a" tag has been depreciated and will not validate under XHTML strict.

His method of choice turned out to be a Javascript that would run through the links, looking for outbound ones, and dynamically add in the nofollow attribute when it finds one. Complete code is included ot show you how it's done.

0 comments voice your opinion now!
wordpress standards compliant link seo nofollow wordpress standards compliant link seo nofollow


blog comments powered by Disqus

Similar Posts

Michelangelo van Dam's Blog: Quality Assurance on PHP projects - PHP_CodeSniffer

CatsWhoCode.com: 8 useful code snippets to get started with WordPress 3.0

NetTuts.com: How To Display Post Meta Data on a WordPress Post

Sandro Groganz's Blog: Useful Extensions for WordPress and MediaWiki

Developer Tutorials Blog: Working With Wordpress Offline Like a Pro


Community Events

Don't see your event here?
Let us know!


symfony podcast series framework interview laravel5 laravel community introduction api security voicesoftheelephpant extension library language version threedevsandamaybe unittest opinion release

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework