Gordonmac Dot Com

Mostly a web development blog

Posts Tagged ‘Wordpress’

WordPress_blue_logo.svg

WordPress – Custom taxonomy navigation menus

Posted: June 22nd, 2012 | Tags: | Posted in: Tutorials, Wordpress

The product of today’s messing around with WordPress custom taxonomies in a bid to finish a client website – I needed to  generate a navigation based on categories stored in a custom taxonomy. Here’s the gist of it: function displayTaxonomyNav($taxonomy, $baseURL) { $output = NULL; $rangeNames = get_terms($taxonomy, ‘orderby=id&hide_empty=0’); foreach($rangeNames …
Read more…

WordPress_blue_logo.svg

Displaying recent posts in the WordPress sidebar

Posted: November 14th, 2011 | Tags: | Posted in: PHP, Tutorials, Wordpress

To add recent posts navigation to your WordPress blog, simple add the following code to sidebar.php. <h2>Recent Posts</h2> <nav id=”navigation-recent”> <ul> <?php $recent_posts = wp_get_recent_posts(5); foreach( $recent_posts as $recent ){ $date = date(“M d, Y”,strtotime($recent[“post_date”])); echo ‘<li><a href=”‘ . get_permalink($recent[“ID”]) . ‘” title=”Look ‘.$recent[“post_title”].'” >’ . $recent[“post_title”].'</a> ‘.$date.'</li>’; …
Read more…

WordPress_blue_logo.svg

Customising the WordPress admin area

Posted: August 23rd, 2011 | Tags: | Posted in: PHP, Tutorials, Wordpress

If you would like to customise your WordPress admin pages these functions are an excellent start. In this little tutorial we’ll look at customising the WordPress logo in the WordPress admin area, editing the WordPress admin footer to include your own company name and also customising the “Howdy” …
Read more…