Insert the Current Date/Time in Posts or Pages

Sometimes, you may want to display the current date or time inside one of your posts and pages and have it update dynamically every time the page is loaded.

We can achieve this quite simply by creating an easy shortcode in your WordPress installation.

To do this, add the following code to the bottom of your functions.php file. This code includes a function which checks the current date/time and then returns it when the shortcode is inserted in a post or page. You can change the way the date/time appears by using PHP date formats; the way I’ve written the code in this tutorial will return a value such as May 18, 2011.

function displaydate(){
return date('F jS, Y');
}
add_shortcode('date', 'displaydate');

Posted in Design | Comments Off

Anatomy Of A WordPress Theme

Posted in Uncategorized | Comments Off

Top SEO Plugins For WordPress

http://www.youtube.com/watch?v=xJlpoGcnrgs

Posted in Plugins | Comments Off

WordPress Widget Spacing

I have found more WordPress tips and tricks this week. Once again, this came from my own struggles with getting things to look right. First, I had switched up the buttons in my sidebar on this blog. Next, I started a new blog and was attempting to get the sidebar to my liking. I love me a WordPress Widget. Spacing, or lack thereof, between them? Not so much. Some buttons ran together as if they were one. The ones in the left sidebar didn’t line up with the ones in the right sidebar. It looked like a third grader had built my blogs. In all honesty, that is often my skill level.

I went on a mission to find a solution. As is always the case, most suggestions are to get into the Theme Editor and start messing with the CSS. Are you nuts? I don’t even know what CSS stands for. From personal experience, I know how fast messing in there can go completely wrong…I found a quick fix! Here it is:

<div style=”height:10px;”></div>

You can add that either before or after your widget code. You can change the number in there to make a larger or smaller space between your widgets. If the banners in the left and right sidebar are not lining up, you can get them in order with that nifty thing. Amazing!

That’s that. Easy-peasy for those of us less technically-inclined. Now go and fix your WordPress widget spacing.

Posted in Design, Widgets | Comments Off

How To Display Facebook Status On Your Blog

add fbstatus wp How to Display Facebook Statuses on WordPress Blog

add fbstatus wp How to Display Facebook Statuses on WordPress Blog testing long caption on image thanks thank sand thanks

If you want to show your Facebook Statuses and you are hosting on a WordPress.com blog that restricts you from installing plugins, try this. The following method make use of Facebook status feed and WordPress RSS widget. It will also work for self-host WordPress blogs, but you guys who self-host can use better plugins for that.

 

Step 1

Login into Facebook. Under Profile, look for Mini Feed column, click on See All.

minifeed seeall How to Display Facebook Statuses on WordPress Blog

Step 2

Under Mini Feed, click on ‘Status Stories‘ on the right column. Scroll all the way to the bottom, look for ‘My Status

my status How to Display Facebook Statuses on WordPress Blog

Step 3

Copy the link of My Status, and we are about to use this in WordPress blog. Your link will look something like the following:

minifeed link How to Display Facebook Statuses on WordPress Blog

Step 4 (WordPress)

Under WordPress admin, Navigate to Design -> Widget. Look for RSS Widget, add it to your side bar.

rss widget How to Display Facebook Statuses on WordPress Blog

Step 5

Paste the copied URL inside, give it a name, save and your Facebook statuses (or status depends on how many you display) will now appear on your WordPress blog.

rss facebook How to Display Facebook Statuses on WordPress Blog

Posted in Design | Comments Off

Top 10 WordPress Anti Spam Plugins

As I was promissing few days ago here, I’ll name few tools that you can use to fight agains WordPress Spam.

Here we go:

  1. Akismet – a very popular plugin which comes by default with wordpress. To use it, you need to signup for a wordpress acount and get an API key for your website.
  2. Defensio – A wordpress plugin that helps you filter your comments and also provides rss feed for both accepted and ‘spammed’ comments.
  3. Simple CAPTCHA – Adds turing text to your comment area to eliminate automated comments
  4. Challenge – Adds a challenge to your comments area, the regular stuff being additions and multiplications
  5. Referrer Bouncer – You don’t need to do anything to use it. Just activate it.
  6. Email Immunizer – Simply converts all your emails on your website to numeric references to prevent email colecting
  7. WPBayes – Implements the spam filtering with the Naive Bayesian technique, which means it marks the comments as spam or not based on your previous decisions. To be honest, I didn’t use this one
  8. Spam Karma 2 – This one assigns a karma score based on multiple factors like the age of the post, the email, if there’s a link inside, etc, etc.
  9. WP Spam Hitman – It fights agains wordpress spam using a series of patterns. That’s all I know about it, please test it and let me know if it’s a good one.
  10. Did you pass Math – Does the same thing as the one at point #4.

