“The need is constant. The gratification is instant.” That’s from the American Red Cross, and it was copy that I plugged into a poster for a blood drive at a comics convention. Sitting beside an image of the sexy and well-endowed Vampirella, the words took on a different meaning. Oops!But I was struck by how these words are a perfect assessment of our society. We want it all, instantly and as cheap as possible. We are a Walmart culture. Fast and cheap have entered our every pore and changed our society, our lives and our livelihoods. Compounding our daily worries and pressures, we now fight to keep our industry professional and profitable. Clients want our blood for free, and the “hacks” are designing us out of existence.Most people blame the laptop and easy-to-use software. Many blame art schools for favoring quantity over quality. Can any of these be blamed merely for doing business? If someone who has no idea what they’re doing wants to purchase a computer and a slew of graphics software and call themselves a designer, then they’re in business. All you need is a computer, software and beard and you are an ARTIST!.. Right? Should we call this “competing in the marketplace” or just “giving it away… and eroding respect for what we do in the process”?Every freelancer who has dared to provide an actual estimate for their work has heard in reply, “I can get it done cheaper.” And the client can. The job, which requires thousands to be done properly, can be delivered for hundreds, and its horridness would never be noticed by the client. They will not notice the lack of a return on their investment or the consumers avoiding their service or the people making sport of their new logo online. And if they do — which would likely happen after they’ve gone out of business for making all the wrong, cheap decisions — they will blame graphic designers. All of us.When a staff designer makes a blunder — even if only a perceived one — all designers need to have a watchful eye. We are the weird kids, the ones who drew pictures in math class while the kids who became marketing directors and account managers told on us. Yes, we need watching.If you ever wondered how the practice of presenting several ideas in a meeting gained such a foothold in our business, just imagine some of the incompetents in the Floogelbinders Guild in the 7th century who really screwed up and codified the practice… before their heads were chopped off and their limbs burned. Ah, the good ol’ days, when they really knew how to maintain professionalism.[Offtopic: by the way, did you know that there is a Smashing eBook Series? Book #2 is Successful Freelancing for Web Designers, 260 pages for just $9,90.]What Exactly Is A “Hack”?Let’s take a look at dictionaries. Hack: noun.A horse used for riding or driving; a hackney.A worn-out horse for hire; a jade.One who undertakes unpleasant or distasteful tasks for money or reward; a hireling.A writer hired to produce routine or commercial writing.A carriage or hackney for hire.A taxicab.Those who responded to my query in social media had great insights and varied opinions on what is a ‘hack’.Wrote one designer:It is not as regulated as other professions, such as interior design and architecture or accounting for that matter. To call oneself a designer, there is no apprenticeship required, no test to pass, no certification to obtain. If you have access to the software, it’s open season.One creative director wrote some very kind words:I view hacks as part of the overall ecology of what drives business when it comes to design and branding. On the one hand, hack has a connotation as it relates to businesses that are starting up or struggling to survive or that simply don’t take design seriously — the kind of business-folk who just look for the lowest bidder. Then there are the sincerely talented designers who simply lack ambition, business savvy or both, and who do not get past five years in their careers. Either situation actually helps cultivate a wonderful ecology of design business, in my opinion.Surprisingly, an editor-in-chief of a well-known news service responded with an outrageous number of typos and grammatical errors (corrected here):Every industry has hacks, but most artists I have met (most, not all) really do strive to be original and to use their imaginations to come up with new ideas. Very few jaded ones will rehash old stuff or try to peddle work that is derivative. It is always “buyer beware” in this case. If the guy seems like a slick used-car salesman, find someone else with whom you can work. On the other hand, artists look out for people who don’t want to sign contracts, people who can’t tell good art from bad, people who can’t make up their minds after being presented with 20 different sketches, and people who will not pay an advance or a set-up fee.A well-known writer, checking in as “misery-loves-company,” added:There are hacks in every discipline. Try working as a professional writer. Anybody with a keyboard and the ability to type can claim this for a calling.A gentleman with the title of “Business Development” added another view that creatives might not hear often:I’ve thought about the definition of hack. It is conceivable that a person with no formal training or someone who did not do well in design school could rise to the top of their profession. They would have to be driven to succeed and committed to quality, I am sure.But there is no guaranteed correlation between the eliteness of one’s education and the quality of their current work.Is “CrowdSourcing” and “Fixed-Price” Online Shops the Future?I was once invited to witness what crowdsourcing could do. I guess I was being lined up for the next firing squad and lured by free pizza. I honestly thought I was attending a gathering of designers at a promotional advertising company. Mmmmm, nope!The owner described the projects, mostly logos, and showed what a source of 8 “designers” could design. Seems that was the unpaid part. The “best designer” would get paid for finishing the project, which might not be his/her logo but a mashup of every design the owner, who now also owned all of the unpaid designs, decided to create…because he was so creative. “That’s a win-win situation” he closed with. I could hear him from the supply room, where I was helping myself to my “out-of-court settlement” for having been dragged to this thing.HOW Magazine’s July issue has an article on crowdsourcing. Quotes from two authors on the subject in that article say:Perhaps, as Debbie Millman writes, this trend does devalue our services. Perhaps, as David Baker observes, it weeds out the low-level clients we shouldn’t be working with, anyway. Is crowdsourcing really “stealing” work from professional designers — or has it simply replaced the quick-print guy and the executive assistants?The editor adds:One answer to that question may be: Let’s reinvent crowdsourcing so it works to the benefit, not the detriment, of both parties in the exchange. Maybe we could invent a way for a small group of designers, vetted for their expertise, to engage with a client, present their ideas, earn compensation for those ideas — and then the designer whose concept is chosen is further paid to fully develop and execute that idea. Talented creatives from all over the globe could participate in a project they would otherwise have no access to. Designers and clients have an opportunity to interact, so the solution isn’t derived in a vacuum (as is often the case with crowdsourcing). Clients can connect with a range of qualified creative thinkers to build their business. It doesn’t have to be cheap. Everyone gets paid. The client chooses the best solution.Aside from other glaring mistakes in the article on business practices, the editor is quite obviously fond of glowing rainbows and unicorns. Every creatives’ guild or organization is against this practice because companies use it to their best advantage financially and people continue to provide work. Those attending this cult-fest of design suggested the same thing the HOW editor outlined, to the crowdsourcing person who called us to the ill-fated meeting. Pay MORE money for the same work? It wasn’t going to happen in non-unicorn world. HOW? How MUCH, is more like it. “Mommy, I hate designer’s guts!” “Shut up and eat!”To their credit, they did mention the position of organizations, which they totally ignored when sprinkling pixie dust on the subject and presenting it to readers who want to know “HOW?”Professional organizations must tread lightly in advocating against unpaid work, as AIGA discovered in the 1990s, when the Federal Trade Commission ruled that any statement or code of ethics that advised members not to work for free amounted to price-fixing. Its current position supports fair compensation for design work, and delineates between spec work (where a creative works for free in hopes of compensation) and unpaid work like pro-bono projects or internships (where services are willingly given away). The Graphic Artists Guild warns its members against competitions where the sponsoring organization retains all rights to all submissions, and helps creatives avoid unfavorable contracts.Surprisingly, Forbes aired an article on crowdsourcing and of course, the self-appointed “capitalist tool,” seemed more impressed with it as a business model, rather than a threat to an industry. To be fair, they were balanced in exploring a few quotes echoed by other professionals in the field.Mix crowdsourcing, the Internet and a huge pool of underemployed graphic designers, and the outcome is a company that’s grabbed a great deal of attention. In the two and a half years since it launched, Web startup 99designs out of Melbourne, Australia, boasts that it’s helped to broker 48,000 graphic design projects for big name clients like Adidas and DISH Network as well as for thousands of small businesses.Personally, I’ll be sure to remember that when I need new sneakers or satellite TV service. Will other creatives?Acting as a middleman between business owners and graphic designers, the 99designs site hosts contests in which clients post their needs — website design, logos, print packages — and designers compete to fill them. Instead of bidding for the job, designers submit finished work tailored to the client specifications in the contest listing. 99designs calls it a win-win scenario: Its clients gain access to the site’s pool of 73,000 active designers, while the designers are given a chance to compete for “upwards of $600,000 in awards paid out monthly.”So, if my math is correct and every one of the 73,000 designers won just one competition a month, each would get $8.22. Sure not every one will win with the four to six entries they must submit to each contest…assignment…act of piracy on the high digital seas…whatever, so some designers will get $16.44 or maybe $32.88 per month? If I lived in Bali…and was stealing someone else’s electricity, I could live well. Well…live.“99designs is something akin to a Walmart,” says Dan Ibarra, industry veteran and co-founder of Aesthetic Apparatus, a Minneapolis design studio. “It’s not necessarily dedicated to bringing you good work, but to bring you a lot of it. That’s not necessarily better.”Ibarra’s thoughts echo the general response from designers to a 2009 article Forbes ran on a 99designs look-alike called Crowdspring.com. Many critics of Crowdspring’s business model directed readers to NO!SPEC.com, an online campaign dedicated to educating the public about the risks of speculative work — which is, as defined by NO!SPEC, work in which the designer “invests time and resources with no guarantee of payment,” a “huge gamble” for designers competing against thousands of others.Other professionals I have spoken with on the subject feel it’s just not a threat to the “design experience” or the “personal touch.” Several feel it just separates the serious design clients from the casual small business.You have to remember that everything is consumer driven. What I mean is that the consumer is the one that dictates how we set our prices. If a consumer is unwilling to spend $100.00 for an original work verses spending $50.00 for one located on-line…what can you really do?I really hope that it’s not. I think (and hope) that there will always be a market for those of us who don’t have quite a structured pricing plan, and who are willing to pay more for quality instead of quantity.I’m still waiting for the day graphic design is held in the same regard as auto mechanics and plumbers… you don’t get fixed rates with them, and they’ll laugh at you if you ask for it. There’s a price for parts and and an hourly rate for service, end of discussion. You can give a flat rate by estimating (to yourself) how many hours it will take and then padding that for how many revisions the client will ask for. If you fall short, remember that the next time, but don’t penalize the client. Keep good records of your time. And… you obviously can’t charge the same fee for logo design for a company on the scale of Coca Cola as you would for Joe’s Landscaping down the street. It’s a different value to each. Large corporations get much more use and ROI from a logo than a one man show. That’s my story and I’m sticking to it.With regards to fixed vs hourly, we almost always do fixed. Even on big application development projects. Sure, there are concerns with client requestitis and scope creep but thats part of the consideration. With hourly you are always guaranteed to be punished for your efficiency and experience by getting paid less.As for cheapo logos and web templates? Go for it I say. It’s nothing new. The clients that find that type of thing valuable are the ones I don’t have the time to educate on the real value of thoughtful design.It’s the future for clients that have a “checkbox mentality”, where a logo, a brochure, a website, are just things on a list to check off, rather than key elements of their business strategy.Those clients have never been good clients. They’ve never paid well, or been good to work for. For a brief time, as design exploded and became available to businesses that couldn’t afford it previously, they had to buy more than they wanted, and employ real designers. Now that the supply of “designers” has also exploded, these design-blind clients can buy what they actually want, which is a cheap template with their words and photos stuck in it.They’ve never wanted real design, the market has evolved to give them what they want.The market for clients that do want real design is still there, and still very profitable for designers with the right skills and talents. But the bar for that market is very high, and people that can’t reach it are stuck in a no man’s land between the heights of success and the pits of mass-produced junk design.Since clients have variable needs and budgets, there is definitely room in the marketplace to offer low-cost design services online. The clients who use these online design resources may not be a good fit for those of us who are answering this question, but they have a need with a tight budget and online creative services seem to fulfill that need.Traditionally, junior designers and recent graduates have had access to the low budget projects more experienced individuals have passed on. I think the online sites provide a similar outlet. Students may benefit from putting their hat in an online ring to get experience – especially when they will (most likely) be charging similar low rates. Established creatives and businesses probably have other methods of finding work (the Internet is a great tool for getting business, but does not replace all other traditional marketing/networking/prospecting) so I do not think fixed-price online creative sites will completely ruin our ability to maintain a viable business.Does Art School Make You A Professional?Being an art school drop-out myself (12 credits shy, and going back over a decade later to get them) and having much success without a degree, I naturally understand this point about art school. Many echoed this sentiment: that creativity has nothing to do with a degree. I was teaching at Parson’s School of Design long before I went back to take the four art history classes I needed to graduate. My work for major corporations did, however, require a four-year degree. Guess the “accomplishment level” can mean something. Ah! but is it art? “HA! As the sole surviving creative, I can charge $50 for a logo!” (it’ll still be argued down to $20).It is a popular major, though, as one designer noted:I asked nearly the same question to the owner of the art college I eventually graduated from: “Do you think similar two-year programs are flooding the market with graphic designers?” His answer was a resounding “No,” and he followed that with, “Talented artists will always find work when untalented artists don’t.” With the designers I’ve met or worked with and the ones I’ve read about, I’d have to I agree.Naturally, sticks and stones were thrown:From what I understand from meeting other students, the quality of education is lacking. Apparently, many educators simply like to take home a pay check for doing the least amount of work. A lot of the students suffer from not having any mentorship from a qualified teacher. However, the top students always find their way through the educational maze to get the cheese.Should art schools teach online fixed-price business to students? Most people say, “no!” Shouldn’t an art school prepare a student to enter the field from day one with all the material and professional skills needed to enter the field as a peer and not a “hack” who lowers the bar for fees and professional demeanor?Mediocrity runs rampant in today’s society. I don’t think design schools should teach the principles of online stores but make their students aware of what is out there and what they will come up against in the real world. Unfortunately many will go that way. But a true designer is worth their weight in gold, and will always cost more than Walmart pricing.I’m sorry but I’m still laughing too hard at keeping a straight face while typing about art schools training students to enter the field. Pile on the insults as you will but I rarely see graduating portfolio shows that aren’t frightful, not due to the talent, but to their ideas on what they expect once they graduate. Several months ago I received a request for an essay of 2,500-5,000 words a dean at a Chicago art school wanted to “relay” to students. Naturally he was shocked I wanted to be paid. Guess those students stepped into a world of do-do. As a student commented on the question of fixed-price:There are some pros and cons for hourly and fixed. However really as a designer you might benefit more from fixed pricing. Example: You design a logo at $20 an hour. Let’s say for the first time you do this logo it takes you 5 hours.The next time you do the logo, you get it done in half the time. 2.5 hours. You just cut your profit in half. Now the designers that are charging $50, should wake up and realize there offering a service that is worth WAY more than what they are charging.In the beginning of starting my own design business I charge fairly cheap as well. I wanted to build a portfolio and clientele list. Once I had references and a portfolio to show, my rate can go up, because I can prove I’m worth it.Yes, $20 an hour and $50 logos will shore up the prices she was going to command one day. No, it will set the bar with anyone you quote those prices to while I’m trying to charge a fair market rate. You have lowered that fair rate. Thanks for learning how to run a business within an unlicensed industry that relies on a standard of practice not being taught anywhere. AAAAAAAH! I’m still wondering what kind of logo is created in 2.5 hours. Oh, a “hack” one!A Solution To Reconcile These Views?Would a guild or union distinguish between an apprentice, a tradesperson and a master craftsperson? Some have tried. Years ago, I was a member of the board of the Graphic Artists Guild, along with several legal rights groups for artists. The prospect of unionizing was a constant buzz. Every meeting, time was set aside for the subject. There was discussion of joining established unions if no plan could be found to successfully create a union hierarchy and stop those who do not belong dead in their tracks. Neither plan would ever work.Unions on the whole no longer have the clout or power they once commanded. The removal of organized crime really hurt them. The mob knew how to get things done. Now politicians try to do the same but without any efficiency. No union would take on the cause of an entire industry with so many holes as ours. No organization could ever stop the incursion of single-person home studios and $99 logos… or the equivalent on the Internet. “Billy tried unionizing his art class in school. The other kids were heavily punished. I hope they learned a lesson, too!”In an effort to establish standards and set pay levels for professional positions and freelance projects, the Graphic Artists Guild publishes a annual book entitled The Pricing and Ethical Guidelines. I highly recommend it to those starting out. It’s loaded with contracts, pricing, rights and considerations we must all apply to every job, so that both parties come out of a project eager to work together on the next one.We are an unregulated business — anyone can join. I believe had we adopted the tactics of organized crime, we would be living the life of Las Vegas celebrities, and I get to be Elvis! Family heads, lieutenants, enforcers — face it, the mob gets things done. Can you imagine an enforcer negotiating with a client? Many years ago I tried pitching a comic feature to design magazines about a mob boss in the witness protection program, set up in a secret identity as an illustrator’s representative. “Zip Atoné & the Bull Pen Boys” was Goodfellas meets the publishing/advertising world.Client: “I don’t sign contracts!”Zip Atoné: “Well, that’s too bad because either your signature or brains is gonna be on that contract when I leave!”Wouldn’t that be great!? Back to reality…Design Contests Erode The IndustryThe Graphic Artists Guild, along with every other professional creative organization, is against “contests,” in which the creative submits a design, illustration or photo (which become the property of the contest runner) in the hope of winning some measly prize that is not even worth the fee their work would have earned in the open market. But these contests get floods of entries. Who are the people who enter them? AIGA has a form letter on its website encouraging people to post when contests come up. A noble effort.These contests are not advertised on cereal boxes. They appear in the inboxes of creatives. They are advertised on design blogs and websites. They are run by the same corporations that earn millions by selling us burgers and sodas every day. So, winning an iPod seems like a fair trade-off… in Bizzarro World! Getting our money and putting toxins in our bodies just isn’t enough for them.Your “prize” is equal to what this costs…a stroke and your eternal soul!In the end, we are the regulators of our own unregulated industry. If business is this cut-throat, then are we being lax by not making the removal of hacks and crowdsourcers from the industry our primary concern, or have they been doing the same to us, successfully, and we didn’t see it until it was too late? Does it just provide a cheap alternative for customers who don’t know quality, branding, marketing, customer appeal and retention? If, as mentioned in the article on Forbes, big companies are now getting into crowdsourcing, is there to be any leverage for freelancers or design and development firms?We will never be unified by a union or organization but we can listen to our peers either through networking or organizations like AIGA and the GAG for some semblance of order. The experienced creatives need to mentor those entering the field. Art schools need to focus on business and professional practices as much as technique and other creative skills. There will continue to be clients that want it for nothing and will get what they don’t pay for. There will be plenty who understand the need for quality and that it costs a fair wage, sort of. Please, just keep the previous from calling me!(al)© Speider Schneider for Smashing Magazine, 2010. | Permalink | Post a comment | Add to del.icio.us | Digg this | Stumble on StumbleUpon! | Tweet it! | Submit to Reddit | Forum Smashing Magazine Post tags: designers, hacks, professionalism
-
I posted to smashingmagazine.com
Designers, “Hacks” and Professionalism: Are We Our Own Worst Enemy?
http://feedproxy.google.com/~r/SmashingMagazine/~3/37caI2B4CUs/
- Tags:
- design
- hacks
- designers
- professionalism
August 3 2010, 5:11am | Comments »
-
I posted to smashingmagazine.com
10 Killer WordPress Hacks
http://www.smashingmagazine.com/2009/01/07/10-killer-wordpress-hacks/
by Jean-Baptiste Jung 2008 was a very good year for the WordPress community. The software was updated numerous times, leading to the recent release of version 2.7, and many new blogs dedicated to WordPress were created. Of course, tons of new hacks were discovered, which helped lots of bloggers enhance their blogs. In this article, we’ll show you 10 new useful killer WordPress hacks to unleash the power of your favorite blogging engine. Each hack has an accompanying explanation, so you’ll not only unleash the power of WordPress but also understand how it works. 1. Display AdSense Ads to Search Engines Visitors Only
The problem. It’s a known fact that regular visitors don’t click on ads. Those who do click on ads are, 90% of the time, visitors coming from search engines. Another problem is Google’s “smart pricing.” Being smart priced means that your click-through rate (CTR) is low and the money you earn per click is divided by between 2 and 10. For example, if a click would normally earn you $1.00, with smart pricing it could earn you as little as $0.10. Painful, isn’t it? Happily, this solution displays your AdSense ads to search engine visitors only, which means more clicks and a higher CTR. The solution.
Open the functions.php file in your theme. Paste the following code in it: function scratch99_fromasearchengine(){ $ref = $_SERVER['HTTP_REFERER']; $SE = array('/search?', 'images.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.'); foreach ($SE as $source) { if (strpos($ref,$source)!==false) return true; } return false; }
Once done, paste the following code anywhere in your template where you want your AdSense ads to appear. They’ll be displayed only to visitors coming from search engine results: if (function_exists('scratch99_fromasearchengine')) { if (scratch99_fromasearchengine()) { INSERT YOUR CODE HERE } }
Code explanation. This hack starts with the creation of a function called scratch99_fromasearchengine(). This function contains a $SE array variable in which you can specify search engines. You can easily add new search engines by adding new elements to the array. The scratch99_fromasearchengine() then returns true if the visitor comes from one of the search engines containing the $SE array variable. Sources:
How to Display Ads Only to Search Visitors How to: Display AdSense to search engine visitors only
- Avoid Duplicate Posts in Multiple Loops
The problem. Due to the recent popularity of “magazine” themes, there’s a high demand from WordPress users who use more than one loop on their blog home page for a solution to avoiding duplicate posts on the second loop. The solution. Here’s a simple solution to that problem, using the power of PHP arrays.
Let’s start by creating a simple PHP array, and put all post IDs from the first loop in it. <h2>Loop n°1</h2>
<?php $ids = array(); while (have_posts()) : the_post(); the_title(); ?> <br />
<?php $ids[]= $post->ID; endwhile; ?>
Now, the second loop: we use the PHP function in_array() to check if a post ID is contained in the $ids array. If the ID isn’t contained in the array, we can display the post because it wasn’t displayed in the first loop. <h2>Loop n°2</h2> <?php query_posts("showposts=50"); while (have_posts()) : the_post(); if (!in_array($post->ID, $ids)) { the_title();?> <br /> <?php } endwhile; ?>
Code explanation. When the first loop is being executed, all IDs of posts contained within it are put into an array variable. When the second loop executes, we check that the current post ID hasn’t already been displayed in the first loop by referring to the array. Source:
How to: Use two (or more) loops without duplicate posts
- Replacing “Next” and “Previous” Page Links with Pagination
The problem. By default, WordPress has functions to display links to previous and next pages. This is better than nothing, but I don’t understand why the folks at WordPress don’t build a paginator by default. Sure, there are plug-ins to create pagination, but what about inserting it directly in your theme? The solution. To achieve this hack, we’ll use the WP-PageNavi plug-in and insert it directly in our theme.
The first thing to do, obviously, is download the plug-in. Unzip the plug-in archive on your hard drive, and upload the wp-pagenavi.php and wp-pagenavi.css files to your theme directory. Open the file that you want the pagination to be displayed in (e.g. index.php, categories.php, search.php, etc.), and find the following code:
<div class="navigation"> <div class="alignleft"><?php next_posts_link('Previous entries') ?></div> <div class="alignright"><?php previous_posts_link('Next entries') ?></div> </div> Replace this part with the code below: <?php include('wp-pagenavi.php'); if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
Now we have to hack the plug-in file. To do so, open the wp-pagenavi.php file and find the following line (line #61): function wp_pagenavi($before = '', $after = '') { global $wpdb, $wp_query; We have to call the pagenavi_init() function, so let’s do it this way: function wp_pagenavi($before = '', $after = '') { global $wpdb, $wp_query; pagenavi_init(); //Calling the pagenavi_init() function
We’re almost done. The last thing to do is to add the wp-pagenavi style sheet to your blog. To do so, open up header.php and add the following line: <link rel="stylesheet" href="<?php echo TEMPLATEPATH.'/pagenavi.css';?>" type="text/css" media="screen" />
Code explanation. This hack mostly consists of simply including the plug-in file directly in the theme file. We also had to add a call to the pagenavi_init() function to make sure the pagination would be properly displayed. Source:
How to: Integrate pagination in your WordPress theme
- Automatically Get Images on Post Content
The problem. Using custom fields to display images associated with your post is definitely a great idea, but many WordPress users would like a solution for retrieving images embedded in the post’s content itself. The solution. As far as we know, there’s no plug-in to do that. Happily, the following loop will do the job: it searches for images in post content and displays them on the screen.
Paste the following code anywhere in your theme. <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?>
<?php $szPostContent = $post->post_content; $szSearchPattern = '~<img [^\>]*\ />~';
// Run preg_match_all to grab all the images and save the results in $aPics preg_match_all( $szSearchPattern, $szPostContent, $aPics );
// Check to see if we have at least 1 image $iNumberOfPics = count($aPics[0]);
if ( $iNumberOfPics > 0 ) { // Now here you would do whatever you need to do with the images // For this example the images are just displayed for ( $i=0; $i < $iNumberOfPics ; $i++ ) { echo $aPics[0][$i]; }; };
endwhile; endif; ?>
Code explanation. The above code basically consists of a simple WordPress loop. The only difference is that we use PHP and regular expressions to search for images within the post’s content instead of simply displaying posts. If images are found, they’re displayed. Sources:
Manipulate images from WordPress post content with regular expressions How to: Retrieve images in post content
- Create a “Send to Twitter” Button
The problem. Are you on Twitter? If so, we’re sure you know how good this service is for sharing what you find interesting online with your friends. So, why not give your readers a chance to directly send your posts’ URLs to Twitter and bring you some more visitors? The solution. This hack is very simple to achieve. The only thing you have to do is to create a link to Twitter with a status parameter. Because we’re using a WordPress blog, we’ll use the function the_permalink() to get the page URL: <a href="http://twitter.com/home?status=Currently reading <?php the_permalink(); ?>" title="Click to send this page to Twitter!" target="_blank">Share on Twitter</a> Pretty easy, isn’t it? But pretty useful too, in our opinion. Source:
How to: Create a “Send this to Twitter” button
Related plug-in:
Twitter tools
- Using Normal Quotes Instead of Curly Quotes
The problem. If you’re a developer who often publishes code snippets on your website, you have probably encountered the following problem: a user tells you that the code you posted doesn’t work. Why? Simply because, by default, WordPress turns normal quotes into so-called “smart quotes,” which breaks code snippets. The solution. To get rid of theses curly quotes, proceed as follows:
Open the functions.php file in your theme. If that file doesn’t exist, create it. Paste the following code: <?php remove_filter('the_content', 'wptexturize'); ?>
Save the file, and say goodbye to broken code snippets!
Code explanation. The wptexturize() function automatically turns normal quotes into smart quotes. By using the remove_filter() function, we tell WordPress that we don’t want this function to be applied to a post’s content. Source:
How to get rid of curly quotes in your WordPress blog
- Deny Comment Posting to No Referrer Requests The problem. Spam is a problem for every blogger. Sure, Akismet is there to help, but what about preventing spam just a bit more? The following code will look for the referrer (the URL from where the page was called) when the wp-comments-post.php file is accessed. If a referrer exists, and if it is your blog’s URL, the comment is allowed. Otherwise, the page will stop loading and the comment will not be posted. The solution. To apply this hack, simply paste the following code into your theme’s function.php file. If your theme doesn’t have this file, just create it. function check_referrer() { if (!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == “”) { wp_die( __('Please enable referrers in your browser, or, if you\'re a spammer, bugger off!') ); } }
add_action('check_comment_flood', 'check_referrer'); Source:
How to: Deny comment posting to no referrer requests
- Using CSS Sliding Doors in WordPress Navigaton
The problem. The built-in wp_list_pages() and wp_list_categories() functions allow lots of things, but they do not allow you to embed a <span> element so that you can use the well-known CSS sliding-doors technique. Happily, with some help from PHP and regular expressions, we can use this awesome technique on a WordPress blog. Due to the number of tutorials on CSS sliding doors, we’re not going to explain how it works here; consider reading this excellent article if you need to know more about the technique. To view a live demo of this example, click here and refer to the main menu.
Create the images you need, and then edit the style.css file in your WordPress theme. Here is an example:
nav a, #nav a:visited {
display:block; }
nav a:hover, #nav a:active {
background:url(images/tab-right.jpg) no-repeat 100% 1px; float:left; }
nav a span {
float:left; display:block; }
nav a:hover span {
float:left; display:block; background: url(images/tab-left.jpg) no-repeat 0 1px; }
Now it is time to edit the header.php file. Simply copy and paste one of the following codes, according to your needs:To list your pages: <ul id="nav"> <li><a href="<?php echo get_option('home'); ?>/"><span>Home</span></a></li> <?php echo preg_replace('@\<li([^>])>\<a([^>])>(.?)\<\/a>@i', '<li$1><a$2><span>$3</span></a>', wp_list_pages('echo=0&orderby=name&exlude=181&title_li=&depth=1')); ?> </ul> To list your categories: <ul id="nav"> <li><a href="<?php echo get_option('home'); ?>/"><span>Home</span></a></li> <?php echo preg_replace('@\<li([^>])>\<a([^>])>(.?)\<\/a>@i', '<li$1><a$2><span>$3</span></a>', wp_list_categories('echo=0&orderby=name&exlude=181&title_li=&depth=1')); ?> </ul>
Code explanation. In this example, we make use of the echo=0 parameter in the wp_list_pages() and wp_list_categories() functions, which allows you to get the result of the function without directly printing it on the screen. Then, the result of the function is used by the PHP preg_replace() function and finally displayed with <span> tags added between the <li> and <a> tags. Source:
CSS Techniques: Using Sliding Doors with WordPress Navigation
- Display a Random Header Image on Your WordPress Blog
The problem. This is not really a problem, but many WordPress users would love to be able to display a random header image to their readers. The solution.
Once you have selected some images to be your header images, name them 1.jpg, 2.jpg, 3.jpg and so on. You can use as many images as you want. Upload the images to your wp-content/themes/yourtheme/images directory. Open header.php and paste the following code in it: $num = rand(1,10); //Get a random number between 1 and 10, assuming 10 is the total number of header images you have <div id="header" style="background:transparent url(images/.jpg) no-repeat top left;">
You’re done! Each page or post of your blog will now display a random header image.
Code explanation. Nothing hard here. We simply initialized a $num variable using the PHP rand() function to get a random number between 1 and 10. Then, we concatenate the result of the $num variable to the path of the theme we are using. Source:
How to: Display a random header image
- List Your Scheduled Posts
The problem. Like many bloggers, you probably want your readers to visit your blog more often or subscribe to your RSS feed. A good way to make them curious about your future posts is by listing the titles of your scheduled posts. The solution. Open any of your theme files and paste the following code: <?php $my_query = new WP_Query('post_status=future&order=DESC&showposts=5'); if ($my_query->have_posts()) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <li><?php the_title(); ?></li> <?php endwhile; } ?> Code explanation. In this code, we have created a custom WordPress query using the WP_Query class to send a database query and fetch the five most recent scheduled posts. Once done, we use a simple WordPress loop to display the posts’ titles. Sources:
How to: List scheduled posts Den Leser in die Zukunft blicken lassen
About the author This guest post has been written by Jean-Baptiste Jung, a 26-year-old blogger from Belgium who blogs about WordPress at WpRecipes and about everything related to blogging and programming at Cats Who Code. You can stay in touch with Jean by following him on Twitter. (al)
January 7 2009, 11:51am | Comments »
-
I posted to smashingmagazine.com
8 Useful WordPress SQL Hacks
http://www.smashingmagazine.com/2008/12/18/8-useful-wordpress-sql-hacks/
By Jean-Baptiste Jung Over the past 10 years, the MySQL database has become incredibly popular on the Web. Every WordPress blog is driven by a MySQL database, which contains the blog’s posts, settings, comments and much more. While plug-ins and even coding hacks can solve some problems and achieve some tasks, sometimes you don’t have any other choice than to execute SQL commands in phpMyAdmin or directly to the database via SSH. Let’s take a look at 8 useful SQL hacks for WordPress. Each section of this post presents a problem, suggests a solution and provides an explanation to help you understand the solution. 1. Creating a Backup of Your Database
The problem. While the tips in the rest of this post have been tested, you should definitely not try any of them without first having a proper backup of your MySQL database. The solution. To create a manual backup of your WordPress database, follow these simple steps:
Log in to phpMyAdmin and select your WordPress database. Once done, click the “Export” button located in the horizontal menu. Choose a compression method (personally, I use gzip), and click the “Execute” button. Your browser will ask you if you want to download the backup. Of course, select “Yes,” and then store it on your hard drive.
Explanation. Note that creating a backup of your WordPress database can be more easily executed with the WP-DB-Backup plug-in. WordPress users should install this plug-in if they have not yet done so and create regular backups of their data. 2. Batch Delete Post Revisions
The problem. Post revisions, a new WordPress 2.6 feature, can be very useful, but they also increase the size of your MySQL database. Sure, you can manually delete posts revisions, but that’s very long and boring work. The solution. The solution to this problem is simple: we batch delete post revisions by using a simple SQL query. The result can be almost unbelievable if you have a lot of posts: Your database size will be reduced by half!
Log in to phpMyAdmin and select your WordPress database. Click the “SQL” button. Paste the following code in the SQL command window: DELETE FROM wp_posts WHERE post_type = "revision";
You’re done. Depending on how many posts you had in your WordPress database, you may have saved lots of precious space!
Code explanation. The wp_posts table has a field named post_type. This field can have one of many values, such as “post,” “page” or “revision.” When we want to get rid of post revisions, we simply run a command to delete any entry in the wp_posts table in which the post_type field is equal to “revision.” Source:
How to: Batch delete post revisions
- Erase 5000 Spam Comments in a Second
The problem. True story: a friend of mine recently created his own blog and started to promote it everywhere on the Internet. After some weeks of intensive work, he spent some days on vacation without Internet access. When he came back home, he looked at his blog and saw… 5000+ comments awaiting moderation! Of course, most of them were spam, but he was actually about to check them all to make sure he did not delete a valid comment made by one of his regular readers. The solution. Happily, my friend told me about his spam problem. He had already spent 45 minute manually deleting spam when I showed him this useful SQL tip.
Log in to phpMyAdmin and select your WordPress database. Click the “SQL” button. Paste the following code in the SQL command window: DELETE from wp_comments WHERE comment_approved = '0';
Goodbye bad comments! Enjoy your spam-free database!
Explanation. The wp_comments table contains a field named comment_approved, which is a boolean value (1 or 0). Approved comments have a value of 1, and comments awaiting moderation have a value of 0. By running the above command, we simply delete any comments that haven’t been approved yet. Be careful. While this solution can be pretty useful if you have millions of spam comments to delete, it will also erase valid unapproved comments. If you don’t already use Akismet, install it now to prevent spamming. Source:
Mark asked: How to batch delete spam comments on a WordPress blog?
- Change the Post Attribution
The problem. When you installed WordPress, an “admin” account was created. Some bloggers make the mistake of using that account to write their posts, until they realize that it’s not personal at all. The solution. Modifying author attribution on each post takes a lot of time. Happily, SQL can help you get things done:
Log in to your phpMyAdmin and select your WordPress database. First, we have to get the right user IDs. To do so, open the SQL command window and execute the following command: SELECT ID, display_name FROM wp_users;
phpMyAdmin will display a list of user IDs associated with WordPress users. Let’s say that NEW_AUTHOR_ID is the ID of the more recently created author, and OLD_AUTHOR_ID is the original admin account ID. After you swap the NEW_AUTHOR_ID and OLD_AUTHOR_ID IDs, run the following command: UPDATE wp_posts SET post_author=NEW_AUTHOR_ID WHERE post_author=OLD_AUTHOR_ID;
That’s all. All posts previously attributed to admin are now attributed to whichever valid user you have selected.
Source:
How to: Change author attribution on all posts at once
- Manually Reset Your Password
The problem. In order to protect their blogs, people often pick strong passwords, such as u7*KoF5i8_. Of course, this is a good thing, but I have heard many stories of forgotten admin passwords. The solution. When you lose your password, WordPress can email you a link to reset it. But if you don’t have access to the email address recorded in the WordPress database anymore, or if you prefer just running a simple command instead, here is the hack.
Log in to your phpMyAdmin, select your WordPress database and open the SQL window. Insert the following command (assuming your username is “admin”): UPDATE
wp_usersSETuser_pass= MD5('PASSWORD') WHEREwp_users.user_login=adminLIMIT 1;You’re done. Your password has been successfully replaced by whatever you inserted in space above marked “PASSWORD.”
Explanation. User passwords are stored in the wp_users table. Of course, an MD5 hash is used to secure the password. We have to set up an “UPDATE” SQL request and use the built-in MD5() MySQL function to convert our password to MD5 and then update it. The “WHERE” clause ensures that we’re updating only the admin’s password. The same request without the “WHERE” clause would result in all passwords being updated! Source:
WordPress: How to reset a password manually
- Change Your WordPress Domain Name
The problem. Although it is not recommended, you may want at some point to change your domain name while keeping your blog and its data. Because WordPress records your domain name in the database, you have to change the database in order to connect your new domain name to your WordPress blog. The solution.
You guessed it: the first thing to do is log in to your phpMyAdmin and select your WordPress database. Click the “SQL” button to open the SQL command window. In order to change your WordPress URL, execute this first command: UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsite.com', 'http://www.newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl';
Then, we have to replace the relative URL (guid) of each post. The following command will do that job: UPDATE wp_posts SET guid = replace(guid, 'http://www.oldsite.com','http://www.newsite.com');
We’re almost done. The last thing to do is a search and replace in the wp_posts table to make sure that no absolute URL is still here: UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldsite.com', 'http://www.newsite.com');
You’re done. You should be able to log in to your WordPress dashboard using your new URL.
Explanation. To easily change our WordPress domain name, I took advantage of the super-useful MySQL function “replace,” which allows you to replace one term by another. Source:
Changer le nom de domaine d’un blog Wordpress sans encombres
- Display the Number of SQL Queries on Your blog
The problem. When trying to optimize your blog’s loading time, knowing the number of queries made to the database is important. In order to reduce queries, the first thing to know is how many queries are made on a single page. The solution.
This time, no need to log in to phpMyAdmin. Simply open the footer.php file in your theme and append the following lines of code: <?php if (is_user_logged_in()) { ?> <?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds. <?php } ?>
Save the file and visit your blog. In the footer, you’ll see the number of queries made to the WordPress database as well as the time it took to make them.
Explanation. Seems that many WordPress users aren’t aware of this useful function. The get_num_queries() function returns the number of executed queries during a page load. Note that the above code will only display the number of queries to logged-in users, because regular visitors and search engine bots don’t need to know about it. But, if you’d like to make it public, simply remove the if (is_user_logged_in()) conditional instruction. Source:
How to: Display page loading time + number of queries
- Restore Your WordPress Database
The problem. Let’s say, for some reason, such as a hacking or upgrade problem, you have lost your blog data or it has become corrupted. If you have a backup (and I hope you do!) you will have to import it to your WordPress database. The solution.
Log in to phpMyAdmin and select your WordPress database. Click the “Import” button in the horizontal menu. Click the “Browse” button and select the most recent database backup on your hard disk. Click the “Execute” button. If everything went well, your WordPress database is fully functional again.
About the author Jean-Baptiste Jung, a 26-year-old blogger from Belgium, blogs about WordPress at WpRecipes and about everything related to blogging and programming at Cats Who Code. You can stay in touch with Jean by following him on Twitter. (al)
December 18 2008, 3:35pm | Comments »
-
I posted to smashingmagazine.com
10 Useful RSS-Tricks and Hacks For WordPress
http://www.smashingmagazine.com/2008/12/02/10-useful-rss-hacks-for-wordpress/
By Jean-Baptiste Jung RSS is one of those technologies that are extremely simple yet extremely powerful. Currently, RSS is the de facto standard for blog syndication, and it is used widely in both personal and corporate settings; for example, in blogs. And because a large percentage of these blogs run on WordPress, we’ll cover in this post some (hopefully) relatively unknown but useful RSS-related tricks and hacks that will help you use RSS in a more effective way — and without unnecessary and chunky WordPress plug-ins. Let’s take a look at 10 useful, yet rather unknown RSS-tricks for WordPress. Each section of the article presents a problem, suggests a solution and provides you with an explanation of the solution, so that you can not just solve some of your RSS-related problems but also understand what you are actually doing. Thus, you can make sure your WordPress theme remains under your control and is not bloated with some obscure source code. 1. Control When Your Posts are Available via RSS
The problem. Have you ever published an article and then immediately noticed an error? Sure, you can edit it, but there’s another problem: the article has already been published in your RSS feed. To avoid this kind of problem, use this recipe to create a delay between the publication of a post and its availability in your RSS feed. The solution. To apply this hack, simply paste the following code into your theme’s function.php file. If your theme doesn’t have this file, just create it. function publish_later_on_feed($where) { global $wpdb;
if ( is_feed() ) { // timestamp in WP-format $now = gmdate('Y-m-d H:i:s');
// value for wait; + device $wait = '5'; // integer
// http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timestampdiff $device = 'MINUTE'; //MINUTE, HOUR, DAY, WEEK, MONTH, YEAR
// add SQL-sytax to default $where $where .= " AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait "; } return $where; }
add_filter('posts_where', 'publish_later_on_feed'); Code explanation. The above code will add a 5-minute delay to the time between when your post is published on your blog and when it appears in your RSS feed. To change the length of the delay, change the value of the $wait variable on line 9. Sources
Publish your feed later
- Redirecting WordPress Feeds to FeedBurner Feeds
The problem. Beginner bloggers usually start to use FeedBurner only after they have seen it used on many other blogs and realize how useful and cool this tool is. They sign up and start to use it, but their early readers are already subscribed to their default WordPress feed. Another problem: do you often change your theme? If so, you must be bored having to edit each call to bloginfo(’rss2_url’) and replace it with your FeedBurner feed’s URL. The solution. The solution to both problems described above is simple: use server redirections.
Create a backup of your .htaccess file, located in the root of your Web server. Edit the .htaccess file and add the following code. Don’t forget to modify the feed’s URL with your own feed’s URL.
temp redirect wordpress content feeds to feedburner
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_USER_AGENT} !FeedBurner [NC] RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC] RewriteRule ^feed/?([_0-9a-z-]+)?/?$ http://feeds.feedburner.com/wprecipes [R=302,NC,L] </IfModule>
Save the file. You’re done!
Code explanation. Each time someone clicks on a link to http://www.yourblog.com/feed, he or she will be redirected to http://feeds.feedburner.com/yourblog. This way, you will have never lost an RSS subscriber, and even if you change your theme twice a day, you’ll never have to manually edit your RSS feed links again. Sources
Redirect WordPress feeds to FeedBurner via htaccess (Redux) How to: redirect WordPress RSS feeds to FeedBurner with .htaccess
- Insert Ads (or Anything Else) in Your RSS Feed
The problem. Monetizing RSS feeds is currently becoming a common practice, and many blog owners do it to maximize their income. FeedBurner can insert AdSense ads into your feed items, but you need at least 500 subscribers to qualify, and you can’t use any ads other than the AdSense ads provided by FeedBurner. The solution. It is possible, though, to insert other kinds of ads into your RSS feed. You can, for example, use a link to a free WordPress theme only for your RSS subscribers. Follow these simple steps to perform this hack:
Edit the functions.php file of your theme. If your theme doesn’t have a functions.php file, simply create one. Paste the following code into your functions.php file: <?php function insertAds($content) { $content = $content.'<hr /><a href="http://www.wprecipes.com">Have you visited WpRecipes today?</a><hr />'; return $content; } add_filter('the_excerpt_rss', 'insertAds'); add_filter('the_content_rss', 'insertAds'); ?>
Save the file. You’re now displaying your ads in your RSS feed!
Code explanation. I have seen many similar hacks on the Web, but all of them require you to edit WordPress core files to achieve the same result. Of course, editing WordPress core files is a very bad idea because then you would have to re-edit the files each time you upgrade your blog. Instead, this hack uses the add_filter() WordPress function to insert content into your RSS feed without editing any core files. Sources
How to: insert ads in your RSS feed WordPress, ajouter du contenu dans son flux RSS !
- Format Your Images for Feed Readers
The problem. You took a lot of time to write and format your post and add beautiful screenshots. It looks so good on your blog. Sadly, when the post is displayed in Google Reader or any other RSS reader, it doesn’t look so great. The solution. This is due to the fact that most feed readers display images inline with text:
To avoid this problem, add a CSS class to display the image as a block. WordPress provides the built-in class “center“: <img src="http://78.46.108.98/images/wordpress-rss-hacks/myimage.jpg" alt="This is my image" class="center"/> Sources
How to format images for feed readers
- Provide Your Readers with a Feed for Each Post
The problem. When a post has lots and lots of comments, it can be hard for readers to follow the conversation. Most WordPress users don’t know this, but our favorite blogging engine has a built-in function for providing an RSS feed for the comments in each post. The solution. Well, this recipe isn’t really a hack or anything: to provide an RSS feed for the comments in a particular post, just call the comment_rss_link() function: <?php comments_rss_link('» Comments RSS Feed'); ?> Sources
WordPress how to: provide an RSS feed for the comments in each post
- Exclude Categories from Your RSS Feed The problem. Do you use one of your blog categories to let readers know about your website’s news, or does your blog feature a category that has nothing to do with the rest of your content? If so, it is generally not a good idea to include it in your RSS feed. The solution. Here’s how to get rid of one of the categories in your RSS feed:
First, get the numeric ID of the category you want to exclude. If you don’t know how to get the ID of a particular category, you can learn how here. Once you have the ID of the category you want to exclude from your RSS feed, edit the functions.php file in your theme. Create the file if it doesn’t exist. Paste the following code in it: function myFilter($query) { if ($query->is_feed) { $query->set('cat','-5'); //Don't forget to change the category ID =^o^= } return $query; }
add_filter('pre_get_posts','myFilter');
Save the file, and you’re done!
Code explanation. This hack works exactly the same way as the previous one: create a custom function to exclude the category that you don’t want to appear in your RSS feed, and then use the super-useful add_filter() function to apply it to the pre_get_posts() WordPress core function. Sources
Excluding posts from your WordPress feed How to: exclude categories from your RSS feed
- Display Any RSS Feed on Your WordPress Blog
The problem. Do you have more than one blog, or do you manage a forum? If so, you may want to be able to display any RSS feed on your WordPress blog. The solution. Many plug-ins can do the job, but they’re not necessary at all. WordPress has a built-in RSS reader that is used, for example, to display news on your dashboard. All you have to do is use it in your theme.
Paste the following code anywhere in your theme (personally, I’d put it in the sidebar, the footer or, even better, the page template): <?php include_once(ABSPATH.WPINC.'/rss.php'); wp_rss('http://feeds.feedburner.com/wprecipes', 3); ?>
Save it and you’re done. It’s as easy as that!
Code explanation. The first thing we have done is include the rss.php file from WordPress core. This file allows us to use the wp_rss() function, which takes two parameters: the first is the RSS feed’s URL, and the second is the number of RSS entries to be displayed. Sources
How to: Display any RSS feed on your WordPress blog
- Use Category-Specific RSS Feeds
The problem. Many blogs talk about a lot of different topics: design, programming, blogging tips, etc. Have you ever come across a blog in which you have enjoyed only one category of posts? If so, you should definitely consider offering one feed per category to your own readers. The solution. Let’s say you’d like to be able to subscribe only to TheGridSystem’s tools section. The category URL is: http://www.thegridsystem.org/categories/tools/ To get an RSS feed for this category, you simply have to add /feed to the end of the URL: http://www.thegridsystem.org/categories/tools/feed Pretty easy, isn’t it? But pretty useful, too, in my opinion. 9. List RSS Feeds by Category
The problem. If you like the previous hack, you will probably also want to be able to display the names of all your category feeds in a list to your readers. The solution.
Edit any of your theme files, where you want to list your categories and their accompanying feeds. Paste the following code: <?php wp_list_categories('feed_image=http://www.myblog.com/image.gif&feed=XML Feed&optioncount=1&children=0'); ?>
Save the file. You categories will now be displayed, along with their RSS feeds!
Code explanation. This hack uses only the good old wp_list_categories() function, with two parameters. The first is feed_image, which allows us to specify the URL to be displayed as a feed image. The second parameter is feed, which is used to specify the feed format. 10. Get Rid of RSS Feeds the Clean Way
The problem. Let’s say you’re using WordPress as a CMS to manage your online portfolio or your company’s website. In such cases, the RSS feed isn’t that useful, and some people would probably want to remove it. The solution. I have seen many “hacks” on the Web where people say you just have to remove the include on the wp-settings.php core file. I don’t think you should ever edit a core file. Instead, the following hack will do the job. Simply paste this code in the functions.php file of your theme: function fb_disable_feed() { wp_die( __('No feed available,please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!') ); }
add_action('do_feed', 'fb_disable_feed', 1); add_action('do_feed_rdf', 'fb_disable_feed', 1); add_action('do_feed_rss', 'fb_disable_feed', 1); add_action('do_feed_rss2', 'fb_disable_feed', 1); add_action('do_feed_atom', 'fb_disable_feed', 1); Sources
Disable WordPress feed
About the author This guest post was written by Jean-Baptiste Jung, a 26-year-old blogger from Belgium, who blogs about WordPress at WpRecipes and about everything related to blogging and programming at Cats Who Code. You can stay in touch with Jean by following him on Twitter. (al)
December 2 2008, 10:48am | Comments »
1


