Author - admin

How to build a WordPress image slider

My article today is about building a WordPress image slider from the ground up without using a plugin. Actually this is not totally true, because the tutorial is “only” about the WordPress part and we will be using a readymade slideshow plugin written in jQuery. I’m using the tutorial code for my own website as well, check the demo right below.

WordPress image slider tutorial

WordPress image sliderMost image slider plugins are based on a third party slideshow plugin, written in jQuery or JavaScript. This is not surprising, because building a responsive and flexible slideshow is a different task than writing a few blocks of PHP code in WordPress. I’m going to show you how to use the same code most slider plugins use to integrate and control a slider function right in your WordPress blog post. I’m using Flexslider 2, a jQuery plugin maintained by WooThemes. WooThemes has built Flexslider 2 as the basis for their own premium WordPress themes and plugin. Reason enough to use their jQuery plugin for this WordPress tutorial.

Prepare your WordPress theme

All the tutorial code needs to be placed in your theme’s functions.php file, but before we can do that, we need to copy some files from the Flexslider jQuery plugin into the theme’s directory as well. Create a directory called flexslider in your themes directory. Download the Flexslider 2 plugin and upload the files flexslider.css and jquery.flexslider-min.js including the directories named fonts and images into the flexslider directory you just created.

The following two functions are used to include the necessary JavaScript and CSS code into your theme footer. I’m using a “special method” I’ve found on Scribu.net to include these files inside the footer to keep my theme files fast. Many plugin developers include JS/CSS files on every page, post or even archive pages. The function print_my_script() below will include the JS/CSS files only on those pages where the slider shortcode is actually used.

5 Steps to turn WordPress category pages into a landing page

Several years ago Olaf taught you how to change WordPress category pages into a landing page. Back then, it was more complicated and required editing a number of files. Thankfully, WordPress and a pair of plugins make it easier than ever to turn those so-often neglected category pages into SEO gold.

The whole idea of landing pages is that they draw visitors further into your site. WordPress category pages, by design, are perfect for that. With a minimal amount of effort, those pages could become tightly focussed content pages that can and will bring folks to your website. And, if you use tags, why not turn those into landing pages as well, utilizing the same techniques?

The biggest concern most folks have when this topic comes up is duplicate content. If you set things up right, and assuming you have a nice variety of topics within your blog, that won’t be an issue. If your homepage offers more than a blog-style list of the latest posts and you typically only file posts in one category, the duplicate content issue becomes almost moot. Drop the archives by date nonsense, no one looks for your good stuff that way anyway; and the duplicate issue is gone completely.

Needed WordPress plugins

SEO for WordPress by Yoast (a must for any WordPress site anyway) – turn on Noindex subpages of archives and turn on breadcrumb functionality.

Rich Text Tags – This plugin will add WYSIWYG editing to the category descriptions as well as prevent WordPress from stripping any HTML tags you include in the descriptions.

1) Setup your WordPress category pages & configuration

  1. Set up your blog so that descriptions will display only the first page of each category;
    hide them on pages 2, 3, 4, etc. with the Yoast plugin.
  2. Set up your blog where the first page of each category is INDEX and FOLLOW.
  3. Edit your theme so that the category name is the only H1 tagged content on the page.

2) Use unique post excerpts

Set up your blog to use excerpts – most modern themes already do this. Change the settings for your category pages to display excerpts rather than entire posts, which eliminates most of the duplicate content issue. Be sure to also include featured image thumbnails to highlight each post and encourage click-throughs.

3) Category name & link text selection

Evaluate the name and link text used for your WordPress category pages. If a category has 100 posts, there will be at least 100 internal links to your category page using that link text – including breadcrumbs and those ‘filed under ____’ links that often appear at the top or bottom of individual posts. Use those links wisely. I often choose a somewhat broad term based on the topics of the posts I generally include in the category.  The category page should be the only page or post on your site that should be targeting that particular keyword and the only page using that keyword phrase as a title.

Design your category taxonomy in a hierarchical structure. Each tier gets more specific. I realize that this is Web Design 101 stuff but so many folks get it wrong and miss how to make categorization work for their sites. Don’t just focus on Google here, think about how you look for information and how your categorization can make it easier for folks to find things on your website.

4) Adding category page descriptions

Write a category description that includes the link text you will use throughout your site for that category. Go further than just saying something like, “Here’s all of the posts on topic X.” Remember, we’re changing your WordPress category page into a landing page; give Google and your visitors a reason to land there.

Write a description that sells that portion of your website or blog. Write at least 2 paragraphs about you, your site and the topic. Provide information about some of the posts you have included and establish your credibility on that topic.

Add a shortened and unique version of your description for a meta description; again, the WordPress SEO by Yoast plugin makes this possible.

If you have a large number of WordPress categories and subcategories, consider adding links to complimentary categories. For example: Your blog is about animals. If you have categories for both Galapagos Animals and Penguins, you could add something like this to the Penguins category – “Penguins are primarily native to the colder climates of the Southern Hemisphere. There are a handful of species that live in more temperate zones, including the Galapagos penguin. We have an entire section of this site dedicated to the Animals of Galapagos where you can learn about all the animals which live on those islands.” (Notice the use of an alternative phrase for the linked text – Animals of Galapagos.)

