Search Engine Optimisation (SEO) Specialists

WordPress Snippets on the Homepage

Congratulations, you have decided to install a WordPress blog onto your site. Now you can let people know about yourself and your company, information about your products and services, and any promotions or competitions you may be running. You don’t need to post seven times a day, but one post a week is a little on the light side as search engines LOVE regularly updated content, which is what makes blogs so beneficial in your seo campaign.

But you do not want your blog to be the star of your site, you want the attention to be on the homepage. The purpose of this post is to show you how to get the most recent posts from your WordPress blog and put snippets (usually the first 30 words) onto the homepage.

The first thing we need to do is include the WordPress functions so that we can use them to pull the blogs we want. Place this code near the top of the page and definitely before the next section of code.
<?php
define("WP_USE_THEMES", false);
include("blog/wp-blog-header.php");
query_posts("showposts=3");
?>

What this block of code says is “we will format the blogs ourselves (do not include the WordPress themes), fetch all the functions that I’ll need to use WordPress here, and I want to have the 3 most recent posts”.

Now comes to fun part. We are going to do a mini-version of WordPress’s The Loop.

“The Loop is used by WordPress to display each of your posts. Using The Loop, WordPress processes each of the posts to be displayed on the current page and formats them according to how they match specified criteria within The Loop tags. Any HTML or PHP code placed in the Loop will be repeated on each post.” – WordPress Codex
 <div class="blog">
  <ul class="blogposts">
   <?php while (have_posts()): the_post(); ?>
    <li >
     <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
     <p><?php the_content_rss('', false, '', 30); ?></p>
     <a href="<?php the_permalink(); ?>">Read more…</a>
    </li>
   <?php endwhile; ?>
  </ul>
 </div>

In our loop, we are creating an unordered list containing the title of the post as a link, the first 30 words and a ‘read more’ link.

Obviously you style the snippets to fit into your website’s design. You can see how we have incorporated our most recent blog and news posts on our homepage.

Just like search engines, people will get bored of stale content. So by keeping fresh content on your homepage, people (as well as search engines) will be interested in visiting your site more often, and possible convert from potential customer, to paying customer.

Related posts:

  1. A Blog Makes Your Static Site Dynamic!
  2. An Introduction To WordPress As A CMS
  3. SEO Must-have: How to Connect your WordPress Blog to Twitter
  4. All a Twitter About Your Website
  5. Using WordPress Plugins and Optimising WordPress To Improve Search Engine Optimisation

Tags: , , , , ,

Link to us

If you want to link to this blog, copy and paste the following HTML code to your website.

Leave a Reply

Search Blogs

Highest Rated Blogs

Tag Cloud

Recent Blogs

Blog Categories

About SEO
ASK SEO
Bing and Search Engine Optimisation
Black and White Hat SEO
Browser Software and Search Engine Optimisation
Cheap SEO
Clicktelligence & SEO
CMS and Admin Systems and SEO
eCommerce and Search Engine Optimisation
Email Marketing
Ethical Search Engine Optimisation
Flash and SEO
General SEO News
Geo Targeting Search Engine Optimisation
Google Analytics
Google and Search Engine Optimisation
Google PageRank
Google PR Update
Google Webmaster Tools
Increase Search Traffic with SEO
International SEO
Internet Marketing
Keyword Research and Search Engine Optimisation
Latest News
Link Campaigns and Search Engine Optimisation
Meta Tags and SEO
Mobile SEO
Offpage Optimisation
Online Advertising
Onpage Optimisation
Page Load and SEO
Page Rank Update
Pay Per Click & SEO
Press Releases
Professional SEO
Real Time Search
Search Engine Indexing and Crawling
Search Engine Optimisation
Search Engine Optimisation Advice
Search Engine Optimisation Analysis
Search Engine Optimization
Search Engine Optimization Keywords
Search Engine Optimization Marketing
SEO Analysis for Results
SEO and Business
SEO and Search Engines
SEO Blogging
SEO Companies
SEO Consult
seo consultancy
SEO Copywriting
SEO Costs
SEO Domain Names
SEO Experiment
SEO Links
SEO Lists
SEO Management
SEO Penalties
SEO Rankings
SEO Sitemaps
SEO Strategy
SEO Submissions
SEO Techniques
SEO Tips
SEO Tools
seo video
SEO vs PPC
Site Analysis and Search Engine Optimisation
Site Architecture & SEO
Social Media Optimisation
Social Networking and Search Engine Optimization
Target Marketing with SEO
Top SEO Tips
Traffic & SEO
Twitter and Search Engine Optimisation
User Driven SEO
W3C and Search Engine Optimisation
Web Design
Website Development
Website Optimization
Wordpress For SEO
Yahoo! and Search Engine Optimisation
View All Categories

Archives

Authors

W3C XHTML Valid W3C CSS Valid W3C WAI  Internet Marketing RSS Feed for SEO Consult