Archive

Archive for July, 2008

Modifying Mimbo 2.2: Step Two – Modifying index.php

July 27th, 2008

This is the second in a series of articles that will cover making several modifications to the Mimbo 2.2 Theme by Darren Hoyt.  I am modifying the theme to fit the requirements for my own site.  To see the first step requirements and get an overview of what I have planned, please read The first article in the series; Modifying Mimbo 2.2: Step One – Identifying Requirements

Without further ado, let’s dive into the code for Mimbo’s index page and make some changes.

As mentioned in the first article of this series, one of my first requirements is to use category names to pull posts out of the DB instead of the default setup used by Mimbo.  This isn’t a complicated change, but when there is the possibility of category ID’s Changing over the course of a development cycle, it’s one worth making.  To make this modification, we first need to find the section of code that calls Lead Story and modify it to suit our new requirements.

Again, this is where Mimbo shines, since we find the first module right at line 6 of the index.php file:


    " alt="" id="leadpic" />

{More»}

Line 8 is the one we need to take note of.

query_posts('showposts=1&cat=3'); ?>

This call uses the query_post() WordPress Template Tag to get 1 post from category number 3. What I want to do is get the category information by name, in this case, I want to display the latest post in the “Recipes” category, so we’ll change it to read as follows:

query_posts('showposts=1&category_name="Recipes"'); ?>

The next call to a category ID is at line 16, where the category title is displayed:

// this is where the name of the Lead Story category gets printed
wp_list_categories('include=3&title_li=&style=none'); ?>

Unfortunately, wp_list_categories does not allow for calling categories by name, But since we’re already specifying the ctegory that we want by name, we can actually eliminate the need for a php call and simply print out the name using standard html, like so:

// this is where the name of the Lead Story category gets printed
?>Recipes

In the case of the project I’m working on I don’t think it’s necessary to print anything at all, since it’s going to be pretty obvious that what the reader is looking at is going to be a recipe, so I’ve made the following changes, starting at line 13:


Note: I’ve only commented these lines out in the example so that line numbering is not affected. In my production site, I removed them from the code altogether.

The second change needed to match my requirements is that all posts must show author information and date posted. This is required by several of my advertisers so that they can keep track of the dates that ads and reviews were posted. I really like to keep the people that make me money happy, so I’m going to add it in.

I want the author and date information directly under the title of the post, so I’ll start adding it in at line 19:

Original Code:

// this is where the title of the Lead Story gets printed
the_title(); ?>

And we change it to:
// this is where the title of the Lead Story gets printed
    the_title(); ?>

    By   •  • Category: 

What we end up with is this:

The layout works, but it's not pretty. It'll look better once images are added and a little css work is done

As you can see, we now have no category title and we've got author information posted below the post title using the <small> tag. It's ugly as heck, but all that will be fixed later when I modify the stylesheet to fit the look that I want. What we've got is working, and I call that so-far so-good. At this point we need to modify the second column to work in the same manner. Since we've already covered the changes needed in detail, I'll just show you the code before and after modification, you should easily be able to spot the changes: Original Featured Column:


Modified Featured Column:

Recent Recipes

The only real difference between the first examples is at line 36 of the modified code:

    query_posts('showposts=5&category_name="Recipes"&offset=1'); ?>

Take note of the offset parameter. Since we're using this column as a continuation of the Recipes category and we've already displayed the first, or newest, post in the category, we use the offset parameter and set it to 1. This tells query_posts() to skip the newest post in this category and move on to the next, thus avoiding a duplicate entry.
The other main addition to the original Mimbo code is that I added post excerpts to the second column so that my readers get a glimpse, or teaser, of what the post contains. I've found that this can, at times, persuade a casual passerby to move a little deeper into the blog to find what he or she needs, and again adheres to the requirements of some of the companies that pay me to do what I do.
Modifying the third column is much the same as the first two. with just one exception. By default Mimbo uses an array of integers to get the first post in any number of categories specified and display them in that column:

