Articles
Simple SEO: WordPress
Properly configured, WordPress can be an extremely effective way of designing, maintaining and managing your site. Not only that, but sites using WordPress tend to rank well organically within the top search engines, once properly configured. However, neglecting some critical configurations can cause pages and posts that make up your site to not even be indexed by the major search engines.
Because WordPress is open-source, thousands of developers are constantly releasing updates and plugins to enhance the functionality of the platform — many of which are free. And some of these plugins are essential to properly optimize sites for top organic results in the most popular search engines. My two personal favorites are Headspace2 and Google XML Sitemaps.
To prevent pages of your blog from appearing to be duplicates of other pages, it’s essential that each page and post have a unique meta title and meta description. Otherwise, only one page or post with the same meta title and meta description will make the cut. Headspace2 adds a widget inside the WordPress edit page/post screen where you can easily fill-out a unique meta title and meta description on a per-page or per-post basis.
The most recent release of Headspace2 has even more essential SEO features, such as the ability to no-index pages that you don’t want to be included in search results — a contact form or privacy policy, for example. More information about the Headspace2 plugin can be found at the WordPress.org plugin directory or at UrbanGiraffe.com.
Google XML Sitemaps will generate an XML-compliant sitemap of your site each time you add a new page and/or post. It also pings Google, Yahoo, MSN, and Ask.com whenever your sitemap has been updated so they can index the latest version. Although this hasn’t been proven to affect organic rankings, it can certainly speed up the time it takes for search engines to index your new information. More information about the Google XML SiteMaps plugin can be found at ArneBrachhold.de.
Of course, neither of these two plugins alone will cause your content to soar to the top of Google. There are literally hundreds of other on-page and off-page factors that go into determining how your pages rank. However, these plugins will help, and they are very easy to install.
WordPress.org or Your Own Domain?
People often wonder whether it’s better to host a WordPress site on WordPress.org or install and host WordPress on their own domain. Aside from the benefit of not having any out-of-pocket expenses to start, there’s really no other reason to use WordPress.org. If this blog is going to become a source of income, not having full control over the future of it is a big mistake.
For example, suppose the people responsible for running WordPress.org decide to terminate your account for some type of inadvertent violation? Or if the taxonomy of your URLs changes because of a major restructuring that the developers decide to take? Countless hours of your time would be wasted as all of the other external SEO factors such as article backlinks, press releases, social bookmarking, and comment links would no longer point to valid URLs.
Hosting WordPress on your own domain gives you much more control and isn’t that expensive. You can easily register a domain with any one of several registrars for under $10 (search online for coupon codes) and many of these registrars will offer low hosting fees as well. Some will even offer free add-ons and most will have a control panel that includes an easy way to install WordPress.
Tips & Tricks
Can′t add pagination on WooThemes Thick Theme
Everything I have tried has led to nothing. And I have tried six way’s from Sunday to get my main posts to paginate.
example one:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts('offset=1&showposts=' . get_option('woo_other_entries') . '&cat=-' . $GLOBALS['ex_asides'] . '&paged=$paged' ); ?>
example two:
<?php global $myOffset; global $wp_query; $myOffset = 1; $paged = intval(get_query_var('paged')) ? get_query_var('paged') : 1; $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query(array( 'offset' => $myOffset, 'category__not_in' => array($GLOBALS['ex_asides'],7,84), 'paged' => $paged, 'showposts' => get_option('woo_other_entries'), )); ?>
example three:
<?php global $myOffset; $myOffset = 1; $wp_query = new WP_Query(); $wp_query->query(array( 'offset' => $myOffset, 'category__not_in' => array($GLOBALS['ex_asides'],7,84), 'paged' => $paged, 'showposts' => get_option('woo_other_entries'), )); ?>
And after those tries, I just can’t get more pages beyond the option’s that I choose, and can only pull an archive via the browse more link.
Any suggestions or anything?
Tips & Tricks
Pulling custom fields from outside the loop
In the last post “Creating a custom widget” I showed you how to create a custom widget. Well in this post I will show you how I used my custom widget to display all post with a certain custom field from outside the WordPress loop.
In the last post I used this tag:
<?php include(TEMPLATEPATH . '/includes/showcase.php'); ?>
Now I will show you what the file showcase.php
has:
<ul> <?php global $wpdb; $sql = "SELECT wposts.* FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = 'gallery-url' AND wposts.post_status = 'publish' AND wposts.post_type = 'post' ORDER BY wposts.post_date DESC LIMIT 8"; $pageposts = $wpdb->get_results($sql, OBJECT); $output = $pre_HTML; foreach ($pageposts as $post) : setup_postdata($post); ?> <li><a href="<?php echo get_post_meta($post->ID, "gallery-url", $single = true); ?>" title="Link to <?php the_title(); ?>"> <img src="<?php echo get_post_meta($post->ID, "image", $single = true); ?>" alt="<?php the_title(); ?>" /></a></li> <?php endforeach; ?> </ul>
That’s it! The most important item you may want to change for your own custom field is the line : AND wpostmeta.meta_key = 'gallery-url'
. Where you would change the text in bold to match your own custom field value.
Update:
Check out Austin from PressedWords comment below.
With his great advise I was able to figure out why all my attempts to use the query_post weren’t working. it came down to this line of code: <?php echo get_post_meta($post->ID, "gallery-url", $single = true); ?>
, that was what I had in my code, and the $post->ID
is the reason my code would not echo or print the custom field’s value. Solution? replace $post->ID
with get_the_ID()
. HA, so simple.
Tips & Tricks
Creating a custom widget
Today let’s learn a simple quick trick on how to create a custom widget. For my example I will show you how I created my Showcase widget located in the middle, to the right of the posts.
First under your functions.php
file type in the following:
<?php // Custom Widget function MyCustomWidget() { ?> <li class="widget"> <h2 class="heading">Latest Showcase</h2> <ul> <?php include(TEMPLATEPATH . '/includes/showcase.php'); ?> </ul> </li> <?php } register_sidebar_widget('The Custom Widget for Showcase', 'MyCustomWidget'); ?>
- Always make sure your code is between the
<?php
and?>
for it to work. - Once we call the function, the rest is assuming html code that you may or may not need.
- For instance, you may just put in a picture and call it a day. But my code starts with
<li<
because my sidebar’s start and end with<ul<
. - Any way, once your done, just set the final “
register_sidebar_widget('the widget title', 'the name of the function');
“
That’s it! Now you have a custom widget with what ever you want!
-
Tips & Tricks2 months ago
WordPress Security Hacks
-
Pages5 months ago
Write For Us – Guest Post
-
Showcase3 hours ago
StylizedWeb.com
-
News5 months ago
How to: Show/Hide any div box with jQuery in WordPress
-
Tips & Tricks4 months ago
Remove the title attribute using jQuery
-
Tips & Tricks1 month ago
How to: show/hide a widget in WordPress with jQuery
-
Plugins1 month ago
Top Membership plugins
-
Tips & Tricks5 months ago
Limit the characters that display on the_title
Ollie
May 6, 2009 at 6:09 am
I would agree that you should host wordpress on your own domain. It keeps the balance of control in your favour!