18 May
2012

New links section with the help of WordPress – do shortcode!

I had a little spare time tonight so I made a nice little ‘links’ section on my new website. I wanted to be able to manage this easily so it made sense to try and incorporate the WordPress install I already had set up.

I used the WordPress links capabilities along with a plugin called Link Library http://wordpress.org/extend/plugins/link-library/. This plugin is highly customisable and well worth a look if you have a similar need.

I did not want the page that displays the links to have the bulk of WordPress in the background so I just required the core WordPress file as follows. I have found with a few recent WordPress projects that these sites have really started to chug along!

{code type=php}
// At the top of the page
require($_SERVER[‘DOCUMENT_ROOT’].’/blog/wp-load.php’);

// Then at the point you want the links to display
echo do_shortcode(/* shortcode to disply plugin */);
{/code}

I could not believe how easy it was! I had to add some styles and with this only taking a few hours in all I was well happy with the result. So thats blog post number 2 completed and it even had some code in it, go on lad!

So, what do you think?

*