Brian Krogsgard

Contributing Editor

brian-bw

Brian is a fan of WordPress, Auburn, and politics. In addition to acting as a contributing editor at WPCandy he is a WordPress and user interface developer for Infomedia. He also blogs on his own and often tweets as @krogsgard.


Brian’s Latest Posts (113 total)

properly enqueue scripts in WordPress  themes
There are a lot of themes out there. And a ton of them are not including javascript files properly. So theme developers, please pay attention: this is how to include scripts in your themes properly. And guess what? It’s really easy.

Let’s lay some groundwork:

  1. This example would go in your functions.php file.
  2. This example assumes your theme is a parent theme.

In this example, I’m registering four scripts, and enqueuing two. I’ll explain it afterward.

<?php
/*
* WordPress Sample function and action
* for loading scripts in themes
*/
 
// Let's hook in our function with the javascript files with the wp_enqueue_scripts hook

add_action( 'wp_enqueue_scripts', 'wpcandy_load_javascript_files' );

// Register some javascript files, because we love javascript files. Enqueue a couple as well

function wpcandy_load_javascript_files() {

  wp_register_script( 'info-caroufredsel', get_template_directory_uri() . '/js/jquery.carouFredSel-5.5.0-packed.js', array('jquery'), '5.5.0', true );
  wp_register_script( 'info-carousel-instance', get_template_directory_uri() . '/js/info-carousel-instance.js', array('info-caroufredsel'), '1.0', true );

  wp_register_script( 'jquery.flexslider', get_template_directory_uri().'/js/jquery.flexslider-min.js', array('jquery'), '1.7', true );
  wp_register_script( 'home-page-main-flex-slider', get_template_directory_uri().'/js/home-page-main-flex-slider.js', array('jquery.flexslider'), '1.0', true );

  wp_enqueue_script( 'info-carousel-instance' );
  
  if ( is_front_page() ) {
    wp_enqueue_script('home-page-main-flex-slider');
  }

}
?>

Now let’s break it down

Continue reading

ZippyKid introduces MyZippyKidZippyKid, a managed WordPress hosting provider, wants to be the go-to host for WordPress developers. They’ve launched a beta project called MyZippyKid, which offers a suite of apps to help developers create, manage and clone websites, all for free. The only time you have to pay is if you launch the site and want to stay with ZippyKid in a live environment.

Vid Luther, the owner of ZippyKid, let me have a look around MyZippyKid beta, and I’m impressed with what I’ve seen so far. The project is still in development, so I haven’t been able to fully manage a project, but once they get ready it’s going to be a very nice environment for developers. He’s also got quite a bit planned for the future of MyZippyKid, including the ability to integrate Google Analytics, manage SSL certificates, custom domain name integration, and commercial theme management, all in one place.

The beta program is currently available to existing ZippyKid customers, but for the rest of us, they’ve released a video preview of what you can expect. You can view it after the jump.

Continue reading

Permalink

Joost de Valk wants to know about your host

Joost de Valk is running a survey to inquire about your WordPress hosting setups. He plans to run some testing on different hosts and show which hosts are properly supporting WordPress customers. He’s specifically wanting more samples from any Europeans out there. Go give his survey a couple minutes of your time, and let’s all sit back and see what he does with it. I know I’m interested.

Pressbit 008 is ready for your listening ears. In this Pressbit I talk about WordPress business models, giving a proof of concept that (I hope) helps get across the point that there are a lot of business models in our industry that are still untapped.

Listen here:

If you would rather download it directly you can do that, or subscribe to this show via RSS or on iTunes. If you would prefer a written summary, you can also read that just after the jump.

Continue reading

Permalink

Themergency is collecting a list of interesting WordPress projects on Github

I ran across a post by Themergency this morning where they’ve gathered a list of interesting WordPress projects hosted on Github. I knew of many of them, but I think we can all find something new here. It’s pretty amazing how Github has transformed open source software development, and made it simple for anyone to collaborate on projects. Definitely take a look at their post and help them build this resource for folks looking for WordPress centric projects on Github.

happytables, formerly known as Theme Force, has exited public beta and relaunched with new branding. Noel Tock and his partners, Tom and Joe of Human Made Limited, decided the Theme Force name was more appropriate for selling WordPress themes, and as they’re not doing that any more, the change was due.

I’ve had an opportunity to discuss many of the changes with Tock as they’ve transitioned the new site and I’ve even beta tested the new interface of happytables. Having used both the beta interface and the new one, it’s obvious the guys have been busy improving much more than the name and public facing website.

Continue reading

Theme Hybrid, the WordPress theme club founded by Justin Tadlock, has a new look. Justin’s been teasing the new design for a couple of months, and it went live yesterday. It’s a lot more than a new design though, as he totally reworked the site, with documentation and usability in mind.

Justin has a slew of free WordPress themes and plugins that he maintains utilizing a $25 per year support / membership business model. As an unabashed fan of his plugins and especially his Hybrid Core theme framework, the new site really makes the documentation and tutorials shine.

The redesign includes revamped sections with post types for tutorials, code snippets, php classes, constants, functions, hooks, and shortcodes. In addition to the new site structure, he’s finishing up what he calls some “dark magic” with Gravity Forms to handle the site’s membership system. He’s also working out details to allow club members to submit their own themes to Theme Hybrid, which I find exciting.

One thing that intrigued me in the announcement post is a tease for an upcoming book he’s a part of. Many know him as a co-author of the Professional WordPress Plugin Development book, but his role in this book will be a bit different. He’ll be publishing it as an e-book, and not going through a publisher. Justin is also an editor for the upcoming, updated, edition of the Smashing WordPress book, written by Thord Daniel Hedengren, which will be released this spring.

If you’ve ever had a desire to learn more from Justin than you undoubtedly already have from his popular tutorials, then it may be a good time to check out Theme Hybrid. And you may see me scrounging around the forums as well.

Some screenshots of the new design are below:

Pressbits episode 006 awaits you. This time was slightly different, as Ryan and I were both on this episode. We held a very brief conversation about how we look for and decide to use a plugin in the repository.

You can listen to it here:

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

If you would rather download it directly you can do that, or subscribe to this show via RSS or on iTunes. If you would prefer a written summary, you can also read that just after the jump.

Continue reading

Magazine themes are quite alluring. Sliders, pictures, columns, unique blocks of different content on demos. But beyond the perfectly crafted demo marketed to entice you to purchase what you’ve convinced yourself you must have, you probably don’t need it at all.

I’m willing to bet almost no content driven website actually needs a “magazine” layout. In fact, for those that utilize them, it may hurt what’s most important to their bottom line — me, the reader. My page views and my time on their site.

Continue reading

In this episode of Pressbits I discuss my pet peeve of plugin developers deleting my options settings on deactivation, rather than upon uninstallation.

You should listen to it, especially if you’re a plugin developer.

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

If you would rather download it directly you can do that too, or subscribe to this show via RSS or on iTunes. If you would prefer a written summary, you can also read that just after the jump.

Continue reading