Archive for the ‘wordpress’ Category



Yoast: W3 Total Cache and why you should be using it

So I think I've not said it enough yet: W3 Total Cache is the best caching plugin for WordPress out there at the moment. To illustrate, I've made a short video outlining how I usually set it up (if the video is not working for you, check it out on Youtube):

Click here to view the embedded video.


Hope you enjoy it and make sure to install W3 Total Cache on your site or blog!

W3 Total Cache and why you should be using it is a post from Joost de Valk's Yoast - Tweaking Websites.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on WordPress hosting!

Yoast: WordPress-to-Lead for Salesforce CRM

Lorna Li, an Online Marketing Manager at Salesforce.com reached out to me on a definitive list of must-have WordPress plugins for her green marketing blog and other websites she was working on. During our conversation about the world of WordPress plugins, I thought, wouldn't it be great to have a contact form builder that captures leads and delivers them directly into Salesforce CRM?

At OrangeValley, we're avid users of Salesforce CRM. We tend to use it most for lead tracking, and until a few weeks ago, we had this really weird workflow: we'd let people enter their credentials in web forms, which would then turn into emails, after which we'd copy paste the contents of those emails into Salesforce. So we decided there should be a better way of doing this, thus, WordPress-to-Lead was born.

From Lorna's perspective, WordPress-to-Lead is great contact form solution for all the small business owners who use WordPress as their CMS. WordPress plugin installation and activation is relatively simple, for many low tech people, way simpler than cutting and pasting the right code in the right location, which is the current way you would add a Salesforce integrated web lead form to your site. However, other contact form plugins for WordPress route lead information into your email inbox, where they can get buried, and not to a CRM system, which is a far better way of managing leads and customers. Because the WordPress-to-Lead plugin had the potential to really help their SMB customers, Salesforce.com enthusiastically offered to sponsor the program.

So, we've done it: we've created a new plugin called WordPress-to-Lead for Salesforce CRM, with an awesome array of options to create and modify your lead form and insert it into your posts & pages or even your sidebar.

Want to see it in action? Check out the cool video Lorna made:

Click here to view the embedded video.

If you're still stuck, like we were, getting leads through email and are having issues following up and taking care of those leads correctly, this could very well be the solution you need.

How WordPress-to-Lead works

