If you read “how-to” stuff for WordPress sites around the web, then you frequently run across what many people like to call “snippets”. Short bits of code or functions to do various things. I myself post snippets frequently, usually made up on the fly to solve somebody’s specific problem.

One question I get a fair amount is “where do I add this code?”

The usual answer to this for a lot of people is “in the theme’s functions.php file”. This is a quick solution, but it is often a problematic one.

The reason this has become the more or less go-to place to add these snippets is because it’s complicated to explain to a newbie how to make a plugin and activate it, or to point out the problems with modifying core code, or plugin code. Saying to look for a specific file in their theme, on the other hand, is quick and easy, and until recently theme upgrades have been fairly rare.

However, as themes get upgrades, it becomes more and more incorrect to tell people to modify them directly. And telling people how to create child themes is complex, even if it’s easy to do.

So I’d like to start a new trend, and recommend that people start making Site-Specific Plugins. Most people who run WP sites on a serious level do this in some way already, but if you make it sorta-standard practice, then it’ll make things simpler all around.

How to create a Site-Specific Plugin

1. Create a new directory in the plugins directory. Name it after the site in some fashion. For example, /wp-content/plugins/example.com or something like that.

2. Create a new php file in that directory. Name is dealer’s choice.

3. Put this in the file:

<?php
/*
Plugin Name: Site Plugin for example.com
Description: Site specific code changes for example.com
*/

4. Finally, go activate your new blank plugin on the site.

Now you have a simple and specific place to add snippets. It will survive upgrades of any sort, and you can edit it to add new code on an as needed basis. What’s more, it’s kinda sorta break-proof. If the user uses the built-in plugin editor to edit it, and they add code that breaks the site, then the editor detects that on saving the code and deactivates the plugin, preventing the “white screen of death” for their site.

This is a much better way to use “snippets” than the theme’s functions.php file, and we should really use it more often in our replies to users.

If you’re seeing this, then my site has been migrated to DreamHost.

Note that while I set things up, I fully expect the site to break from time to time. So… gimme time to get it working properly.

TODO Step 2: Switch to nginx. :)

Didn’t know about this one, but if you’re having a problem where the FB login buttons added by SFC don’t seem to do anything, try this:

  1. Go to https://developers.facebook.com/apps/ and click on the App in question.
  2. In the left menu, under Settings, click Advanced and look at the settings in the Migrations section.
  3. Switch the “Encrypted Access Token” setting to ‘Enabled’.

Might fix the issue.

 

newspapersIf you’re a blogger, a marketer, a business owner, a publisher, or have anything to do with written word, then I’m sure you’ve struggled before to come up with a great eye-grabbing headline.

There are many approaches to come up with such a thing, but there are two main paths you can follow: you can either pretend that you’re a great headline creator, or you can borrow a headline that has already proven to be effective. I like the latter far better.

Hence this list of 79 great headlines that changed the publishing landscape forever. Let’s start with my favorite type of headlines:

Outrageous Headlines

  • Man’s Head Explodes in Barber’s Chair
  • Double Your Appointments In 30 Days Or I’ll Pay You $500 Cash!
  • Pig-nosed Man Roasted Alive in Fire-walk Tragedy!
  • Now! The Miracle Gas-Saver That Europe Couldn’t Hide!
  • 18 Things You Never Knew About Hank the Angry Drunken Dwarf!
  • It’s Ugly But It’s Beautiful
  • Skiing Squirrel Dies Trying to Break 196 m.p.h. Speed Record!
  • Half of U.S. Hookers are Space Aliens – and They Don’t Have Sex Organs!
  • Is Your Cat From Mars?
  • How To Rob Banks. It’s Fun, It’s Easy to Learn, You Don’t Need Much Capital, and You Can Now Do It in the Comfort and Safety of Your Own Home
  • Damn!
  • Supreme Court Judges are Naked Under Robes!
  • Nazi UFOs to Attack U.S.
  • Announcing The Chocolate Pie Diet