I just switched the code up a bit to use category names so that all the sections matched:
// this is where you enter the IDs of which categories you want to display
$display_categories = array("Reviews","Product Spotlight", "Blog Events", "Shopping Alerts", "Blog Spotlight");
foreach ($display_categories as $category) { ?>
all I did was change the array to hold category names instead of ID's. After that, changing just the "cat=" parameter to "category_name=" was enough to let the theme do the rest. Easy Peasy! I think that's enough to digest for now. In the next article I'll address modifying the way Mimbo handles images on the main page. Have fun coding!

Jerry WordPress Themes , , ,

Modifying Mimbo 2.2: Step One – Identifying Requirements

July 21st, 2008

The time has come for a major revision to my cooking and recipe blog and I’ve chosen Mimbo to act as the basis for the redesign.  This is the first in a series of articles that will detail the changes I’ve implemented to get Mimbo working the way that I need it to.

There are few WordPress themes that have garnered as much interest as Mimbo 2.2 by Darren Hoyt. Not only is the layout elegant and very functional, the code is commented well enough to allow anything from minor tweaks to major customizations without much trouble at all. This ease of customization is a major component to Mimbo’s success and in my opinion it is also Mimbo’s strongest point.

As with any theme modification, steps need to be taken in advance to know what your requirements are.  In this case, Mimbo’s layout is nearly everything that I want for the new look, but there are some very real changes that I need implemented.  Styling is almost always a more significant time investment, so it’s best to decide early on if the project will have to be switched to another theme. Before worrying about new header graphics of mucking with CSS styles, it’s necessary to map out the core functionality necessary for your specific needs and make sure that everything is functioning in the way that you need it to. This can save hours in development time.

With that in mind, let’s look at the way that Mimbo functions “out of the box”.

Darren Hoyt's Mimbo. As a theme, it's a work of art

Mimbo has four main “Modules” on the index page. (The sidebar has multiple modules, but I’ll focus on those in a later post) Each of these modules displays the latest information from different defined categories in whatever order the blog owner prefers. Let’s look at each in turn and see how the theme author has this laid out.

  1. The Lead Story Module: Designed to handle important news, or the most relevant piece of “core content” of your blog.  It puts it right out there in front of the world at twice the width of anything else on the page.
  2. The “Features” Module: a chronological listing from the “Featured” category.  Generally the column where important “bread and butter” articles would be featured.  Again this targets your core content, but it’s content of a less immediately relevant nature than the Lead Story.
  3. The Right Column Module: The right column module displays the latest article posted in any number of assigned categories.  This is really the feature that puts Mimbo firmly in the “Magazine Style” WordPress theme category, and it is a very powerful tool which shows the casual visitor a brief overview of the topics you’ve been covering.
  4. The Sidebar Module: Mimbo’s sidebar contains all of the usual suspects for a WordPress theme. It has Widget support, categories, and recent this-or-that in place right out of the box.  It also has a few custom pieces like another module for displaying very short snippets of site news and advertising space built in, which just ads another level of power to this theme.

If you’re just looking for a theme that looks great and works flawlessly, Mimbo is good right off the shelf.  Unfortunately, it’s almost never that simple. Every blog or website has its own special requirements and even as good as Mimbo is, it’s just not quite what I need at this point.

The first change I need to implement is in modules 1 and 2.  For my needs, both of these modules needs to display information from the same category. They also need to display the date the post was published and a few other bits of information, such as a spoiler (or excerpt) and author information.

Module 3 is already set up much the way I need it, so the basic functionality does not need to change, but there are some formatting issues that need to be addressed. As with Modules 1 and 2, I need the date published, a better excerpt and author information shown on the main page.

In addition, I want to change the way Mimbo handles some of it’s main display functions to better suit my work flow and the fact that I’ll be importing a live site into a test environment more than once during the build process. This could change the category ID’s on me while I’m testing, and that’s just not a great way to play.

In the next installment, I’ll dive into the code changes necessary to accomplish this first round of goals.  Hopefully it will give a better understanding of theme tweaks in general and allow those of you who have always wanted to mess with your theme files to take the leap into true customization.

For my more experienced readers, perhaps it will persuade you to play around with Mimbo and see if it suits your needs as well.

Until next time!

Jerry WordPress Themes , , , ,

Jump Start your PR Campaign

July 20th, 2008

In today’s world of high tech sales, marketing and promotional strategies, it’s only logical to make sure that your PR firm can handle high tech public relations.  This may sound like a daunting challenge for smaller companies, but the reality is that the right public relations firm can level the playing field between small startups and the big boys fairly easily in this new medium.

Enter the Loughlin/Michaels Group, a company with six years experience in the high tech public relations field. Their Jump Start Program is designed to help smaller businesses gain recognition and presence in the new marketplace, thus gaining your business the momentum it needs to succeed and grow in today’s world without having to risk the stability of your business with PR expenses.

You need to get your business off the ground and you need to do so with a company that has a rpoven track record of achieving results.  Make your choices based on past performance and go with an expert in the field.

Jerry Business Sense ,

The Fallacy of the “More is Better” Mentality

July 17th, 2008

More Ain't Better

One of the most common sights on Internet job boards these days is a call for bloggers to write for new blogs and community sites.  While this is a good thing for bloggers, the trend that I see goes something like this:

Need reliable self-editing, experienced writers ASAP.

We pay a highly competitive rate; you’ll write 7-40 posts each week.

If interested please send resume, clips, succinct cover letter, and link to any blogs you write/contribute to.

FakeCompanyEmail@fakecompany.com

This expectation for prolific amounts of weekly posts seems to be the norm for most blog networks and startup blogs looking to gain popularity quickly.  Massive amounts of posts attract search engine spiders and get RSS subscribers quickly and these companies are betting that ten to twelve posts per day from multiple blog authors is going to gain them a very quick entry into the B-List. The problem is they’ve got it all wrong!

The Issue with Information Overload

The inherent problem with this line of thinking is that even though posting huge amounts of information on a regular basis may very well get you a very large reader base in the beginning, most casual readers won’t be staying with you for very long. Readers will tire of the constant barrage of information, even if it’s in very small and digestible chunks.  I don’t know how many different blogs I’ve unsubscribed from simply because I couldn’t possibly keep up with the amount of information they were throwing out.

This model may work if what you’re after is getting your posts plastered all over Google with the intention of gaining random clicks on relevant advertising.  As a matter of fact, the more is better model is wonderful for that, simply because the ads begin to look more relevant than the content!

The downside to this model is that it tends to favor short posts that only vaguely cover a given topic.  The publisher wants more, more, more, which leaves the writers to popping off quick, sometimes incomplete or at least woefully under thought articles so that they can move on to the next one and make more money.  The emphasis on quality suffers and the bloggers themselves may begin to suffer from burnout, which makes their posts even less informative.

Why Quality is the Key

Let’s take a single niche and look at who the big boys are.  When you talk about blog-centric A-Listers, you come up with several names very quickly. Andy Beard, John Chow, Skelliewag and of course, the venerable Maki of DoshDosh are all driving forces in the world of blogs on blogging and marketing.  They’re all very good at what they do, and they have several things in common.

The thing that makes these bloggers a must read is that they don’t ever push quantity over quality. Andy Beard may or may not post for a week at a time, but when he does, his readers are given a very insightful piece of work that has been thought out carefully and is written extremely well. Maki posts once per week at DoshDosh, but nearly always rules the StumbleUpon and Digg listings when he does.  His writing is on topic, it makes sense and he’s speaking to an audience that really wants to hear what he has to say.

The articles at skelliewag are something that I look forward to, because Skellie knows what she’s talking about and she’s willing to share it with a community that gobbles up every word she writes. John Chow posts more frequently than these others, but he nearly always posts in great detail on a topic, and he writes with passion (You may not agree with him, or even like him, but he’s got passion.)

The thing these people have in common is that they write content that people want to read. They have never fallen into the trap of slamming out posts at an insane rate just to satisfy the great beast that is Google.  They allow their readers to carry their message and they simply do what they do best.  They Write, Inform and at times entertain.

There is another key to the success of all of these bloggers.  Their blogs are simple. Jump to skelliewag, DoshDosh or Andybeard.eu and you’re going to find great content, not a lot of glitz, glam and widgetry floating about. The focus is on the content.  It’s something to consider when you’re deciding on a theme for your own blog. (I’m paying attention, too.  I was just in the mood for some black)

So what’s it gonna be?

I’m not saying that blogs or networks that pump out tonnes of information all the time don’t have their place.  They do.  But if you’re going to be blogging for yourself and you’d like to become recognized for your work, it’s probably best to avoid the temptation of posting several short articles per day. unless you’re running a news-based blog. (At which point this article no longer applies).

The best in the business are not only icons, they’re teachers.  They have something to teach you.  learn from them.

Or you can fall to the poser of the dark side and simply pollute the bloggosphere with another “Hey, I just saw this great piece by…” Article.  The choice is yours.

Jerry Blogging , , , ,

The Better Feed Plugin – Your Feed on Steroids!

July 15th, 2008

If you’re a long time WordPress user like myself, you may have gotten used to using the  <!– more –> tag to display teaser material in your RSS feeds.  If so, the decision to remove support for this feature in the 2.5 release of WordPress may have had you a bit put off. Since WordPress 2.5, you either had to go with full feeds, (Not good in cases where traffic to your blog = money) or you had to fill in the description field for each and every post.  (Honestly, if I wanted to use Joomla! I would have been doing so already!)

Enter the Better Feed plugin from Ozh.  Not only does this bad boy return you to the stock behavior of earlier WordPress versions, but it allows you to add just about anything you ever thought of to the footer of your RSS feed. How about Post word counts, custom (Read More) text, number of comments, a nice little reminder that you’re running a contest?  You name it, this plugin will do it.

I’ve used several plugins over the past few years that added advertising to my RSS feeds, but none of those solutions was very elegant.  Better Feed makes this process simple.  Each time a new round of advertisements that I feel my readers would be interested in comes through my inbox, I simply append the best of them using the plugin interface, hit save and forget about it until next week.  No more worrying about whether I’ve fubar-ed the code for one of five rotating ad choices or mucking with a management script designed to handle far more than I will ever need on a C-list blog. (I’m working at hitting th A-List, but hey, it takes time!)

There is a bit of a learning curve to Better Feed, but It’s nothing that should send you into a fit.  The tags are pretty straightforward and the editor will be familiar to anyone who has ever edited their comments before.  Getting things to look just the way you’d like may take a bit of time, but you’ll get there, don’t worry.

In the end, I’m listing this as one of my “Must have” WordPress plugins.  I just don’t know what I’d do without it at this point!

Jerry WordPress, WordPress plugins ,

ss_blog_claim=3928b73221a2ea923abbd6c5cb76831e ss_blog_claim=3928b73221a2ea923abbd6c5cb76831e