Well.. I think 10 tools are enough to keep you away from spam comments. Test them and use the one(s) you like the most.

Posted in Anti-Spam, Plugins | Comments Off

Yoast WordPress SEO Plugin Review

It seems that I have turned into a salesman for a free plugin that I didn’t even write. This plugin is Joost de Valk’s WordPress SEO Plugin. I’m honestly tired of writing all the benefits in chat to friends, or in email to clients whenever the subject of the best WordPress SEO plugin comes up, so I might as well write a plugin review to just link to.

What does an SEO plugin do?

Most WordPress developers think an SEO plugin just lets them set the title and description, maybe even some templates for them as Headspace2 allows. If you are savvy and know a bit about SEO, you then proceed to install separate plugins like Robots Meta, RSS Footer, Google Sitemaps for WordPress, Yoast Breadcrumbs, and Google Integration for webmaster tools verification etc.

Since many of these plugins were written by Joost, it only makes sense that he would roll them together into one tool that can do some of the gruntwork of optimizing a WordPress website for search engines. Yoast has done this, as well as provided a useful post/page edit box to help authors create SEO friendly pages and posts.

Yoast WordPress SEO features

  • Multisite Network settings, set a master control site.
  • Control meta tags and indexation per page, and per page template.
  • Google, Yahoo, Bing webmaster tools verification.
  • XML sitemap generation.
  • Title and description templates for post types and archives.
  • Facebook OpenGraph meta data.
  • Controlled indexation and directory snippet tags.
  • Advanced permalink controls.
  • Canonical SSL support.
  • Custom breadcrumbs.
  • RSS header and footer link templates.
  • Export settings and import from All-in-One SEO, and Headspace2.
  • Robots.txt and .htaccess file editing.
  • Rich post edit page options with snippet preview.

Plugin feature highlights

I think almost all of these settings are useful, but some of them are less obvious, and can offer some real benefit. Here are my favorites:

Multisite Network Settings

WordPress multisite gives us flexibility, and control over user permissions and access. It’s important to make sure we don’t have users messing with our SEO settings, especially if admins aren’t necessarily the actual site owner. For this reason, you can limit SEO settings to Super Admin users.

You can also choose a site whose settings will be used as default for new blogs on the network, and reset the settings of a blog individually from the network admin.

Facebook OpenGraph Integration

This is pretty new, and recently added to the plugin. OpenGraph uses metatags to give Facebook information about your site or page for display in profile pages of users who choose to “LIKE” your posts or pages.

Advanced Permalinks Options

For those of us who like our url structures to be “just so”, Yoast has added some advanced permalink options. You can remove the category base, enforce a trailing slash, and redirect your attachments to the parent post. I never liked how WordPress will insert an image, and make it a link to just the image, taking the user off the page and squandering a precious link. This will take care of that issue.

Yoast Breadcrumbs

The more complex and hierarchical your website architecture becomes, the more beneficial it is for your users to have a breadcrumb trail like the one above the post you are reading. I keep this blog pretty flat, but in cases of multi-tiered websites, these are also a way to increase your internal linking in a usable way. The crumbs work in many themes automatically, or you can add them manually from your theme functions file.

RSS Footer Links

Is your blog getting syndicated on autoblogs and news mashup sites? Are you angry that “SOMEONE IS STEALING MY CONTENT!!1?? Relax. Take a deep breath, and realize that this is an opportunity to create inbound links automatically using the websites that syndicate your content. Just set it up to link using the blog and postname, and the syndicators will help you rank. With some creativity and good targeting, this can be leveraged and optimized.

Import / Export Options