List-style Headlines

  • The 22 Best Relationship Tips Ever
  • 50 Idiot-Proof Ways To Make Money On The Internet!
  • 1,495 New Ways To Heal Yourself Now!
  • 10 Ways To Lose Extra Weight And Keep It Off!
  • 24 Techniques For Closing The Sale
  • His Secret Sexual Hot Spots – 9 Sizzling Places Men Love You To Touch
  • 9 Secret Ways To Save Big Money On Taxes!
  • Toxic People: 10 Ways To Handle People Who Make Your Life Miserable
  • 30 Days To A Low Fat Life!
  • 43 Tips For Smooth, Sexy Skin
  • 12 Proven Steps To Making Money On The Internet
  • 20 Top Running Tips

Secrets Revealed

  • Guys Spill: White Lies They Tell Women All the Time
  • Your Sexual Health: Crucial New Facts Your Gyno Forgot to Mention
  • A Shocking Thing 68% of Chicks Do in Bed
  • Best-Kept Secret In MLM Revealed!
  • What Credit Card Companies Don’t Tell You
  • The Three Little-Known Secrets To Bring Out Your Natural Beauty
  • The Secrets Of Successful Advertising By Mail
  • Tricks Of The Trade So Powerful They Can Change Your Life!
  • From One Woman to Another… Here’s One Fact of Life Your Mother Probably Never Told You!
  • Revealed… A 20-Year Old Secret To Lowering Your Insurance Premiums
  • Speed-Picking Secrets of the Pro’s. Don’t Spend Another Second Playing Guitar Until You’ve Read This!
  • The Most Powerful Wealth Secret In History

Challenging Readers

  • It’s Time to Break Up With Your Boss
  • Give Me One Evening And I’ll Give You a Push-Button Memory
  • When it Comes to Sex, You’ve Been Kept in the Dark for Too Long…
  • The Best Business Books Of 1998. How Many of Them Have You Read? Now You Can Read Them All – in Just 15 Minutes Each. Here’s How…
  • Are You Tired Of Living Paycheck To Paycheck?
  • My Chickens Eat Better Than You Do

Arousing Curiosity

  • Who Else Wants A Screen Star Figure?
  • Suppose This Happened To Your Car
  • Can We Talk? How To Make $20,000 An Hour Without A Gun!
  • They Laughed When I Sat Down At The Piano, But When I Started To Play!
  • They Laughed When I Sat Down at The Piano. They Stopped When I Picked It Up
  • Breakfast Of Champions
  • Would You Like To Save 45% On Your Next Vacation?
  • Announcing: The Weight Loss/Management Scientific Breakthrough Of The Century!
  • Why Do Chinese Women Have Such An Impossibly Low Rate Of Breast Cancer?
  • This is your window of opportunity. Open it
  • Unlike Any Steak You’ve Ever Tasted
  • Suppose This Happened On Your Wedding Day!
  • To People Who Want To Write – But Can’t Get Started
  • I’ve Got A Million-Dollar Idea – Now What?
  • You Get Two Magazines For the Price of One!

Personal Approach

  • Do You Make These Mistakes In English?
  • What Four-Letter Word Do You Use When You Have To Write A Check For Your High Healthcare Premium?
  • Had A Hunch Vending Was Lucrative? You’re Right!
  • You Honestly Tried To Quit… But Just Couldn’t! Don’t Worry. You’re Not Alone
  • Before We Tell The World, We Want To Tell You!
  • Thinking About Starting Your Own Business…?
  • Are You Ever Tongue-Tied At A Party?
  • Pros Want It, Newcomers Need It, You Can Test It – Free For 30 Days!

How-to Headlines

  • How To Win Friends And Influence People
  • How To Make Enormous Amounts Of Money Packaging & Marketing Information
  • How To Remove Carpet Stains In 10 Minutes
  • How To Grow A Business
  • How To Manage Stress, Reduce Anxiety & Stay Cool Under Pressure
  • How You Can Make $87,000 A Year As A Successful Magazine Writer!
  • How To Accomplish Anything You Want In Life
  • How To Make Maximum Money In Minimum Time!
  • How To Build A Multimillion-Dollar Business Without Spending Even A Penny On Advertising

