WordPress: link_before and link_after don't display in wp_list_pages

Have you ever stumbled across the issue where wp_list_pages isn't spitting out the text you define for link_before and link_after? I came across this some time ago: one minute my lovely pipe bars '|' where there, the next they weren't. It…

Snippet: WordPress 3.0 Menus - Add a login / logout link

The new WordPress 3.0 menu system is pretty powerful and provides some very interesting new options for creating menus in WordPress. Previously, I have always used wp_list_pages and a custom Walker class to provide hierarchical menus based on the page structure, but that's a topic…

Spotlight: Wordpress Admin Menu - Remove "Add New" pages or posts link

Back in June I posted about tidying up the WordPress admin dashboard [http://erisds.co.uk/wordpress/snippet-wordpress-admin-tidy-dashboard-widgets-by-role] . Recently I got a comment on that article asking if the admin menu could be altered for different users in a similar way. Here's the question: > Can I lose…

Snippet: Magento - Using OR and LEFT JOIN in addAttributeToFilter

I'm still pretty new to Magento, and am learning more about it every day. I've been trying to learn all I can about internals such as managing collections & recently stumbled on trying to filter a collection by two attributes. I wanted to build a list…

Future of Web Design London 2010: My thoughts two months on...

Technology conferences are fun, an enormous amount of extremely geeky fun. Most folks can't wait to get home and blog about all the wonderful things they've seen, heard and learnt over the duration of the conference. Those reviews are great insights into what works and what…

Getting Rid of Non Breaking Spaces (&nbsp)

Have you ever tried to parse, process or preg_replace some HTML? Ever tried to do it when the HTML is UTF-8 encoded? Getting rid of white space can be tricky, here's a few tricks I've learned. I was playing around with debugging some HTML output…

Snippet: Symfony Forms - Accessing the Object in a Form

Perusing my Google Analytics data shows up some interesting results. For starters the top search query which sends people to my blog is "symfony accessing object in a form". This has been consistent for several months, but there is no article on my blog which answers that question.…

Snippet: Wordpress Admin - Tidy Dashboard Widgets By Role

Recently I worked on a Wordpress site where I wanted to be able to customise the dashboard for different user roles. Wordpress has the default roles [http://codex.wordpress.org/Roles_and_Capabilities] of administrators, editors, authors, contributors and subscribers. It's not too much to assume you might…