kieranbarnes Independent PHP, WordPress & CubeCart Programmer

Chicks dig blokes with groovy login screens

Posted on May 10, 2011

Or how to customise your WordPress login page.

There are three main features you may want to customise on your WordPress login page, whether it's a finishing touch on a client site, a complete rebrand of WP or just cos you're bored.

  1. CSS colors, font size etc
  2. Logo
  3. Logo link

How to remove the favorite actions menu in WordPress admin

Posted on May 9, 2011

Open your functions.php and hook in filter onto favorite_actions and return an empty array.

  1. function remove_favorite_actions() {
  2. return array();
  3. }
  4. add_filter( 'favorite_actions', 'remove_favorite_actions' );
Filed under: PHP, WordPress No Comments

Change “Howdy” text in WordPress admin

Posted on May 8, 2011

The "Howdy admin" text can some times come across a little unprofessional in some WordPress installs. Especially when you are taking the time to rebrand/customise it as a CMS solution. Edit your theme's functions.php and hook in.

  1. add_filter('admin_user_info_links','howdy_msg');
  2. function howdy_msg($links) {
  3. $links['5'] = str_replace('Howdy','Logged in as', $links['5']);
  4. return $links;
  5. }
Tagged as: No Comments

[Snippet] Formatting a currency string

Posted on May 5, 2011

The Shopp ecommerce plugin for WordPress has a little annoying "feature" that returns the product price as a string pre-formatted for your region and currency.

I needed to do some maths on the string value, so some hacking was required to remove all the  non-alphanumeric-but-not-decimal-points.

Shopp Alternative Google Base Feed

Posted on May 5, 2011

So you're running a Shopp, you're going to need a Google Base Feed to stand a chance of attracting traffic.

I got upset at the amount of hacking required to make the Google Base feed (/shop/feed) work correctly.

Google constantly change the requirements for the products feed and it doesn't seem possible to nicely modify the built in RSS feed for Google.

SEO Title Tags for Shopp

Posted on April 5, 2011

Shopp's default title tags are fine, but get down to some hard core SEO tuning, they simply don't cut it.

Here's some code I lifted and modified from the Shopp forums to make the title tags SEO friendly.

See http://forums.shopplugin.net/topic/customizing-catalog-page-titles-please-help for more info.

I heart MDB2

Posted on March 30, 2011

I recently started a project for a customer, if it's CubeCart, WordPress or BackPress based, its a fairly good bet I'll be using ADOdb - but not any more! I though I'd try PEAR's MDB2. Its just another database abstraction library, but takes a slightly different approach to live. I quite like it.

Installing nginx & PHP-FPM securely on CentOS

Posted on March 9, 2011

I won't go into the reasons why you should install nginx, if you're here, you've already decided.
Here's how I installed nginx and PHP-FPM on CentOS.

“sh: -t: command not found” with PHP cron/command line

Posted on March 8, 2011

Are you getting "sh: -t: command not found" when running a PHP from cron or command line? This usually occurs when your accessing PHP's mail() function with no (compatible) mail server installed on the server.

Here's my CentOS based solution.

Tagged as: Continue reading

[Snippet] Shopp Carousels & Slideshows

Posted on March 7, 2011

Carousels & Slideshows in Shopp can be a little tricky, the documentation isn't 100%.

  1. <?php
  2. shopp('catalog', 'onsale-products', 'load=true');
  3. shopp('category','carousel', 'duration=0&fit=all&imageheight=200&imagewidth=320');
  4. shopp('catalog','category','reset=true');
  5. ?>

or

  1. <?php
  2. shopp('catalog', 'featured-products', 'load=true');
  3. shopp('category','carousel', 'duration=0&fit=all&imageheight=200&imagewidth=320');
  4. shopp('catalog','category','reset=true');
  5. ?>
Filed under: PHP, WordPress 7 Comments
Page 3 of 1012345...10...Last »