Providing Social Proof

  • Always-Fresh Donuts – The Favorite Of Police Officers, Cabbies And All-Night Truckers
  • Why have over 200,000 people ordered Acu-Stop 2000?
  • The Place Where Truckers Come To Get Washed For The Long Haul

To learn more on writing headlines don’t forget to read these two posts at Copyblogger: 10 Sure-Fire Headline Formulas That Work and 7 More Sure-Fire Headline Templates That Work. And since we’re talking copywriting you might want to check this post too: The Modern Rules of Benefit-Driven Copy.

Feel free to shoot me a comment if you like to add more headlines to this list. I’d be happy to update this post with your input!

Related Posts:

Here in the U.S. we are observing Independence Day, and I can’t think of a more fitting way to mark a day that celebrates freedom than by releasing more free software to help democratize publishing around the globe. I’m excited to announce that WordPress 3.2 is now available to the world, both as an update in your dashboard and a download on WordPress.org. Version 3.2 is our fifteenth major release of WordPress and comes just four months after 3.1 (which coincidentally just passed the 15 million download mark this morning), reflecting the growing speed of development in the WordPress community and our dedication to getting improvements in your hands as soon as possible. We’re dedicating this release to noted composer and pianist George Gershwin.

Before we get to the release, in anticipation of the State of the Word speech at the upcoming WordCamp San Francisco (the annual WordPress conference) we’re doing a survey or census of the WordPress world. If you have a moment, please fill out this survey and we’ll share what we learn by publishing the aggregate results in August.

The focus for this release was making WordPress faster and lighter. The first thing you’ll notice when you log in to 3.2 is a refreshed dashboard design that tightens the typography, design, and code behind the admin. (Rhapsody in Grey?) If you’re starting a new blog, you’ll also appreciate the fully HTML5 new Twenty Eleven theme, fulfilling our plan to replace the default theme every year. Start writing your first post in our redesigned post editor and venture to the full-screen button in the editing toolbar to enter the new distraction-free writing or zen mode, my personal favorite feature of the release. All of the widgets, menus, buttons, and interface elements fade away to allow you to compose and edit your thoughts in a completely clean environment conducive to writing, but when your mouse strays to the top of the screen your most-used shortcuts are right there where you need them. (I like to press F11 to take my browser full-screen, getting rid of even the OS chrome.)

Under the hood there have been a number of improvements, not the least of which is the streamlining enabled by our previously announced plan of retiring support for PHP4, older versions of MySQL, and legacy browsers like IE6, which allows us to take advantage of more features enabled by new technologies. The admin bar has a few more shortcuts to your most commonly-used actions. On the comment moderation screen, the new approve & reply feature speeds up your conversation management. You’ll notice in your first update after 3.2 that we’ll only be updating the files that have changed with each new release instead of every file in your WordPress installation, which makes updates significantly faster on all hosting platforms. There are also some fun new theme features shown off by Twenty Eleven, like the ability to have multiple rotating header images to highlight all of your favorite photos.

There is way more, like our new freedoms and credits screens (linked from your dashboard footer), so for the full story check out the Codex page on 3.2 or the Trac milestone which includes the 400+ tickets closed in this release.

A Community Effort

We now finally have a credits page inside of WordPress itself (though a cool revision is coming in 3.3), but for posterity let’s give a round of applause to these fine folks who contributed to 3.2:

