I use Opera!

Wordpress SEO theme

Here is theme used on this blog as I promised. Sulumits Retsambew wp theme is based on Seo Simple by Internet Wealth Master, but I changed a lot of things, so that it fits my purpose. It is easily possible that this is most optimized wordpress seo theme ever.

Main characteristics of this improved theme are:

-         content close to the body (in original theme content is even closer)
-         valid xhtml/css
-         optimized h1 h2 h3 tags. Frontpage of the site has name of the site in h1, and blogposts in h2, blogposts pages have title of blogposts in h1.
-         works in Opera 10, Opera 9, Firefox, IE 6, IE 7, IE 8, Chrome and other browsers
-         lightweight (no images except logo, everything is done by using css)
-         static frontpage option with latest post on it
(to activate this set your Wordpress to use some page as frontpage then assign the Sulumits page template to that page, modify code of the sulumits.php to show all posts or to show posts only from certain category)

Some things are hard coded in to the template, so remember to check my code if you don’t have a clue how to change something.

DOWNLOAD SULUMITS RETSAMBEW SEO THEME

wordpressseotheme 500x429 Wordpress SEO theme

Posted in Sulumits Retsambew, wordpress — Hellas @ 1:42 pm @ August 18, 2009

Latest post in my Wordpress theme frontpage

I just did some upgrades on my Sulumits Retsambew theme. I added latest blog post to the static frontpage. I wanted to have combination of static page with dynamic content. So my fixed text is always above with the latest blog post from some category. Since I lost an hour with that I thought maybe you would have use of it.

Here is how to do it:

First thing if you use static page is to make template for that specific page. So first make the template let say frontpage.php. On the beginning of the code add this:

<?php
/*
Template Name: Front page
*/
?>

Then just copy all content from page.php bellow above code in frontpage.php.
Now we have customized code for our page. Go to Wordpress -> edit pages, on assign this template to our given page. Usually frontpage page.

Now we well add Latest post to our frontpage.

This code

<?php query_posts('showposts=1&cat=23'); ?>   
<?php while (have_posts()) : the_post(); ?>   
<div class="post"> 
<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="storycontent">
<?php the_excerpt(); ?>
<div class="date">
<div class="meta">
<?php _e("Posted in "); ?> <?php the_category(',') ?> &#8212; <?php the_author() ?> @ <?php the_time() ?> @ <?php the_date('','',''); ?> <?php edit_post_link(__('Edit This')); ?>
</div>
</div>  
</div>
</div>  
<?php endwhile; ?>

will show last post title, link, and default number of words from last post. Put it on needed position in your frontpage.php. Make wanted tweaks in css for post, storycontent, date, meta or just replace this with equilalents from your template. Also you can wrap all this in another div and gave the latest post special look.

Now we want to change the amount of text that the excerpt() function return us!

In your theme function.php file add this:

add_filter('excerpt_length', 'my_excerpt_length');
function my_excerpt_length($length) {
return 150; }

This code will modify excerpt and instead of default 100 it will show 150 words from given post.

You will notice that excerpt function has missing „Read more“ link at the end, and instead it will show [...].
You will replace [...] with the „Read more“ link with this code:

function excerpt_ellipse($text) {
   return str_replace('[...]', ' <a href="'.get_permalink().'">Read more...</a>', $text); }
add_filter('the_excerpt', 'excerpt_ellipse');

Add it also into your theme functions.php.

Be careful, to not add any space to the beginning or the end of the functions.php or you will get the „Cannot modify header information – headers already sent function.php wordpress“ error.

That is it. To see how this work check my Sulumits Retsambew frontpage. Notice that I show posts only from category that is related to the Sulumits Retsambew.

Posted in Sulumits Retsambew, wordpress — Hellas @ 10:59 am @ April 28, 2009