Archive for the ‘Wordpress’ category

Welcome email editor temporarily unavailable (Update: Back in business!)

May 8th, 2013

Just a quick note to say that my Welcome Email Editor plugin for WordPress has been temporarily withdrawn from the WordPress plugin directory. I need to remove the password reminder feature but otherwise it’s working fine.

I am actually on holiday in France until the 14th but when I get home I will make the small functionality change and resubmit it to the directory. I will also find some time in the near future to improve the interface and add to the functionality.

Watch this space!

UPDATE: We’re back in business…!!

SB Content Widget – WordPress plugin

April 29th, 2013

Another quick one from me today. I have written a widget for WordPress that simply allows you to output the content of a specific page (or the current one). Sometimes your design needs you to show page content in an area otherwise designed for different things, this allows you to do that. The widget has optional title with [post_title] shortcode hook and a Page ID option which, when left blank, will use the current page. I refer to Pages but this can be used for posts or custom post type items too.

Grab it here

SB Content Widget (923 bytes)

SB Add WooCommerce Tabs – WordPress Plugin

March 30th, 2013

You have been asking for this so I wrote it for you. This plugin is a very simply way of adding a WYSIWYG controlled tab to your WooCommerce products. It does the legwork for you and all you need to do it edit 1 line in the plugin file to set the tab name and to determine how many tabs you want. I have even provided examples for you in the code.

I might eventually add a little admin system to this but for now you get the following:

$sb_awt_tabs = array(
    'New Tab 1'=>50
    , 'New Tab 2'=>60
    // , 'New Tab 3'=>50
    // , 'New Tab 4'=>50
);

You wil note two tabs are uncommented and two are commented. Simply change the part at the start for the name and the second part is the priority. Very simply put the higher the number the further right in your tab list it will be. If you need more than 4 tabs then simply duplicate a line as normal.

Once you activate the plugin you will notice a new Tiny MCE editor at the bottom of each edit products page. Simply fill it in if you want the tab to show or leave it blank to hide the tab. Nice and easy!

I should add that if you include any shortcodes in the tab editor then they will be read also.. ie a YouTube video or something.

Download

SB Add WooCommerce Tabs (1.26 kB)

Note

This plugin only works with WooCommerce Version 2 or newer. I have already written another post last year to show you how to add new tabs to older versions.

SB Mini Features WordPress plugin

March 26th, 2013

I was inspired by the wonderful work of the WooThemes team when I saw and subsequently used the various features on the custom home pages that come with their theme work. I noticed that often a theme will create a number of custom post types in order to allow the admin to create a number of objects to be used in a specific point within a theme.

There is a common system called the Mini Feature. This is really a generic name for a small item with thumbnail and intro text to promote a feature or service of the site. We all know that home pages look boring if they match the rest of the site but often if you are trying to dream up a theme or make something yourself inspiration might be hard to come by. These little features break up a page using a shortcode to generate the output for a pre styled grid type view of the items in the post type.

Adding the plugin and activating it will add a new post type and taxonomy for you. When you use the shortcode ‘[sb_mini_feature]‘ it will show the last 6 in 3 column view from all features. I have, however, added support for a number of different argument to the shortcode as follows:

  • limit (default 6)
  • cols (default 3)
  • heading_type (default h2)
  • orderby (default menu_order)
  • cat (default none)

The last is worth talking about. It accepts the slug of an item of the new taxonomy that the plugin creates so you can create a mini feature list for different areas of your site if you wish.

The mini features are, by default, linked to their own item pages which will show the content you enter into the editor part of the feature. However, you might not want this and so I have allowed for a custom link to be used and also for the link to be disabled entirely. It should give enough flexibility for most situations.

The excerpt of the mini feature is shown verbatim if it exists. I have intentionally pulled this directly from the post object so that the excerpt_more filter is not used. This means no read more tag. I can make this optional if anyone feels they want a continue reading link.

Download

SB Mini Features (599.77 kB)

Screenshots

The plugin comes complete with a pre-styled 24 column responsive grid (in my experience 12 is never enough for complex layouts) with unique classnames to avoid conflict but you should be able to override these styles using your theme CSS. Examples of the output of the plugin in various forms are as follows:

 

SB Custom Page Override Menus WordPress Plugin

March 24th, 2013

Ok so a client of mine wanted to be able to override the header menu on certain pages on their site. I created a plugin which did just that.. and more! WordPress uses Theme Locations to define areas in which a menu can be placed. For instance you might define a location called ‘header’ which is placed into the code at the top of the site. This might form the main nav. It’s also common to have a ‘footer’ menu.

My plugin allows you to select from a drop down list which menu should go into those theme locations on a per page basis. So if you wanted to include a different header, footer or wherever it will allow the override.

If you want to include a blank menu where there is normally a menu then simply create an empty Nav Menu in the Appearance->Menus page and use that.