Aaron Brazell, Aaron Campbell, Aaron Jorbin, Adam Harley, Alex Concha, ampt, Andrew Nacin, Andrew Ozz, andrewryno, andy, Austin Matzko, BenChapman, Ben Dunkle, bluntelk, Boone Gorges, Brandon Allen, Brandon Burke, Caspie, cfinke, charlesclarkson, chexee, coffee2code, Cristi Burcă, daniloercoli, Daryl Koopersmith, David Cowgill, David Trower, demetris, Devin Reams, Dion Hulse, dllh, Dominik Schilling, Doug Provencio, dvwallin, Dylan Kuhn, Eric Mann, fabifott, Franklin Tse, Frumph, garyc40, Glenn Ansley, guyn, hakre, hebbet, Helen Hou-Sandi, hew, holizz, Ian Stewart, Jacob Gillespie, Jane Wells, Jayjdk, Jeff Farthing, Joachim Kudish, joelhardi, John Blackbourn, John Ford, John James Jacoby, JohnONolan, Jon Cave, joostdevalk, Jorge Bernal, Joseph Scott, Justin Sternberg, Justin Tadlock, kevinB, Knut Sparhell, kovshenin, Kuraishi, Lance Willett, linuxologos, lloydbudd, Luc De Brouwer, marcis20, Mark Jaquith, Mark McWilliams, Martin Lormes, Matías Ventura, Matt Martz, Matt Thomas, MattyRob, mcepl, mdawaffe, Michael Fields, MichaelH, michaeltyson, Mike Schroder, Milan Dinić, mintindeed, mitchoyoshitaka, Mohammad Jangda, mrroundhill, natecook, nathanrice, Niall Kennedy, Nick Bohle, Nikolay Bachiyski, nuxwin, Otto, pavelevap, pete.mall, Peter Westwood, Prasath Nadarajah, Ptah Dunbar, Rafael Poveda, Rahe, Ramiy, Rasheed Bydousi, Reuben Gunday, Robert Chapin, Ron Rennick, Ross Hanney, Ryan Boren, Ryan Imel, Safirul Alredha, Samir Shah, saracannon, sbressler, Sergey Biryukov, shakenstirred, Sidney Harrell, Simon Prosser, sorich87, szadok, tetele, tigertech, trepmal, Utkarsh Kukreti, valentinas, webduo, Xavier Borderie, Yoav Farhi, Ze Fontainhas, and ziofix.

Bonus: On their WordPress.org profiles over 20,000 people have said they make their living from WordPress. Are you one of them? Don’t forget to take a minute for our survey.

WordPress 3.2 is going to be released very soon, and we want you to be ready! Take note: the minimum requirements are changing.

PHP and MySQL

As of 3.2, you’ll need to be running PHP 5.2.4 and MySQL 5.0. As we mentioned almost a year ago when we announced that this change was coming, the percentage of people running older versions of PHP and MySQL is relatively low. With more than 45 million people using WordPress, though, even a small percentage can mean a lot of people! Don’t caught with your pants dashboard down — make sure you’re running compatible versions of PHP and MySQL before you update tomorrow when WordPress 3.2 is released.

Log in to your hosting account, and check to make sure you have at least  PHP 5.2.4 and MySQL 5.0. Most of the major hosts already default to these or newer versions, but there are some exceptions. Check to see which versions you are running, and if you’re still on an older version, it should be as simple as changing a dropdown menu and clicking Save to get up to date.

If you don’t know how to find this information in your hosting account or you don’t even know how to access your hosting control panel because someone else manages that for you, don’t fret. You can find out if you’re ready for 3.2 with the Health Check plugin. In your dashboard, go to Plugins → Add New and search for “health check” (it should be the first result). Install it, activate it, and it will tell you if you need to update anything.

If you need more help, contact your host’s customer service and use this email template to ask them to help you.

Hi there. I host my domain [example.com] with you, and I run WordPress on my site. The minimum requirements are changing to PHP 5.2.4 and MySQL 5.0, and I would appreciate your help in confirming that my site’s setup meets these requirements. If I’m currently running an older version of PHP or MySQL, could you update it for me, or tell me how to do it? Thanks so much!

If your host replies that they can’t update to these versions, it might be time to look for a new host.

IE6 and Outdated Browsers

With 3.2, we’re also dropping support for Internet Explorer 6, a 10-years-old outdated browser that even Microsoft is ready to leave behind. From now on, if you access your WordPress dashboard from an outdated browser, we’ll let you know. Why? Because as web technology improves, so does WordPress, as we build features to take advantage of these improvements. If you’re using an out-of-date browser, chances are you’re missing out.

If your browser is out of date, you’ll see a friendly orangey-yellow box in your dashboard letting you know you a newer version is available (which you can dismiss, of course). If you’re using IE6, though, the box will be red, and your dashboard will not function properly. If you’re stuck on IE6 because the computer you use is maintained by a business, library, school, or the like, and you are not able to download a newer browser, here’s a sample email you can use to ask your boss/administrator/IT guys to update the browser.