If you are already a Salesforce CRM user, just follow these easy steps:

  1. Download, install and activate the WordPress-to-Lead for Salesforce CRM plugin (just search for Salesforce in your WordPress Admin Plugin Install panel, or on wordpress.org.
  2. You go into your Salesforce account and find your Salesforce.com Organization ID (you'll find it under: Setup » Company Profile » Company Information). You enter that ID into the WordPress-to-Lead admin panel.
  3. Configure your contact form the way you want it and insert it, either into a post or page with a simple shortcode, or into your sidebar using the widget that comes with the plugin.
  4. You're done. All leads will now flow into your Salesforce.com account.

Not a Salesforce.com Customer?

If you're not a Salesforce CRM user, be sure to register for a free trial of Salesforce.com for WordPress before downloading the WordPress-to-Lead plugin. Salesforce CRM is a great way to:

  • Track all conversations and interactions
  • Organize your contacts and tasks in a single spot
  • Easily synch with Outlook, Gmail, Yahoo!, and more

Trivia

Is this plugin GPL?

Of course it is!

Did you get paid for building this plugin?

Yes.

Will you be maintaining this pluign?

Yes, feel free to leave all your questions in the support forum.

WordPress-to-Lead for Salesforce CRM is a post from Joost de Valk's Yoast - Tweaking Websites.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on WordPress hosting!

Yoast: Gravity Forms (Widget) update

I haven't talked half as much about Gravity Forms as I should. It's still my number one lifesaving plugin, and in the latest release they've done loads and loads of cool things. One of the things I've been meaning to show off is the MailChimp integration. My newsletter is sent out with MailChimp and they've been a sponsor of my blog and newsletter for quite a while now and, well, simply put, I love them. Ow yeah and below I've also got an updated version of the Gravity Forms widget for you, keep on reading!

What happens now is that when you send me an email through my contact form, you've got an option to subscribe to my newsletter, if you check that, you'll receive an opt-in email to subscribe to my newsletter and ta-daa: you're subscribed! Best thing about it? That whole process took about 5 minutes to setup:

  1. Downloading the MailChimp add-on from the Gravity Forms support site
  2. Entering my MailChimp account details in the backend
  3. Selecting the proper list from a dropdown, selecting the proper form from my dropdown
  4. Matching the fields and setting the optional "Opt-in condition"

It looks like this:

Pretty nifty stuff huh? (You'll need a developer license for this add-on btw, just so you know.)

Gravity Forms Widget

My Gravity Forms Widget also has had several updates over the last months to fix some bugs here and there, such as tabindex issues and issues with other plugins colliding into the form. The widget interface now looks like is shown below. You can download the latest version here. To use it just upload it to your plugins folder and activate it.

Gravityforms Widget interface

It seems Gravity Forms upcoming version 1.4 is going to be awesome yet again, so if you haven't yet, you really should get on this bandwagon and start using it. It rocks. If you want to read more, you might want to read about or listen to Gravity Forms on Press This (when our podcast was still called that way).

Gravity Forms (Widget) update is a post from Joost de Valk's Yoast - Tweaking Websites.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on WordPress hosting!

Yoast: WordCamp Ireland: having a blast!

So I'm in Kilkenny, Ireland for WordCamp Ireland, and I'm having a complete blast, thanks in large part to the great organization done by Sabrina Dent and Katherine Nolan. The tech track is absolutely blowing my mind: it's really techy!

The people here are great: I met a lot of awesome people, basically to be separated in two groups. Group one are the Automattic people: Donncha, Jane Wells, Sheri Bigelow, Hanni RossJohn Godley. Some of the other people worth mentioning because they did cool stuff: Daryl Koopersmith gave a great talk on WordPress themes, Andrea Trasatti did another superb presentation on WordPress mobile plugins and themes (and got me to actually work on yoast.com and get me a decent mobile plugin going). Thank you, all!

Lastly, I'm always amazed that even though I mostly live in a Google world (actually, I had lunch with Fili Wiese and colleagues in Google's EMEA HQ last friday and Luisella Mazza from Google is here on WordCamp Ireland too), the people from Microsoft I meet on these conferences almost always turn out to be absolutely awesome people: Josh Holmes and Martha Rotter: you rock!

So I gave a presentation myself on saturday, which has been filmed and will probably appear on WordPress.tv, but these are the slides:

WordCamp Ireland: having a blast! is a post from Joost de Valk's Yoast - Tweaking Websites.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on WordPress hosting!

Importing from another MySQL into WordPress

WordPress Database MigrationSometimes data imports into WordPress can be a pain, but most of the time, it's pretty darn easy. In a previous project I had to go through the trouble of outputting WXR files and then importing those, but it's really a lot easier if you do a direct MySQL to WordPress import using the WordPress API. I did one this morning for Bergler, a client of ours, and wanted to quickly walk you through how I did it, as it's something I guess some of you can benefit from.

The old database in this case was very very simple, I've renamed the column names as they were originally in Dutch, but that's about all I changed.

So, first of all, we connect to the old database:

require("include/connect.inc");
$conn =	mysql_connect($DBHost,$DBUser,$DBPassword);
mysql_select_db($DBName,$conn);

The include/connect.inc file contained the variables used to connect to the database in this case.

Then we query for the news:

$results = mysql_query("SELECT * FROM news",$conn);

And then we loop through it, this is where most of the magic happens. To have the posts published immediately on import, we have to set post_status to 'publish'. I also determined the category I wanted these posts to go into, number 4 in this case. In a lot of other cases you might have to map the original category to your new one, but that should be easy too. Finally I converted the date from a dd/mm/yyyy string to a date that WordPress understands, and then just put the appropriate fields in the old database into their new names:

$i = 0;
while ($row = mysql_fetch_array($results,MYSQL_ASSOC)) {
  $post = array();
  $post['post_status'] = 'publish';
  $post['post_category'] = array(4);
  $post['post_date'] = date('Y-m-d H:i:s',strtotime($row['newsitem_date']));
  $post['post_title'] = $row['newsitem_title'];
  $post['post_content'] = $row['newsitem_content'];
  $posts[$i] = $post;
  $i++;
}

As you can see I've now created a $posts array, I could have immediately inserted the posts into WordPress here but I wanted to prevent any clashes between the two databases. So the next step is to free the results and close the connection:

mysql_free_result($results);
mysql_close($conn);

Now we load up WordPress (this line is assuming you'll be running this import script from the WordPress root directory):

require('./wp-load.php');

And finally we loop through the posts and insert them into the database:

foreach ($posts as $post) {
  wp_insert_post($post);
}

That's it! Easy does it. If there's a LOT of news you might have to play with script execution times etc, but this code just imported 200+ news items in under 5 seconds for me.

Importing from another MySQL into WordPress is a post from Joost de Valk's Yoast - Tweaking Websites.A good blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Use WestHost, and you'll never have issues again!

Smarter handling of WordPress plugin uploads

While preparing my previous post on new features in WordPress 2.9, I ran across a ticket in Trac for something I'd been wanting to do for a while: specify a subfolder of the uploads directory for specific plugins, like my Blog Icons plugin, to upload their files to. This way, the blog icons plugin would upload its files to /uploads/blog-icons/, which is a lot better for everyone.

Aaron Campbell and Denis de Bernardy, both well respected WordPress developers come to a surprisingly simple way of doing that without core needing any patching. To use it, you only have to change the prefix of the function and the sub dir to use:

add_filter('upload_dir', 'my_upload_dir'); $upload = wp_upload_dir(); remove_filter('upload_dir', 'my_upload_dir');   funcion my_upload_dir($upload) { 	$upload['subdir']	= '/sub-dir-to-use' . $upload['subdir']; 	$upload['path']		= $upload['basedir'] . $upload['subdir']; 	$upload['url']		= $upload['baseurl'] . $upload['subdir']; 	return $upload; }

Smarter handling of WordPress plugin uploads is a post from Joost de Valk's Yoast - Tweaking Websites.A good blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Use WestHost, and you'll never have issues again!

Geeky bits in WordPress 2.9

Thanks to Peter Westwoord's WordPress Beta Tester plugin, this blog is on the 2.9 development track again, after having been off trunk for a couple of months. That plugin makes it really easy to switch any WordPress install to the development branch, either for the next "point" release (eg. 2.8.6), or the next major version, in this case, 2.9.

Check out Technosailor's great post on most of the new features for users. Below I've gathered a list of things especially relevant for readers of this blog and for developers like myself.

Support for rel="canonical"

WordPress now has rel="canonical" support built in, there by making my Canonical URL's for WordPress plugin obsolete, as expected.

Enhancements to wp_query

Although this is more for the geeks, I'd been fighting this one for a while now without realizing it: you could only get $wp_query to either return one type of post (so 'post', or 'page' or 'attachment') or ANY type of post, but not all posts and pages. You can now, IMHO, that's a major improvement.

Performance updates to options table

It's a long story, but if you like databases and optimization, this thread on Trac is worth a read. In short: the options table is now more optimized than it was before.

Upgraded TinyMCE

Highlights of that upgrade (here's the Trac ticket):

  • Empty P tags are not stripped off and would show in the HTML editor as <p> </p>
  • The paste and paste from Word cleanup removes spans and inline styles.

Option to cache wp_remote_get

This might be one of my most favourite simple enhancements. It allows wp_remote_get requests to be cached, very useful, might even be worth adding into a plugin like Frederick's W3 Total Cache.

category-<slug>.php support

This one will be loved by theme coders all around. You can now make a category-<slug>.php template, where before you always had to make a category-<id>.php template. This one is a lot more intuitive. Incidentally, support for tag-<id>.php templates was added too.

Another major improvement in that area is that you can now make page-<slug>.php templates, so if the slug is sitemap, page-sitemap.php would always be it's template. Nifty, huh?

Post thumbnails

Though best explained in the the post on Technosailor, you should try adding this to your themes functions.php file:

if ( function_exists( 'add_theme_support' ) ) 	add_theme_support( 'post-thumbnails' );

It will add a meta box to your Write screens:

When clicked this will simply bring you to your Media Gallery and add a new link next to insert into post entitled "Use as thumbnail":

Use as thumbnail

The image you select there can then be used with the new functions has_post_image(), get_post_image_id(), the_post_image() and get_the_post_image().

That's a pretty cool addition for theme developers, together with the media additions, which also allow you to change just the thumbnail, this makes for a pretty decent post thumbnail feature set.

Sidebar descriptions

This new feature allows you to add a description to each sidebar in your theme. If you, like we do very often at OrangeValley, create themes with 10 or more sidebars, that really is a nice feature. It's very simple too, all you have to do is add a description value to the array you're using to declare sidebars:

if ( function_exists('register_sidebar') ) {   register_sidebar(array(     'name' => 'Complex Sidebar',     'id' => 'complex',     'description' => 'Here is some important considerations about Complex Sidebar',     'before_widget' => '<li id="%1$s" class="widget %2$s">',     'after_widget' => '</li>',     'before_title' => '<h2 class="widgettitle">',     'after_title' => '</h2>',   )); }

And it'll look like this:

sidebar description

There's tons more new cool stuff, but this should get you started for now!

Geeky bits in WordPress 2.9 is a post from Joost de Valk's Yoast - Tweaking Websites.A good blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Use WestHost, and you'll never have issues again!

  • Book of the Week

SEO Powered by Platinum SEO from Techblissonline