Array Function in WordPress 2.5

During a recent site redesign, the client required the site dynamically generate a unique promotional banner (in the sidebar) on certain high profile writers “about the author” page.

wordpress 2.5Before WordPress version 2.5.x, we had to rely on conditional tags such as is_page() or is_category() and numerous lines of code to accomplish it. For most parts it worked well, especially when you had only one or two conditions to satisfy, but when the number of such exceptions increased, the code became bulky and was prone to err.

With WordPress version 2.5.x, you can simplify the task by applying the conditions over an array of pages (categories, tags…), here’s an example:

Our conditional tag was required to automatically generate a banner when the author page of specific authors was queried.

Who is Stealing your Mojo? RSS Feed Scraping, Splogs and How to Fight them

ban splogsIf your site gets any traffic at all, chances are your RSS feed is scraped and misused by some one trying to score on SERP for the work you have toiled on. This very blog is constantly ripped by sploggers who have no regards to intellectual property rights or just plain simple dumb to realize they are stealing. Here are three sites where you can find the entire content of our blog scraped/ripped/stolen and posted as their own. Of course I did not link to them because I really don’t want you to visit them:

myblogmix.com (this m^*&*0 f$%*r even uses one of our themes on his splog!)
frenzygraphics.com
urlfan.com

How do you stop them?
Jonathan Bailey, a security expert (Plagiarism Today) who also writes on Blog Herald, lists 6 steps to identify and fight content theft. We religiously followed the suggestions for months now (that post on BH was from last November), but none worked thus far. Google is yet to acknowledged our letters (used his cease and desist letter templates, which is a good source, thanks!). I even took solace in thinking maybe they have a backlog or that they will eventually write back, but nothing really happened.

SEO Tip Open Comment Author URL in new Window

For good SEO, it is preferential to open your comment authors URI in a new page. Why you might ask? Google and other search engines track sites you visit, they can tell what that site contains (obviously), how long you stayed there and where you went next. The intended use of this information is to find if the sites you visited were relevant to your search keyword and/or if all the sites you visit are related. That could also work against you if your site get a lot of spammers commenting on it. Here’s how.

comment author url pupupLet’s say you get a comment on your site that look legit, so you want …

Anatomy of a Magazine Style Premium WordPress Theme - Part 3.2 “Conditional Navigation Menus”

As the tutorials run longer than we prefer, we have broken section 3 into 3 sub-sections, you can find sub-section 1 regarding second level menu here.
The navigational aspect of a site, especially one that is database driven, should have menus that are dynamically generated just like the rest of its content, but is seldom the case. The reason is not the lack of information or techniques, but rather the developer underestimating the role of effective navigation to the success of a site. A site with poor navigation is just as or bad or worse than a site with poor content.

conditional menu
Magazine style themes have overcome …

Free Magazine Style WordPress Theme: The Box

Free Magazine Style WordPress Theme: The BoxWhy pay for a Magazine WordPress Theme when you can get one for free? Introducing The Box, the all-inclusive magazine style WordPress theme that has all the cool features of a premium theme straight out of “the box”. Best of all, it is absolutely Free!
Ola Hedin of Blyerts.com pointed out an IE 6 issue that was fixed on 05/06/2008 at 9:48 PM EST. Thanks Ola
The theme includes among other functions advance edit options, featured-regular post option, second level, conditional and dropdown menus, tabbed JavaScript interface, widget ready sidebars and is pre-styled for Google Adsense and coded to be search engine friendly (optimized).
Demo and Download
Click …

Anatomy of a Magazine Style Premium WordPress Theme - Part 3.1 “Navigation – Second Level Menu”

As this tutorial runs longer than we initially anticipated, we will break section 3 further into three sub-sections.
In our ongoing exercise to learn the nuts and bolts of a magazine style WordPress theme, we examine what has become by far the most ignored part of a theme design, the navigation menu.

revolution magazine style theme menuAs important as they are, they are often found floating in the header or worse the sidebar and almost never used to its fullest as rightfully should. Today we will change that. We are dedicating three sections just to discuss navigation menus, its varied uses, and the various methods of using it. So why wait, let’s get started.
Why …

Anatomy of a Magazine Style Premium WordPress Theme - Part 1 “The Loop”

Let me say it for the millionth time “content is king” and we all know that, don’t we?

featured wordpress postsSince content is the most important part of a site, your WordPress powered theme must emphasis on its presentation. Most cookie cutter themes come with a post list that runs based on the time your posts were published, in other words a chronological list of posts irrespective of its importance. Let’s face it, not all posts are created equal. Some posts are special, some are important and then some not quite so. Why then should all posts get the same treatment?

Magazine styled themes do a fine job of addressing this by introducing the featured …

How to Update your Old Theme for WordPress 2.3: Tags

One frequent question from users of our old themes that upgraded to WordPress 2.3 is to do with tags and how to include them in the theme templates.

Tags are very useful for Search Engine Optimization (SEO), especially when it serves as a keyword to describe your post, while it is ridiculously simple to add these tags to your template, a walk through is warranted for those less familiar with manipulation WordPress theme templates.

So here we go.

Login to your WP Admin from http://yoursite.com/wp-admin
Click on Presentation
Click Theme Editor
Click Main Index Template (to add tags to the home page) or Click Single Post (if one exists to add …

Sandbox (CSS) Design Competition Pre-Submission Checklist

For those making the final submission of your CSS designs for the competition either tomorrow or the day after, I compiled this quick (should take less than 15 minutes) and a short checklist to help ensure your theme gives the rest a run for the money. At the risk of being called “Captain Obvious”, here it is:
Style
Hierarchy: Make sure your h1, h2… are all styled using commonsense formats to create a meaningful visual hierarchy. Sandbox does not use h2 in the sidebar like the Widgets do, so think about both scenarios, that is, users using your theme as is and those using sidebar widgets. (Time: Should take you less than 1 minute for this)

Dropdown menu usage: If you plan on using the default dropdown in Sandbox, leave the pages list intact for IE 6 users. If you plan on hiding the sandbox_globalnav, the div id is “menu”, make it “display: none;”. (Time: Again, should take you less than 1 minute to check)

How to make your Codes “Friendly”

Have you found yourself wanting to display a piece of code in your blog post or a comment form that left you stripping off elements or re-pasting it over and over only to find that the code is actually being executed? I run in this issue a lot while replying to support questions, so I conveniently remove the < and > of all php script to allow the codes to show, this however cause more harm than help to the novice user and the experience is never that pleasant. Help is finally here!

A combination of using the “code” tag and converted the base code by using this cool converter called Postable makes for a delightful masterpiece that users can share, copy and paste without any hassles and guesswork. Here’s how you go about it.