Hi there. The computer I use at [where you use the computer] is equipped with an out-of-date web browser. Internet Explorer 6 was created 10 years ago, before modern web standards, and does not support modern web applications. More and more sites and applications are dropping support for IE6, including the new version of WordPress. Even Microsoft, the makers of IE6, are counting down until IE6 goes the way of the dinosaur (see http://www.ie6countdown.com/ for more information). Can you please install an updated version of IE or any modern browser (see http://browsehappy.com for more information) on the available computers? Thank you very much.

Welcome to the future!

 

 

Hiring someone new is always a high-impact activity in terms of business. And there are many ways of finding valuable employees. Posting job descriptions on Craigslist is one idea. Relying on word of mouth and recommendations is another. But the online world these days offers a lot more solutions. Hence the list of 16 top websites where you can hire someone without losing your shirt. Check out my guest post at Christine.biz:

Top 16 Places Where You Can Hire Someone Without Losing Your Shirt

Now I have a bonus for you. A place where you can go to find a business partner.

Build It With Me

This site is a little different. It’s not exactly meant to be a place where you can simply hire someone. But rather a place where you can find a partner who can help you with developing your tool, app, or any other software. When you visit the site you’ll see that there are already tens of people looking for developers or designers to help them to put their app-ideas to life. You can easily join this community and post your own entry. The site doesn’t cover any legal aspects of possible partnerships, it’s just a discovery tool.

Related Posts:

Progress on the new SFC continues. Added a new plugin to it this morning: Photos. It’s a simple little plugin, and not pretty yet, but it does work. :)

Here’s a couple of example screenshots:

Facebook Images

The selection screen (not pretty, but functional)

Example of the result

Example of the result


The plugin itself turns out actually to be quite simple. It turns out that adding to the media tabs is fairly straightforward with the existing WordPress functionality, and making links that insert things into the post code is not nearly as difficult as I thought it might be.

You can use the SFC beta version if you like. There’s a copy in the WordPress SVN directories. However, it’s buggy and unfinished and doesn’t have all the same functionality. But most of it works okay. Still needs polish before releasing it.

Note that all development on the old SFC 0.25 has ceased. I’m not making any further patches to it. If you want to upgrade now to the 0.999 beta version, feel free. Also, patches welcome.

WordPress 3.1.4 is available now and is a maintenance and security update for all previous versions.

This release fixes an issue that could allow a malicious Editor-level user to gain further access to the site. Thanks K. Gudinavicius of SEC Consult for bringing this to our attention. Version 3.1.4 also incorporates several other security fixes and hardening measures thanks to the work of WordPress developers Alexander Concha and Jon Cave of our security team. Consult the change log for more details.

Download WordPress 3.1.4 or update immediately from the Dashboard → Updates menu in your site’s admin area.

WordPress 3.2 Release Candidate 3

This release was about all that stood in the way of a final release of WordPress 3.2. So we’re also announcing the third release candidate for 3.2, which contains all of the fixes in 3.1.4; few minor RTL, JavaScript, and user interface fixes; and ensures graceful failures if 3.2 is run on PHP4. As a reminder, we’ve bumped our minimum requirements for version 3.2 to PHP 5.2.4 and MySQL 5.0.

To test WordPress 3.2, try the WordPress Beta Tester plugin (you’ll want “bleeding edge nightlies”). Or you can download the release candidate here (zip). At this stage, plugin authors should be doing final tests to ensure compatibility.

Bonus: For more on what to test and what to do if you find an issue, please read our Beta 1 post.

The Parrot PlaceThe Parrot place is an online pet shop, offering pet supplies, fish food, and specialising in supplies for birds.

It is WordPress-driven, and uses the E-commerce plugin for online sales.

Urban Legend web was contracted to create the collapsible menus on the left side of the site, and to make changes to the backend of the E-commerce plugin to clarify the display of categories. We also helped with some minor styling tweaks to the main menus.