I don’t think this needs much explanation. I love backing up settings, and being able to reduce setup time on future projects. Being able to import All in One SEO and Headspace2 options also lowers the barrier for entry for many. Have no fear, you don’t have to rewrite all your titles to try Yoast’s WordPress SEO plugin.

If you have read through this, and still think that your other SEO plugin in just fine for you, more power to you. My hope is that at least you know that not all are equal, and there is more a plugin can do to optimize a WordPress website than just set titles and descriptions.

Posted in Plugins | Comments Off

WordPress Plugin – Create SEO Friendly Search URL

Here’s an extremtly nice pluign I found mentioned in AdesBlog. This WordPress plugin turns your normal search string from:

http://www.domain.com/?s=search-term

into

http://www.domain.com/search/search-term

This plugin removes the unnecessary “?” and converts spaces (%20) into plus sign “+“, making your wordpress search string more readable, and looks good for search engine optimization.

Click here to download this plugin.

Posted in Plugins | Comments Off

Next Step After WordPress Installation

wordpress next Youve Installed WordPress, So Whats Next?

You’ve heard how good WordPress is in terms of expandability, customization and you decided to give it a try. Installing a basic copy of WordPress won’t take too long; but if you are looking for more stability, traffics, search engine optimization, etc, here’s few of my recommendation – The things you should do after installing WordPress.

 

  1. Get WordPress.com API Key, Activate Akismet

    akismet Youve Installed WordPress, So Whats Next?

    Where: Settings -> Akismet Configuration

    In short, Akismet is a plugin (comes with WordPress) that will intelligently get rid of all the unnecessary comment and trackback spams. In order for Akismet to work, you’ll need a WordPress.com API Key. The key is free, but you’ll need to request for one and apply it on the Akismet plugin.

    Sign up with WordPress, get Akismet Key.

  2. Implement Permalinks

    permalinks1 Youve Installed WordPress, So Whats Next?

    Where: Settings -> Permalinks

    Referring to the image above, ‘Default’ is each how your blog post URL will look like. The ‘?=’ and numeric blog post ID does not make any sense to the search engine, so it’s better to change them to something more readable. Personally I’ll suggest Custom Structure and insert ‘/%postname%/‘. Here’s how your blog post URL will look like:

    http://www.hongkiat.com/blog/2008/06/25/sample-post/

  3. Burn your feed with Feedburner

    feedburner Youve Installed WordPress, So Whats Next?

    Feedburner combines all different type of feeds into one, so your subscribers can subscribe to one regardless of it’s type. Feedburner also comes with a chiklet, allowing you to show off subscribers figures as well as promote subscription.

    Sign up with Feedburner

  4. Read/Subscribe to WLTC

    wltc Youve Installed WordPress, So Whats Next?

    weblogtoolscollection.com (WLTC) is where you should keep an eye on if you are particular about your WordPress blog. These guys have the latest updates in terms of themes, plugins, tips and WordPress News. There’s perhaps no where better to get everything about WordPress on one website.

    Visit WLTC | Subscribe WLTC

  5. Plugin – Related Content

    relatedentries Youve Installed WordPress, So Whats Next?

    Related content plugin plays important role in helping you as the blogger, recommending what your readers should also be reading apart of the article they are on. You probably don’t need it now, but it’ll comes in handy when there’s more blog post. A plugin worth mention.

    Download WordPress Related Content plugin

  6. Plugin – Google XML Sitemap

    This plugin will create a Google sitemaps compliant XML-Sitemap of your WordPress blog. It supports all of the WordPress generated pages as well as custom ones. Everytime you edit or create a post, your sitemap is updated and all major search engines that support the sitemap protocol, like ASK.com, Google, MSN Search and YAHOO, are notified about the update.

    Download Google XML Sitemap

  7. Add blog to Google Webmasters Tool

    Google Webmasters is a free Google service that allows you to:

    • Manage, view site statistics
    • Bot crawling activity
    • Diagnose site
    • Submit Sitemap
    • Monitor Google indexing

    In short, it allows you to manage the ‘health’ of your blog.

    Go to Google Webmaster Tool

  8. Add About/Contact Page

    This allow your readers to understand more about who’s behind the writing. It helps increase trust worthy of a site.

Posted in Installation | Leave a comment