‘HOW-TO’ Category

How to show ads to only search engine visitors using Who Sees Ads

7
responses

Perennial Weblog Tools Collection community favorite Who Sees Ads can be used to show ads only to certain visitors – such as people who have arrived on your site from a search engine. It’s a useful way to improve your click-through-ratio, and please your regular readers by hiding ads from them. This is a quick introduction to using the plugin. Showing ads only to search engine visitors is extremely simple – Who Sees Ads can do much, much more. Check out the links at the end of this article for more information. NOTE: Although the plugin says it’s for WordPress 2.5, it works fine with WordPress 2.92. I haven’t been able to test it with 3.0 yet because I don’t have any 3.0 test sites indexed in any search engines yet. Anyone else know if it works with 3.0? If you don’t want to do this with a plugin, you […]

[Continue Reading...]

Adding Scripts Properly to WordPress Part 3 – Page Detection

12
responses
by
on
May 8th, 2010
in
HOW-TO, WordPress FAQs

You might find yourself in the situation where you only want a script to run on a certain page. In fact, it’s good practice to only load your JavaScript files when absolutely necessary; loading the files on every single page is a big no-no (I’ve been chastised before for this). While on the blog’s front-end, WordPress makes it super-easy with its conditional tags. I’m not going to go over the conditional tags here, but here are a few you can take advantage of: is_home() is_front_page() is_single() is_page() And much more. While being selective on the front-end is relatively straightforward, the admin-panel is another monster. Sure, there’s the is_admin() conditional, but what if you only want to run a script in a certain section within the admin panel? One technique is to use the PHP reserved variable called $_GET. Say you have a plugin options page with a URL of: http://www.mydomain.com/wp-admin/options-general.php?page=my-plugin-file.php […]

[Continue Reading...]

Adding Scripts Properly to WordPress Part 2 – JavaScript Localization

9
responses
by
on
May 7th, 2010
in
HOW-TO, WordPress FAQs

When adding scripts to WordPress, you will inevitably run into a small, but painful, issue of localization. Localizing a plugin or theme is relatively straightforward, but JavaScript presents its own difficulties since we can’t easily call the PHP functions necessary (which is one reason authors embed JavaScript in PHP files). Since embedding JavaScript in PHP files is never a good technique, we use localization to save the day. With JavaScript localization, you can use PHP magic to build your localized strings, and then use JavaScript to read/parse those strings. What you do with them is only limited to your imagination. Furthermore, if you display anything with JavaScript, chances are your users will want the strings to be localized. Fortunately, WordPress provides the ultra-handy wp_localize_script function. wp_localize_script The wp_localize_script takes three arguments: handle object_name l10n Handle The handle argument will be the same handle you use for your script name. For […]

[Continue Reading...]

Adding Scripts Properly to WordPress Part 1 – wp_enqueue_script

16
responses
by
on
May 6th, 2010
in
HOW-TO, WordPress FAQs

Starting in WordPress 2.1 (if I remember correctly), the awesome folks at Automattic gave us the even awesomer function of wp_enqueue_script. Before that, it was every plugin or theme author for himself. If you wanted to add in a script, it was hard-coded in. As you might imagine, this presented a ton of problems. Scripts were loaded twice, out of order, or even when they weren’t needed at all. Furthermore, some themes and plugins had the JavaScript embedded within the plugin’s or theme’s PHP file just to capture a few PHP variables. Not good! In order to add scripts properly to JavaScript, you must always keep your PHP and JavaScript separate. And by separate, I mean separate files. There’s just no excuse anymore (I’ll get into this in Part 2 of this series). The wp_enqueue_script function is the first step in loading your scripts properly. Not only can you add […]

[Continue Reading...]

More plugins for securing your WordPress install

27
responses

I wrote previously on securing a fresh WordPress install. Today, I’ll cover several WordPress plugins that can be used with fresh or existing WordPress installations to enhance security. I’m not going to cover recovering a hacked site, or exploit scanning tools like Exploit Scanner or WordPress Antivirus in this tutorial.

[Continue Reading...]

Backing up your WordPress database with WP-DB-Backup

13
responses

I emphasized the importance of backing up in my basic security tutorial, but I discovered all of the backup tutorials I found were out of date. So here’s a tutorial on backing up your WordPress database with the terrific WP-DB-Backup plugin. The great thing about this plugin is that you can have it automatically send you backups by e-mail that you can save both to your local computer and optionally store in your Gmail or other web mail account and an additional off-site backup. This tutorial assumes you already know how to install plugins. This tutorial should be forward-compatible with WordPress 3.0

[Continue Reading...]

How To improve basic security on a fresh WordPress install

40
responses
by
on
April 15th, 2010
in
HOW-TO, WordPress FAQs

WordPress developers take security very seriously, and many security experts evaluate WordPress’s code for flaws. Security updates are made frequently to keep users safe. However, there are some extra steps you can take to make a fresh installation of WordPress more secure and protect against future attacks. Remember, no system can ever be completely secure, but taking preventative measures can be helpful. Much of this guide is based on the advice from the WordPress Codex article on hardening WordPress, but it is aimed at the WordPress beginner. In future articles, I’ll cover advanced security measures, hardening existing WordPress installs, and recovering hacked WordPress sites. This guide should be relevant for both WordPress 2.92 (the most recent stable release as of this writing) as well as WordPress 3.0. Overview: -Preliminary steps for securing your WordPress install -Changing defaults in WordPress to implement “security by obscurity” -Choosing strong passwords -Installing and configuring […]

[Continue Reading...]

Moving Your WordPress Site and Database

44
responses

There comes a time you may have to leave one web host for another. No matter the reason the idea of relocating an entire website – especially one that has been online for sometime – can seem very daunting. With a WordPress based site – I found it easier than expected – way easier. My WindowsObserver.com website has 1,100 posts, 9 pages, 4 categories, 2,436 comments, uses 17 widgets, and has 35 active plug-ins. On top of all those elements I use Windows Live Writer to create all of my content and I use a good bit of screenshots and graphics in my posts. As a result I have over 40MB of images (1,100 files) to go along with my 1,100 postings. Now for the purposes of this story I am not going to get into a comparison of hosting services or the like. The landscape is massive out there […]

[Continue Reading...]

How Do You Do That?

4
responses

Ever wanted to do something in WordPress but just wasn’t sure how? In my experience this happens quite often, mostly with people new to WordPress. But, even the experts run into trouble sometimes. Today I thought I’d start a series of posts which will aim to explain how to do certain things in WordPress. Hopefully this will cover anything from quick tips and simple little functions, all the way up to more complex custom code and the like. So, stick around and you just might learn something. I think I’ll kick off the series with a couple simple ones… Why isn’t this plugin working with my theme? This is probably one of the most common issues I read about regarding WordPress. Sometimes even more experienced WPers can get this one wrong. Now, I’m not saying this is the solution to all problems between plugins and themes. Its just that this […]

[Continue Reading...]



Obviously Powered by WordPress. © 2003-2013

page counter
css.php