Category Archives: WordPress
The beauty of WordPress is in how easy it is to adapt for different tasks. One can extend it with just a couple of lines of code. In this post, we’ll review 10 shortcode snippets that will tweak and optimize your WordPress theme. You can add all of these code snippets to the
functions.phpfile in your WordPress theme.
Limit The Excerpt’s Word Count
One thing that can go wrong in WordPress magazine themes is when users include too many words before the
moretag. Sure, they could handcraft the excerpt in the dedicated field, but on a website that has hundreds of posts and on which the text above the
moretag has always been used as the excerpt, going back to create excerpts for all of those posts by hand would be cumbersome. In this case, we can limit the number of words shown in the excerpt by using this code:
Here, we’re using a WordPress filter hook, which is a function that parses and (usually) modifies data before it gets stored in the database or displayed on a page. In this case, we’re setting the number of words shown in the excerpt to 10.
Add A Favicon Using A WordPress Hook
Hooks allow us to insert custom code without touching the template. This gives us a lot of flexibility, because now, whenever we need to change something, we only have to change the function that’s plugged into a certain hook. For example, you can add a favicon to your website without touching the
header.phpfile, just by plugging a function into the
"<link rel='shortcut icon' href='"
. get_stylesheet_directory_uri() .
favicon.icofile should be located at the root of your theme. We’re now using an action hook, which is a function that is triggered at specific points during an execution by WordPress’ core. In this case, the hook triggers any function that’s attached to it when a page is launched in the browser. But other hooks can be triggered when saving a post, registering a user and so on. Some themes even have their own action hooks, which, like WordPress’ core action hooks, can be used to launch functions at specific points of an execution.
Redirect WordPress Feeds To FeedBurner
It’s great that WordPress offers feeds out of the box. But if you want statistics about your subscribers, you’ll have to use FeedBurner or a similar service. To redirect your feed to one of these, use the following snippet. Thus, if you try to go to
http://www.smashingmagazine.com/feed(http://www.smashingmagazine.com/feed), you’ll be redirected to FeedBurner’s feeds for Smashing Magazine (http://feeds.feedburner.com/smashingmagazine).
( is_feed() && !preg_match(
'HTTP/1.1 302 Temporary Redirect'
http://feeds.feedburner.com/smashingmagazinewith the URL for your own feed from FeedBurner.
Go to the source to see additional tips for optimizing your self-hosted WordPress blog. Are there other things besides these tips that you have utilized?
- WordPress ‘tips and tricks’ blogger? (e1evation.com)
- My WP Expert Announces Brand New “WordPress How To” Blog (prweb.com)
- HostGator WordPress Install Guides and Videos Now Available at WP Hosting Reviews (prweb.com)
- Socialize: Use FeedBurner To Promote Your New Posts On Twitter (pressography.com)
It’s important to take precautions to prevent hackers from finding ways into your blog site. Here are some to implement:
You do not need to have excellent programming or technical knowledge to do any of these:
Use a strong password
As it is with all the other passwords that you maintain for your online banking or other secure transactions, your password for WordPress should ideally be made up of upper and lowercase letters with numbers and symbols used as a better security measure. It is surprising how many people use passwords like “password”, “iloveyou” and “123456″.
Regardless of how strong the password is, it is recommended that you change your password at least once every 3 months.
Do not reveal your WordPress version
Hackers can plan a specific attack on your website if they know the security issues that the version is faced with. The version of WordPress is usually included in the theme that is used. To remove this information from your website:
- You need to log in to your WordPress dashboard and Go to Appearance > Editor.
- Click on the Header file on the right hand side.
- When you see codes on the left, search for a line that looks something like: php bloginfo(’version’); ?>” />
- Delete this and click on the “Update File” button.
Go to the source to find out other precautionary steps to take.
- BulletProof Security (WordPress Plugin) – Serious vulnerability / backdoor (sucuri.net)
- 3 WordPress Habits That Make Hackers Happy (bloggingpro.com)
If you host your own WordPresssite you want to make the switch to version 3.05 which came out earlier this week.
Why you ask?
The release addresses a number of issues and provides two additional enhancements:
Two moderate security issues were fixed that could have allowed a Contributor- or Author-level user to gain further access to the site.
One information disclosure issue was addressed that could have allowed an Author-level user to view contents of posts they should not be able to see, such as draft or private posts.
Two security enhancements were added. One improved the security of any plugins which were not properly leveraging our security API. The other offers additional defense in depth against a vulnerability that was fixed in previous release.
You can download 3.05 here if you don’t want to do the auto-upgrade.
- WordPress 3.0.5 is available (with security fixes) (sucuri.net)
- Harden Up Your WordPress: 3.0.5 Released and 3.1RC4 Available (pressography.com)
- Security Update: WordPress and Google Both Launch Improvements (bloggingtips.com)
Have you started your blog on WordPress().com, and then thought about moving on to a self-hosted WordPress installation? The move gives you more freedom, but it also hurts your blog’s SEO rankings. Now, however, WordPress offers a solution: Offsite Redirect.
The new feature, which can be accessed in your dashboard under “Upgrades,” lets you permanently redirect your WordPress.com blog to another web address. The upgrade is not free, but it costs an affordable $12 per year.
For those WordPress users that don’t self-host yet, what do you think of this move?
Powered by ScribeFire.
- Hello, Goodbye: Offsite Redirect Upgrade – WordPress.com (en.blog.wordpress.com)
- Leaving WordPress.com? Your traffic and SEO will follow with Offsite Redirect. (thenextweb.com)
- Optimize WordPress Single post with SEO-Tool – Keyword Density Checker WordPress Plugin (shoutmeloud.com)
- Full Circle: WordPress.com Adopts Windows Live Spaces (technobabbl.es)
3,102 votes were cast, and with 87% of vote, WordPress destroyed Typepad. WordPress garnered 2,714 votes compared to Typepad’s mere 267 ballots (9%). 121 of you decided to call it a tie. (Source: Poll: WordPress overwhelms Typead in Reader Vote – Mashable, Social Media Guide)
I’d be curious if the results would be similar in a poll involving WordPress and Blogger.
Related articles by Zemanta
- What are Your Favorite 10 Blogging Tools? (problogger.net)
- 1 Essential Plugin for Your WordPress Blog (ariwriter.com)
- Best Least Known Blogging Tool (staygolinks.com)
ScribeFire is a Firefox plugin that gives you an array of useful features and options for writing posts. You can drag and drop content from a variety of sources (which the WordPress Visual Editor currently doesn’t fully support), manage and leave notes on your posts, upload files via the built-in FTP, create timestamps, and manage uploaded images. ScribeFire is the tool of choice for bloggers that need moar cowbell than what the WordPress built-in editor affords them.
2. WordPress Helper
Whether you’re new to WordPress or an experienced veteran blogger, you’ll find WordPress Helper to be a much-welcomed addition to your blogging arsenal. WordPress Helper notifies you of new WordPress versions, gives you the ability to set custom keyboard shortcuts, and places useful help files, accessible by right-clicking on the page on a PC, at your finger tips.
3. Screen grab to WordPress!
If you include a lot of screenshots in your posts, you should check out the free Firefox add-on, Screen grab to WordPress!. You can save a web page as an image, and then use the tool to automatically upload it to your WordPress site with a click of a button.
4. WordPress scanner
With WordPress Scanner, you can sleep easier at night knowing that your blog is safe from known and potential security vulnerabilities. WordPress Scanner is available as a web-based application, or as a WordPress plugin.
5. Broken Link Checker
Broken Link Checker is a WordPress plugin that essentially checks your hyperlinks to see if they’re still active. It scans your posts and pages to check for broken links and then notifies you via the WordPress Dashboard if there are any broken links found. You can set specific times for when the link-scanning occurs and it’s recommended you pick a low-traffic time of the day to do so.
6. Google Syntax Highlighter
If you’ve ever tried including code snipplets in your WordPress posts through the WordPress Visual Editor, only to find out how it mangles your prettily-formatted code, you’ll love Google Syntax Highlighter, a WordPress plugin that handles preformatted code in your WordPress posts and pages. Google Syntax Highlighter makes it much easier to display code on your posts and colors (“highlights”) the syntax for better readability. If Google Syntax Highlighter isn’t for you, check out WP-Syntax, WP-Chili, or SyntaxHighlighter Plus.
Insights is a WordPress plugin that assists you in finding and gathering information and media for your blog posts. Insights gives you the ability to search existing blog posts for specific information and an intuitive interface for searching external websites and services such as Flickr, Youtube, Wikipedia, and Google Blog search – all from within the WordPress interface.
There are but a handful of notable Microsoft applications – Windows Live Writer is one of them. Windows Live Writer is a free desktop application that’s compatible with WordPress (along with other popular publishing platforms like Blogger and Typepad). You can write posts offline and upload them whenever you’re ready to publish.
Go check out the rest of the tools highlighted. Just keep in mind that if you use the free .com platform offered by WordPress some tools may not be useable.
Related articles by Zemanta
- How to Blog. A Lot. (newcommbiz.com)
- Are You an Expert Blogger? (chris.pirillo.com)
- Move From Blogger to WordPress Without Losing Google Rank [Blogging] (lifehacker.com)
- Using Zemanta with any blogging platform (zemanta.com)
- Network Solutions offers dedicated WordPress hosting package (blogherald.com)