Create a graphic for each category – at least the top level ones. This gives folks something to link with and encourages Pinterest pins and a variety of other social sharing activities. Try to make it eye-catching and clear what the topic of the category is. You might try branding the graphic as well. The branding helps folks find you even if the links stop working and it tends to discourage thieves, at least the lazy ones, from stealing your graphics.

5) Update existing posts

Re-visit your posts. Update the excerpts and turn them into an invitation for readers to click through and visit each post – don’t just repeat the first sentence or two. Also consider, these excerpts will be appearing on your WordPress category pages. Be sure to edit some of them to include the category name/keyword. Remember, the excerpts are going to become a large part of the content on your category pages/new landing pages; use them to your advantage.

Consider editing the body of the post to include a link or two to the category where you filed it as well as any other categories where the reader might find additional information related to the topic. Since your breadcrumbs and/or ‘filed under’ links will all include the same link text for your categories, be sure to use a mix of anchor text within the posts. Use related terms and even “here” (as in find more info here) as anchors. Just don’t get crazy,  add in-context category links to only a handful of posts. Remember, we are trying to focus on the reader experience with a little SEO bonus. Go overboard and you will alienate your readers and get dinged by Google for over-optimization.

Final thoughts on turning category pages into landing pages

WordPress category pages are one of those areas where a lot of the SEO gurus disagree. Some will never see them as anything more than throw-away pages with no SEO value that should be NOINDEXED and NOFOLLOWED. Others of us embrace them as core content for SEO and site navigation. WordPress category pages, in my opinion, are great for SEO. But, I also see them as a way to encourage visitors to stay longer on our sites and therefore be more likely to share it with others.

I generally remove the /category/ slug from my sites. I think it is silly and redundant to leave the slug on the category pages. Do you really think Google and your visitors can’t figure out it’s a category page unless it says so in the URL?

Additionally, I always change my post permalinks to %postname%. Embedding the category in the URLs of the posts makes it a nuisance to move posts around your site. It also make for longer URLs. There are some that don’t like the idea of tampering with the native functionality of WordPress. And sure, adding any categories and subcategories to the URL of your posts might offer some SEO bonus. While I do generally keep Google in mind with all of my online efforts, I’ll always put user experience and flexibility slightly higher in my priority list.

What do you do on your sites? – Do you turn your WordPress category pages into landing pages or keep them NOINDEX, NOFOLLOW? How do you set up your URL structure – do you get rid of the category slug or keep it?

Have any additional suggestions or ideas that I left out?

Why We Don’t Use Akismet

There was a time that Akismet was the go-to weapon against comment spam on WordPress sites. Unfortunately, we don’t think it has kept up with the threats that web developers face, it makes mistakes and still leaves a bunch of garbage comments in your WordPress database. I’ve never used Akismet, can’t really explain why, just didn’t. Olaf used to use it but has since found better alternatives to Akismet.

Reasons to avoid using Akismet

  1. It’s only free for personal use; otherwise you have to pay from $60 a year for each site up to $50 a month (“for publishing networks, agencies, hosts and universities or multiple sites”). Part of the problem with that concept is that they don’t really define what they consider a “commercial” website. Is a commercial site a mommy blogger with a few Adsense ads or is it only true commercial enterprises that sells a product or service?
  2. A lot of obvious spam gets through.
  3. Doesn’t actually block the spammers. Akismet might flag their comments as spam but it does nothing to keep them from dumping 100 spam comments a day on your site. All of that junk uses your bandwidth, disk space and clutters up your WordPress database.
  4. False positives. Akismet has a reputation for flagging good comments as spam. That means you’re still going to have to slog through all 1,248 comments in your spam folder to make sure it is all truly spam.
  5. It can ignore comments made by legitimate visitors. I’ve seen several articles about this and experienced it myself. You leave a thoughtful reply to a blog post and when you hit submit there’s no notice of the comment awaiting moderation, no posting of the comment and no outward sign that what you took the time to write was actually accepted. Akismet may have simply blocked it.

Ah, but wait, Akismet is supposed to send suspicious comments to the spam folder. Apparently, not only does it send some legitimate comments to the spam folder, it doesn’t let some comments even into the system. Through the mysteries of their algorithm and reporting system, one of my email addresses was apparently placed on a spammers list. I don’t do a lot of blog commenting and when I do, it is usually several paragraphs long and they are always on point and would contribute to the conversation. In researching this article for Olaf, I found several folks theorizing that a denial of a trackback or even a single blogger tagging a comment with a particular email address can get that email banned in Akismet. I had always just assumed something went wrong between my lousy Internet connection or the blog I was commenting on. I don’t spam. It never occurred to me that I was on some sort of blacklist.

Powered by themekiller.com anime4online.com animextoon.com apk4phone.com tengag.com moviekillers.com