I also have created a couple of Theme Locations as part of the plugin which you can use as either the ‘blank’ menu or as a new custom area for use in the widget for example. You might want to have various pages with menus in a widget in a sidebar. You could simply set the widget to show in a sidebar, set the default menu items (or leave the menu items empty) and thne override on a per page basis oer the rest of the plugin functionality.

Thoughts and comments on this plugin welcome. I shall be using it to facilitate sub-navigation in my themes from now on I think.

Download

SB Custom Page Override Menus (2 kB)

WordPress page header images made easy with SB Uploader

March 22nd, 2013

Screen Shot 2013-03-22 at 11.55.13A couple of years ago I wrote a plugin called SB Uploader. I did this because I didn’t like the media library that WordPress used and wanted to setting the featured image within any WordPress post or page simple. Well after a couple of years of development it is now in use by potentially thousands of people (perhaps a tad self indulgent but it has been downloaded a lot and is bundled with a fair few stock and premium themes) and supports custom post types and taxonomies as well as being able to be added in multiples (several configurable upload boxes per post type).

I use it with practically every theme I write for people and it is by far my most popular plugin yet (alongside SB Welcome Email Editor). I wanted to show people how you would set up configurable header images for pages and maybe posts using the script.

There is a function called sbu_the_wp_image which will return the featured image for the current post item (page or custom post type too). You pass it the size you want it to return (thumb, full or a custom image size) and there you have it. Job done. Just add the code to your page.php file above the call to the_content() (or wherever makes sense in the markup) and it will work.

<?php if (function_exists('sbu_the_wp_image')) { echo sbu_the_wp_image('feature_header'); } ?>

The above code is all you need to call the featured image for the page and the following code should sit in your functions.php file or be configured via a plugin in order to tell WordPress what feature_header actually relates to in terms of image size.

<?php add_image_size('feature_header', 960, 200, true); ?>

It defines the image size, sets the dimension to 960×200 and the ‘true’ portion tells it to hard crop which will guarantee that it is always that dimension by cropping after the initial resize rather than using a proportionate resize and providing an image within those limits.

You can get SB Uploader from the WordPress repository. Any ratings or feedback is welcome as are any feature requests. I hope to be able to write something to better deal with WordPress galleries before long as I am not satisfied with the way they work at the moment. Watch this space!

Selecting the right theme for your WordPress site.

March 21st, 2013

Top-10-Wordpress-Plugins-300x300I spend a great deal of my time writing new themes for people by design. I work closely with graphic designers who make bespoke layouts and imagery for me to work into a WordPress theme. However given the financial climate these days a fair few people are asking for a more cost effective route instead. Over the last few months I have been offering a stock theme option for my clients who want something a bit different on some pages on their site but a generally clean and professional look everywhere else on their site.

So where do you go to find these themes? Well Google of course! If you have ever looked at the WordPress theme repository you will note that the either face is shockingly hard to use to find the theme you want and of course because they are all free the chances of finding X other sites using the same layout is very likely indeed.

Certainly when looking for any type of WordPress addition I head over to google and start to search around a few of the plethora of top X sites listing themes and plugins that have been recommended by that particular author. I find these types of site extremely useful because not only do you get the sales pitch which can be duly ignored but you also get a real persons take on the theme or plugin and its usefulness in their situation.

You will find these sorts of posts exist in many forms including those genre or industry specific. I use these sorts of posts when looking for jQuery plugins (sliders etc) and plugins too. It’s good to know what other people think in these situations. I actually bought a theme called Branded the other day off of the back of one of these recommendations. There is a huge amount of excellent work out there and the cost makes them an absolute steal!

A company of note when choosing themes and plugins would be Woothemes. I actually use their products a lot for my work and although not the most visually original they are clean, professional, usually responsive and has an excellent raft of plugins and companion scripts to make their offering the best I have seen yet.

In recent weeks I have used the likes of Theme Forest also for more unique looking themes for clients that want something a bit different. I actually bought a religious church based theme because I liked the calendar and wanted to use something similar for a client job. I have yet to use the theme itself but have pocketed it for future use!

In conclusion my suggestion if to open your wallet and spend 50-70 dollars on a decent premium theme and you can’t go far wrong. Then someone like myself can step in and provide you with your own unique customisation s meaning you have more in your budget for that custom calendar or ecommerce system you always wanted ;)

How to remove the WooCommerce 2.0+ Reviews tab

March 7th, 2013

woothemes-ninja3On the 6th of March (I think) the lovely guys at WooThemes graced us with a lovely new version of their fantastic WooCommerce plugin. They changed a lot of things, most of which I have yet to absorb. A couple of notable things though caught my eye. You may or may not be aware that I have written a few tutorials concerning the WooCommerce tab system. Adding new ones and, of course, removing the reviews tab. Since 2.0 the product tab API has been updated and is now somewhat slightly more elegant. » Read more: How to remove the WooCommerce 2.0+ Reviews tab