How to override the comments form in a child theme

This is a quick post on how to provide your own comments template in your child theme ( overriding comments.php in your parent theme). You can just as easily use the same code to override comments.php if you aren’t using a child theme. Todo this you need to you need to use the filter ‘comments_template’ … Read more

How to engage your staff using your Intranet

In this article, we’ll look at some ideas for useful things to have on your intranet and how to use these to help engage your Employees, members or Volunteers. What are the benefits of engaged staff ? Happy workforce ( productive workforce, helps business be more profitable) Low Staff turnover ( saves money in recruitment … Read more

Buddypress how to remove tabs from groups sub tabs ( eg remove Delete group)

This code is based on a post from the buddypress forums tested on Buddypress 2.9.2  ( forum states its compatible from BP 2.6+). In this example we remove the Delete tab and also permission so that user can’t try and goto the url to access it. Note there are numerous other examples / versions of … Read more

WordPress SQL snippets

A place to keep snippets of useful WordPress SQL. Do a select based on some meta field of a post ( i.e. search for a post that has a particular metafield  ) SELECT p.ID,p.post_title, MAX(CASE WHEN pm1.meta_key = ‘id_vim_node’ then pm1.meta_value ELSE NULL END) as field_i_want FROM wp_posts p LEFT JOIN wp_postmeta pm1 ON ( … Read more

How to add a form to a shortcode in WordPress (using PHP and Ajax)

Recently I needed to develop a Shortcode that would display a form, this blog post details what I did. I used Ajax ( which seems the best way to add forms to shortcodes, but I’d welcome any input from other developers on your approach). So without further ado lets get on with adding a form to … Read more