<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blogsessive &#187; Coding Tips</title>
	<atom:link href="http://blogsessive.com/archive/blogging-tools/coding-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogsessive.com</link>
	<description>Visit Blogsessive for daily WordPress blogging tips.</description>
	<lastBuildDate>Fri, 16 Dec 2011 08:05:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>How to add backward compatibility to a WordPress 3.0 ready theme</title>
		<link>http://blogsessive.com/blogging-tools/backward-compatibility-wordpress-30-ready-theme/</link>
		<comments>http://blogsessive.com/blogging-tools/backward-compatibility-wordpress-30-ready-theme/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 20:12:12 +0000</pubDate>
		<dc:creator>Alex, Blogsessive</dc:creator>
				<category><![CDATA[Blog Design]]></category>
		<category><![CDATA[Blogging Tools]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[custom menus]]></category>
		<category><![CDATA[post thumbnails]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogsessive.com/?p=1787</guid>
		<description><![CDATA[Have you read "How To Be a Rockstar WordPress Designer" yet?The latest major release of our favorite blogging platform &#8211; WordPress 3.0 &#8211; has brought quite a few new features to the table. Among them, the custom navigation menus and the post thumbnails (featured image), the latter being available since version 2.9 came out. This [...]]]></description>
			<content:encoded><![CDATA[<p>With the StudioPress WordPress themes you can really <a href="http://blogsessive.com/go-studiopress/" title="Take Your Blog to a Higher Level" target="ejejcsingle"><strong>take your blog to a higher level</strong></a>!<p>The latest major release of our favorite blogging platform &#8211; WordPress 3.0 &#8211; has brought quite a few new features to the table. Among them, the custom navigation menus and the post thumbnails (featured image), the latter being available since version 2.9 came out. This started a whole new trend between theme developers, most of them rushing to announce WordPress 3.0 ready themes.</p>
<p>In all this rush, some of the themes released suffered from one big problem: backward compatibility. Why is that important and how can we give some backward compatibility to our WordPress 3.0 ready themes?<span id="more-1787"></span></p>
<h3>Importance of backward compatibility</h3>
<p>While I feel that generally offering some sort of backward compatibility is just a common sense policy, in this case it&#8217;s more than that. Let me explain why.</p>
<p>Not everyone uses the latest WordPress release, and that is for various reasons:</p>
<ul>
<li>Failed to update, or waiting to make sure it&#8217;s &#8220;stable&#8221;;</li>
<li>Doesn&#8217;t really get the importance of an up to date software;</li>
<li>Certain plugins they use are not yet 3.0/3.0.1 compatible.</li>
</ul>
<p>This doesn&#8217;t mean they don&#8217;t want to try and use your beautiful 3.0 ready WordPress theme, or that they shouldn&#8217;t. But you see, the biggest trick resides right here, in this terminology: &#8220;3.0 ready&#8221;. The actual meaning of this is that the theme is compatible with the 3.0 version, not that it requires 3.0 or higher to function properly, and this leads a lot of people into a trap that will cause their blogs and websites to break.</p>
<p>So, the common sense thing to do would be to take the time and apply certain checks and fallback solutions to our themes. Lets see how we can do that.</p>
<h3>Adding WordPress 3.0 features with fallback support</h3>
<p>Both of the above mentioned features &#8211; custom menus and post thumbnails &#8211; are based on a WordPress function added once 2.9 was released: <strong>add theme support();</strong></p>
<h4>Adding post thumbnails support</h4>
<p>In order to add post thumbnail support to your theme, you&#8217;d write this in your <em>functions.php</em> file:</p>
<pre class="brush: php">
// Adds support for post thumbnails
add_theme_support(&#039;post-thumbnails&#039;);</pre>
<p>Simple adding this will cause any WordPress installation prior to 2.9 to break, as the <em>add_theme_support()</em> function was not part of the WordPress core back then. The fix? As easy as this:</p>
<pre class="brush: php">
/* Checks if the installation has the function defined.
If true, continues to add the support for post thumbnails. */
if(function_exists(add_theme_support)) :
	add_theme_support(&#039;post-thumbnails&#039;);
endif;</pre>
<h4>Adding custom menus support</h4>
<p>In order to also add support for the custom menus feature, you&#8217;d normally write this:</p>
<pre class="brush: php">// Add theme support for custom menus
add_theme_support( &#039;menus&#039; );

// Register a custom menu name/location
register_nav_menus(array(
	&#039;custom-menu&#039; =&gt; __( &#039;My Custom Menu&#039; ),
));
</pre>
<p>In this case, we obviously need to check for core support of both functions: <em>add_theme_support()</em> and <em>register_nav_menus()</em>. Let see how we can do that, also including in this check the post thumbnails:</p>
<pre class="brush: php">
if(function_exists(add_theme_support)) {
	add_theme_support(&#039;post-thumbnails&#039;); // Support for post thumbnails

	if(function_exists(add_theme_support)) {
		add_theme_support( &#039;menus&#039; ); // Support for custom menus
		register_nav_menus(array(
			&#039;custom-menu&#039; =&gt; __( &#039;My Custom Menu&#039; ),
		));
	}
}
</pre>
<p>In case you wonder why I chose to add support for menus only after checking if <em>register_nav_menus()</em> is defined, it&#8217;s simply because there&#8217;s no point in adding support for a feature that you won&#8217;t be able to use. Remember, <em>add_theme_support()</em> was added in 2.9, while <em>register_nav_menus()</em> became available only in 3.0.</p>
<p>But how about adding compatibility in the front-end of your theme?</p>
<p>When using post thumbnails, never call them without checking if the function exists first:</p>
<pre class="brush: php">
// Performs a check to see if the function is available and there&#039;s also a thumbnail attached
if (function_exists(the_post_thumbnail) AND has_post_thumbnail()) {
	the_post_thumbnail();
}
</pre>
<p>For the custom menus, the thing is just a tad trickier, but simple as well. I&#8217;m usually using a function that I wrote to specifically check for custom menus support, and even though the <em>wp_nav_menu()</em> function provides a fallback solution, defaulted to <em>wp_page_menu()</em>, this fallback will only activate for 3.0 installations without any menus created and allocated to the reserved space. The fallback won&#8217;t set off if you&#8217;re using a version prior to 3.0.</p>
<p>Due to my preference of <em>wp_list_pages()</em> over <em>wp_page_menu()</em> &#8211; for more customization options &#8211; the following function will apply a compatibility fallback to wp_list_pages:</p>
<pre class="brush: php">
function my_nav_menu() {
	// Check if installation has wp_nav_menu() defined.
	// If true, generate the menu, but don&#039;t print it yet;
	if(function_exists(wp_nav_menu)) {
		$my_nav_menu = wp_nav_menu(array(&#039;menu&#039; =&gt; &#039;Top Menu&#039;, &#039;container&#039; =&gt; &#039;&#039;, &#039;fallback_cb&#039; =&gt; &#039;wp_list_pages&#039;, &#039;depth&#039; =&gt; 2, &#039;echo&#039; =&gt; false));
	}
	// If false, generate the menu using wp_list_pages, but don&#039;t print it yet;
	else {
		$my_nav_menu = &#039;&lt;ul class=&quot;menu&quot;&gt;&#039;.wp_list_pages(&#039;sort_column=menu_order&amp;title_li=&amp;echo=0&amp;depth=2&#039;).&#039;&lt;/ul&gt;&#039;;
	}
	// Prints out the menu;
	echo $my_nav_menu;
}
</pre>
<p>Now, in the front end. instead of calling your menu with <em>wp_nav_menu()</em> you&#8217;ll now use <em>my_nav_menu()</em> to display a backward compatible version.</p>
<h3>Conclusions</h3>
<p>Caught in the rush of doing something nice and new, like a child discovering a shiny new toy, we can miss out some of the most basic problems. Most of them are really easy to solve, like the above mentioned and it would be common sense to make use of them.</p>
<p>And remember: <strong>if ( function_exists(function_name) )</strong> is your geeky <abbr title="Best Friends Forever"><strong>B.F.F.</strong></abbr></p>
<hr /><h3>Free PDF eBook: Corporate Blogging Guide by Blogsessive</h3>As a subscribe reader of Blogsessive, this is my gift to you: a guide to corporate blogging (but not only) that will help you in your blogging adventures! <a href="http://blogsessive.com/wp-content/plugins/download-monitor/download.php?id=8" target="_blank">Download now, for FREE!</a><br /><br /><hr/><div style="background: #eeeeee;">Advertise on Blogsessive! <a href="http://buysellads.com/buy/detail/310/" title="Advertise on Blogsessive">125x125 banners</a> for <strong>$50 per month</strong>!</div>&copy;2008-2010 Copyright by <a href="http://blogsessive.com" title="Blogging tips">Blogsessive - Blogging Tips</a>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please <a href="http://blogsessive.com/contact" title="Contact Blogsessive">contact us</a>, so that we can take legal action immediately.<img src="http://blogsessive.com/?ak_action=api_record_view&id=1787&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blogsessive.com/blogging-tools/backward-compatibility-wordpress-30-ready-theme/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>A Look Into the WordPress Themes&#8217; Options Pages</title>
		<link>http://blogsessive.com/blogging-tools/wordpress-themes-options-pages/</link>
		<comments>http://blogsessive.com/blogging-tools/wordpress-themes-options-pages/#comments</comments>
		<pubDate>Thu, 14 May 2009 21:59:45 +0000</pubDate>
		<dc:creator>Alex, Blogsessive</dc:creator>
				<category><![CDATA[Blog Design]]></category>
		<category><![CDATA[Blogging Tools]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[options]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogsessive.com/?p=1368</guid>
		<description><![CDATA[Do you need quality design resources? Graphic River has them. Tons! And cheap...For a long while the option panels where something that people could only find in premium (commercial) themes, and for a good reason. The pricing of their licenses allowed the premium theme developers to invest more time in giving theme users the ways [...]]]></description>
			<content:encoded><![CDATA[<p>Do you need <a href="http://blogsessive.com/go-graphicriver/" title="Quality Graphic Design Resources" target="_blank"><strong>quality design resources</strong></a>? Graphic River has them. Tons! And cheap...</p><p>For a long while the option panels where something that people could only find in premium (commercial) themes, and for a good reason. The pricing of their licenses allowed the premium theme developers to invest more time in giving theme users the ways to do through these panels what they could not do through coding.</p>
<p>With the buzz created around these themes, regular users became aware of what could really be achieved, and thus, those that could not afford the license of a premium theme, became more selective with the free ones. A good-looking theme was not enough anymore, and WordPress developers realized it.</p>
<p>A good premium theme would bring its developer not only a good amount of money, but also recognition in the community, and this is where the free theme developers scored their biggest points. Now that their &#8220;turf&#8221; was endangered they had to react, and they did. For premium themes like <a href="http://blogsessive.com/go-thesis/">Thesis</a> or <a href="http://www.wpunlimited.com/" target="_blank">WP Unlimited</a>, users have now alternatives like <a href="http://themeshaper.com/thematic/" target="_blank">Thematic</a>, <a href="http://themehybrid.com/" target="_blank">Hybrid</a>, <a href="http://carringtontheme.com/" target="_blank">Carrington</a>, <a href="http://wpframework.com/" target="_blank">WP Framework</a> or my own (even if not a framework) <a href="http://blogsessive.com/blogging-tools/download-simple-balance-22-xmas-edition/" target="_blank">Simple Balance</a>.</p>
<h3>Why should free theme developers consider adding an options page?</h3>
<p>Because being &#8220;cool&#8221; is just not enough anymore. Theme developers need to learn how to be useful. Free stuff can be either useless and ignored or useful and praised. I&#8217;m yet to see the developer offering a free theme without <a title="How to (Really) Benefit from Offering Free Stuff" href="http://blogsessive.com/blogging-tips/free-stuff/" target="_blank">gaining something from it</a>, be it awareness, expertise, backlinks, donation money, you name it! But none of these are achieved through an uncompetitive  &#8211; even if free &#8211; product.<span id="more-1368"></span></p>
<h3>5 Most looked for options in a WordPress theme</h3>
<p>&#8220;Stand out from the crowd!&#8221; If I had a penny for every time I read this I&#8217;d laugh at <a href="http://www.shoemoney.com/gallery/v/misc/adsensecheck.jpg.html" target="_blank">Shoemoney&#8217;s AdSense check image</a> sipping a chilled cocktail somewhere on a tropical island, but you know what? This saying is so true that it cannot be repeated enough, and <strong>users KNOW IT</strong>! Theme users want to be able to have their own identity online. They need to be able to customize their themes and make them express who they are and what they believe in. And this is where options pages come into play. What are the most looked for options? Let&#8217;s see&#8230;</p>
<h4>1. Logo and / or header image update / replacement</h4>
<p>It doesn&#8217;t matter if it&#8217;s a professionally designed logo or a simple Windows Paint play. If it gives the blogger satisfaction and he wants to display it, let him do so. Add either a file upload box or an input box where the user could enter the full URL to the logo image to use. Same goes for the header images.</p>
<h4>2. Layout structure</h4>
<p>If you&#8217;re developing a 2 column theme, give the user the option to choose to display the sidebar either on the left, or on the right. With <a href="http://blogsessive.com/blogging-tools/20-free-3-column-wordpress-themes/" target="_blank">3 column themes</a>, you can give them even more options, like having the content centered, between the sidebars, or having both sidebars on the same side (right or left) of the content. If only takes a couple of PHP conditions and some &#8220;visionary&#8221; CSS coding.</p>
<h4>3. Custom navigation menus</h4>
<p>Don&#8217;t expect users to want every page that they publish to show up in their blog&#8217;s main navigation area. Give them the option to select which pages should show up there, and why not, add their own links, even if external.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1378" title="Navigation options" src="http://blogsessive.com/wp-content/uploads/2009/05/main-navigation.gif" alt="Navigation options" width="500" height="126" /></p>
<h4>4. Custom RSS URLs and email subscription forms</h4>
<p>Implementing a FeedBurner email subscription form is fairly easy for any developer, and I&#8217;m pretty sure that any dveloper knows how to customize such a script. The fact that it functions mostly based on a simple user ID should make the customization even easier through a theme options page.</p>
<h4>5. Advertising management</h4>
<p>Not everyone uses services like <a href="http://buysellads.com" target="_blank">BuySellAds</a>, or is affiliated with an advertising network. Some users actually prefer to take care of the advertising themselves. So, why not give them the possibility to do so by adding a few more field to the options page. Let them select the number of banners they need displayed, do-follow option, position of banners and so on. It takes a bit to develop, but the user response to it is amazing.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1382" title="Advertising options" src="http://blogsessive.com/wp-content/uploads/2009/05/advertising.gif" alt="Advertising options" width="500" height="280" /></p>
<h4>Additional options you could consider implementing</h4>
<p>While the 5 options above are the most looked for, some users might also find the following options useful:</p>
<ul>
<li>Overall switch between <strong>serif and sans-serif typography</strong>;</li>
<li>Theme <strong>color adjustments</strong>. Here are a couple of web-based color picker scripts you could use: <a href="http://acko.net/dev/farbtastic" target="_blank">one</a>, <a href="http://www.eyecon.ro/colorpicker/" target="_blank">two</a>, <a href="http://www.intelliance.fr/jquery/color_picker/" target="_blank">three</a> and <a href="http://vreboton.ibacolod.com/DotNetNuke/ControlsandTips/jQueryColorPicker/tabid/69/Default.aspx" target="_blank">four</a>;</li>
<li>Alternatively, you can offer a built in color schemes system;</li>
<li>Custom <strong>&#8220;featured&#8221; areas</strong>;</li>
<li>Additional, customizable <strong>widget areas</strong>;</li>
<li>Twitter updates area;</li>
<li>And the list could go on and on&#8230;</li>
</ul>
<h3>The limits are set by your knowledge and enthusiasm</h3>
<p>While the enthusiasm is not something you train, but rather have it or not, knowledge can be trained. Remember that the <a href="http://codex.wordpress.org/Main_Page">WordPress Codex</a> is your best friend, and the <a href="http://wordpress.org/support/">support forums</a> can be of tremendous help. Additionally, Stefan Vervoort of <a href="http://divitodesign.com/" target="_blank">DivitoDesign</a> and WPToy has put together a very useful PDF called the &#8220;<a href="http://wptoy.com/resources/wordpress-theme-development-check-list-pdf-version/" target="_blank">WordPress Theme Development Checklist</a>&#8220;. Do take a look (and use it!).</p>
<p>So, the next time you think of releasing a free theme, ask yourself this: <strong>Is you theme competitive enough?</strong> If it&#8217;s not, it will not stand a chance when the alternatives are so smart!</p>
<hr /><h3>Free PDF eBook: Corporate Blogging Guide by Blogsessive</h3>As a subscribe reader of Blogsessive, this is my gift to you: a guide to corporate blogging (but not only) that will help you in your blogging adventures! <a href="http://blogsessive.com/wp-content/plugins/download-monitor/download.php?id=8" target="_blank">Download now, for FREE!</a><br /><br /><hr/><div style="background: #eeeeee;">Advertise on Blogsessive! <a href="http://buysellads.com/buy/detail/310/" title="Advertise on Blogsessive">125x125 banners</a> for <strong>$50 per month</strong>!</div>&copy;2008-2010 Copyright by <a href="http://blogsessive.com" title="Blogging tips">Blogsessive - Blogging Tips</a>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please <a href="http://blogsessive.com/contact" title="Contact Blogsessive">contact us</a>, so that we can take legal action immediately.<img src="http://blogsessive.com/?ak_action=api_record_view&id=1368&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blogsessive.com/blogging-tools/wordpress-themes-options-pages/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>WordPress How To: Latest Posts by Category Archive</title>
		<link>http://blogsessive.com/blogging-tools/latest-posts-by-category-archive/</link>
		<comments>http://blogsessive.com/blogging-tools/latest-posts-by-category-archive/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 02:47:30 +0000</pubDate>
		<dc:creator>Alex, Blogsessive</dc:creator>
				<category><![CDATA[Blog Design]]></category>
		<category><![CDATA[Blogging Tools]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogsessive.com/?p=1047</guid>
		<description><![CDATA[Have you read "How To Be a Rockstar WordPress Designer" yet?One technique that is most common with WordPress magazine or news style themes is the display of an archive of the latest posts by category, as simple titles or with post excerpts. This is useful for the previously mentioned theme styles, but not only. It [...]]]></description>
			<content:encoded><![CDATA[<p>With the StudioPress WordPress themes you can really <a href="http://blogsessive.com/go-studiopress/" title="Take Your Blog to a Higher Level" target="ejejcsingle"><strong>take your blog to a higher level</strong></a>!<p><a title="WordPress - Latest posts by category" href="http://blogsessive.com/wp-content/uploads/2009/02/latest-posts-by-category-archive.gif" target="_blank"><img style="float: right; margin-left: 20px; border: 1px solid #ebe6dc; padding: 5px;" title="Latest posts by category archive" src="http://blogsessive.com/wp-content/uploads/2009/02/latest-posts-by-category-archive-150x150.gif" alt="WordPress - Latest posts by category" width="150" height="150" /></a>One technique that is most common with WordPress magazine or news style themes is the display of an archive of the latest posts by category, as simple titles or with post excerpts. This is useful for the previously mentioned theme styles, but not only. It can be used to set up custom blog homepages, 404 pages, landing pages or even a special archive page.</p>
<p>This tutorial will help you build a &#8216;<strong>Latest Posts by Category Archive</strong>&#8216; in a very easy way. The widths in the CSS styling presented below have been calculated based on the default WordPress theme, assuming that is the most common theme available to anyone.</p>
<p>If you are looking for a plugin to generate such an archive, please check out: <a href="http://blogsessive.com/blogging-tools/wp-plugin-latest-posts-by-category-archive/" target="_blank" title="WordPress Plugin: Latest Posts by Category Archive"><strong>WP Plugin: Latest Posts by Category Archive</strong></a>.</p>
<h3>Setting up the page template</h3>
<p>Open up you favorite code editor and create a blank document. Save the document as &#8216;category-archive.php&#8217; (or any other name you&#8217;d prefer) in the default WordPress theme directory (wp-content/themes/default).</p>
<p>The first step is to asign our new template a name and a page-like structure, so based on the default theme&#8217;s page template, the code you should paste in your new document is:</p>
<pre class="brush: php">
&lt;?php
/*
Template Name: Category Archive
*/
?&gt;

&lt;?php get_header(); ?&gt;

&lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot;&gt;

	&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
	&lt;div class=&quot;post&quot; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;
	&lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
		&lt;div class=&quot;entry&quot;&gt;
			&lt;?php the_content(&#039;&lt;p class=&quot;serif&quot;&gt;Read the rest of this page &amp;raquo;&lt;/p&gt;&#039;); ?&gt;

			&lt;?php wp_link_pages(array(&#039;before&#039; =&gt; &#039;&lt;p&gt;&lt;strong&gt;Pages:&lt;/strong&gt; &#039;, &#039;after&#039; =&gt; &#039;&lt;/p&gt;&#039;, &#039;next_or_number&#039; =&gt; &#039;number&#039;)); ?&gt;

		&lt;/div&gt;
	&lt;/div&gt;
	&lt;?php endwhile; endif; ?&gt;

	&lt;!-- Category Archive Start --&gt;
	&lt;!-- Category Archive End --&gt;

&lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;
</pre>
<p>The template above will make sure to display the page name you set up, and also, any additional content you might want to add <em>before the archive</em>, from you WordPress page editor. We will be adding our &#8216;latest posts by category&#8217; code between the &#8216;Category Archive Start&#8217; and &#8216;Category Archive End&#8217; comments.<span id="more-1047"></span></p>
<h3>Adding the archive&#8217;s PHP code</h3>
<p>Simply put, the code below will cycle through the first-level categories of your blog (parent categories), check for the ones that are not empty and if this condition is met, return an unordered list of the latest 5 post from each category. Empty categories will not be displayed.</p>
<pre class="brush: php">
&lt;?php
/*
Template Name: Category Archive
*/
?&gt;

&lt;?php get_header(); ?&gt;

&lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot;&gt;

	&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
	&lt;div class=&quot;post&quot; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;
	&lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
		&lt;div class=&quot;entry&quot;&gt;
			&lt;?php the_content(&#039;&lt;p class=&quot;serif&quot;&gt;Read the rest of this page &amp;raquo;&lt;/p&gt;&#039;); ?&gt;

			&lt;?php wp_link_pages(array(&#039;before&#039; =&gt; &#039;&lt;p&gt;&lt;strong&gt;Pages:&lt;/strong&gt; &#039;, &#039;after&#039; =&gt; &#039;&lt;/p&gt;&#039;, &#039;next_or_number&#039; =&gt; &#039;number&#039;)); ?&gt;

		&lt;/div&gt;
	&lt;/div&gt;
	&lt;?php endwhile; endif; ?&gt;

	&lt;!-- Category Archive Start --&gt;
	&lt;ul class=&quot;catArchive&quot;&gt;
	&lt;?php
	$catQuery = $wpdb-&gt;get_results(&quot;SELECT * FROM $wpdb-&gt;terms AS wterms INNER JOIN $wpdb-&gt;term_taxonomy AS wtaxonomy ON ( wterms.term_id = wtaxonomy.term_id ) WHERE wtaxonomy.taxonomy = &#039;category&#039; AND wtaxonomy.parent = 0 AND wtaxonomy.count &gt; 0&quot;);

	$catCounter = 0;

	foreach ($catQuery as $category) {

		$catCounter++;

		$catStyle = &#039;&#039;;
		if (is_int($catCounter / 2)) $catStyle = &#039; class=&quot;catAlt&quot;&#039;;

		$catLink = get_category_link($category-&gt;term_id);

		echo &#039;&lt;li&#039;.$catStyle.&#039;&gt;&lt;h3&gt;&lt;a href=&quot;&#039;.$catLink.&#039;&quot; title=&quot;&#039;.$category-&gt;name.&#039;&quot;&gt;&#039;.$category-&gt;name.&#039;&lt;/a&gt;&lt;/h3&gt;&#039;;
			echo &#039;&lt;ul&gt;&#039;;

			query_posts(&#039;cat=&#039;.$category-&gt;term_id.&#039;&amp;showposts=5&#039;);?&gt;

			&lt;?php while (have_posts()) : the_post(); ?&gt;
				&lt;li&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;?php endwhile; ?&gt;

				&lt;li&gt;&lt;a href=&quot;&lt;?php echo $catLink; ?&gt;&quot; title=&quot;&lt;?php echo $category-&gt;name; ?&gt;&quot;&gt;More &lt;strong&gt;&lt;?php echo $category-&gt;name; ?&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;/ul&gt;
		&lt;/li&gt;
		&lt;?php }	?&gt;
	&lt;/ul&gt;
	&lt;!-- Category Archive End --&gt;

&lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;
</pre>
<p>You should now save your file, because <strong>we&#8217;re done editing it</strong>. As you can see, the archive code has been added between the &#8216;Start&#8217; and &#8216;End&#8217; comments. Now let&#8217;s go through the code and dissect it.</p>
<h3>The PHP code explained</h3>
<p>The first thing we do is to set up a database query to cycle through the non-empty parent categories:</p>
<pre class="brush: php">
$catQuery = $wpdb-&gt;get_results(&quot;SELECT * FROM $wpdb-&gt;terms AS wterms INNER JOIN $wpdb-&gt;term_taxonomy AS wtaxonomy ON ( wterms.term_id = wtaxonomy.term_id ) WHERE wtaxonomy.taxonomy = &#039;category&#039; AND wtaxonomy.parent = 0 AND wtaxonomy.count &gt; 0&quot;);
</pre>
<p>You can further tweak this query to exclude categories or specify categories to be listed based on their ID, with the use of the MySQL comparison functions NOT IN or IN.</p>
<p>Let&#8217;s say that you&#8217;d like the archive to exclude the categories with IDs 2, 5 and 6. Your query would become:</p>
<pre class="brush: php">
$catQuery = $wpdb-&gt;get_results(&quot;SELECT * FROM $wpdb-&gt;terms AS wterms INNER JOIN $wpdb-&gt;term_taxonomy AS wtaxonomy ON ( wterms.term_id = wtaxonomy.term_id ) WHERE wtaxonomy.taxonomy = &#039;category&#039; AND wtaxonomy.parent = 0 AND wtaxonomy.count &gt; 0 AND wterms.term_id NOT IN (2,5,6)&quot;);
</pre>
<p>Similarly, if you want to display only the categories with IDs 2,5 and 6, you&#8217;d have:</p>
<pre class="brush: php">
$catQuery = $wpdb-&gt;get_results(&quot;SELECT * FROM $wpdb-&gt;terms AS wterms INNER JOIN $wpdb-&gt;term_taxonomy AS wtaxonomy ON ( wterms.term_id = wtaxonomy.term_id ) WHERE wtaxonomy.taxonomy = &#039;category&#039; AND wtaxonomy.parent = 0 AND wtaxonomy.count &gt; 0 AND wterms.term_id IN (2,5,6)&quot;);
</pre>
<p>For further help with comparison operators and functions, you can check out the <a href="http://dev.mysql.com/doc/refman/5.1/en/comparison-operators.html" target="_blank" title="MySQL Comparison Operators and Functions">MySQL manual</a>.</p>
<p>Next, we set up a category counter which will be incremented each time a category will be displayed. Based on this counter, the code adds a &#8216;<strong>catAlt</strong>&#8216; class that you can use to style differently consecutive categories. In our case, we&#8217;ll use it to shift the categories into two columns. This is were the alternate classes are assigned:</p>
<pre class="brush: php">
$catCounter++;

$catStyle = &#039;&#039;;
if (is_int($catCounter / 2)) $catStyle = &#039; class=&quot;catAlt&quot;&#039;;
</pre>
<p>The category list is built by the use of <strong>foreach</strong> and it helps retrieve vital information about the categories, such as name and permalink:</p>
<pre class="brush: php">
foreach ($catQuery as $category) {
	/* Code used to retrieve and display the latest posts */
}
</pre>
<p>After we display the category title and link through this line of code</p>
<pre class="brush: php">
echo &#039;&lt;li&#039;.$catStyle.&#039;&gt;&lt;h3&gt;&lt;a href=&quot;&#039;.get_category_link($category-&gt;term_id).&#039;&quot; title=&quot;&#039;.$category-&gt;name.&#039;&quot;&gt;&#039;.$category-&gt;name.&#039;&lt;/a&gt;&lt;/h3&gt;&#039;;
</pre>
<p>we continue by using a custom query to retrieve the latest 5 posts from the current category in the cycle, followed by a link to the complete category archive:</p>
<pre class="brush: php">
query_posts(&#039;cat=&#039;.$category-&gt;term_id.&#039;&amp;showposts=5&#039;);?&gt;

&lt;?php while (have_posts()) : the_post(); ?&gt;
	&lt;li&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;
&lt;?php endwhile; ?&gt;
	&lt;li&gt;&lt;a href=&quot;&lt;?php echo $catLink; ?&gt;&quot; title=&quot;&lt;?php echo $category-&gt;name; ?&gt;&quot;&gt;More &lt;strong&gt;&lt;?php echo $category-&gt;name; ?&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
</pre>
<p>And that&#8217;s about everything in terms of coding! Now, onto the CSS styling.</p>
<h3>Styling the archive</h3>
<p>Find the <strong>style.css</strong> file in your default theme&#8217;s directory, open it and scroll down to the end of the file. Now copy the code below and paste it in your file.</p>
<pre class="brush: css">
/* Latest posts by category styles */

.catArchive {
	width: 450px;
	overflow: hidden;
	margin: 20px 0 0 0;
	padding: 0;
	list-style-type: none;
}

.catArchive h3 {
	font: normal bold 18px sans-serif;
	border-bottom: 1px solid #666;
	margin: 0;
	padding: 0 0 3px 0;
	display: block;
}

.catArchive li {
	display: block;
	float: left;
	width: 210px;
	margin: 0 30px 30px 0;
}

.catArchive ul {
	margin: 0;
	padding: 0;
}

.catArchive li li {
	border-bottom: 1px solid #ddd;
	margin: 0;
	padding: 4px 0;
}

.catAlt {
	margin-right: 0 !important;
}
</pre>
<p>Now, save the file. We&#8217;re done!</p>
<p><strong>Note:</strong> Keep in mind that column sizes have been calculated based on the available space (450 pixels) in the default theme&#8217;s content area. So, our columns should each be 210 pixels wide, with a 30 pixels spacing between them.</p>
<p>Since the column shifting is done with the help of <strong>float</strong>, I&#8217;ve set the overflow to hidden to stretch the list full height. This can only work with a fixed given container width, which in our case is 450px set on <strong>.catArchive</strong>.</p>
<p>If your new to &#8220;floating&#8221;, Sarah has posted a fairly easy to understand article about <a href="http://www.bloggingtips.com/2009/02/12/understanding-the-float-property/" target="_blank" title="The CSS float property">the float property</a> on BloggingTips.com.</p>
<p>You can download an archive containing both source files: <a href="http://blogsessive.com/wp-content/plugins/download-monitor/download.php?id=4" title="Download Latest Posts by Category source files"><strong>Download</strong></a>.</p>
<hr /><h3>Free PDF eBook: Corporate Blogging Guide by Blogsessive</h3>As a subscribe reader of Blogsessive, this is my gift to you: a guide to corporate blogging (but not only) that will help you in your blogging adventures! <a href="http://blogsessive.com/wp-content/plugins/download-monitor/download.php?id=8" target="_blank">Download now, for FREE!</a><br /><br /><hr/><div style="background: #eeeeee;">Advertise on Blogsessive! <a href="http://buysellads.com/buy/detail/310/" title="Advertise on Blogsessive">125x125 banners</a> for <strong>$50 per month</strong>!</div>&copy;2008-2010 Copyright by <a href="http://blogsessive.com" title="Blogging tips">Blogsessive - Blogging Tips</a>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please <a href="http://blogsessive.com/contact" title="Contact Blogsessive">contact us</a>, so that we can take legal action immediately.<img src="http://blogsessive.com/?ak_action=api_record_view&id=1047&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blogsessive.com/blogging-tools/latest-posts-by-category-archive/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
		<item>
		<title>10 Must-See Videos on WordPress.TV</title>
		<link>http://blogsessive.com/blogging-tips/10-must-see-videos-on-wordpresstv/</link>
		<comments>http://blogsessive.com/blogging-tips/10-must-see-videos-on-wordpresstv/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 19:45:34 +0000</pubDate>
		<dc:creator>Alex, Blogsessive</dc:creator>
				<category><![CDATA[Blog Design]]></category>
		<category><![CDATA[Blogging Tips]]></category>
		<category><![CDATA[Blogging Tools]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[guides]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress TV]]></category>

		<guid isPermaLink="false">http://blogsessive.com/?p=938</guid>
		<description><![CDATA[Looking for really affordable premium WordPress themes?As some of you might already know, back on January 17th, the folks at Automattic have launched WordPress.TV, a website they plan on turning into &#8220;Your Visual Resource for All Things WordPress&#8221;. This is a definitely a great project that will undoubtedly become a WordPress resource hot spot. On [...]]]></description>
			<content:encoded><![CDATA[<p>Looking for really <a href="http://blogsessive.com/go-themeforest/" title="Affordable Premium WP Themes" target="_blank"><strong>affordable premium WordPress themes</strong></a>?</p><p>As some of you might already know, back on January 17th, the folks at <a title="Automattic" href="http://automattic.com/" target="_blank">Automattic</a> have launched <strong><a title="WordPress TV" href="http://wordpress.tv/" target="_blank">WordPress.TV</a></strong>, a website they plan on turning into &#8220;Your Visual Resource for All Things WordPress&#8221;.</p>
<p>This is a definitely a great project that will undoubtedly become a WordPress resource hot spot. On what do I base my belief? On the amazing community of people around this extraordinary blogging (and not only) platform that is WordPress.</p>
<p>It&#8217;s enough to check out their support forums and see the kind of involvement that people show, how willing they are to help, solve problems and answer questions. So yes, I think that the WordPress TV will be a success.</p>
<p>The reasons behind this launch are simple. The WordPress community needs a place where video information (news, tutorials and so on) finds its way to people, after passing through a certain quality filter, where it will be kept up to date with ad/spam free.</p>
<p>By the looks of it, after only one week of existence, <a title="One week with WordPress TV" href="http://blog.wordpress.tv/2009/01/23/wordpresstv-and-you-one-week-on/" target="_blank">the community response is amazing</a>.</p>
<p>So, in case you&#8217;ve missed the launch (but not only for this reason), in this post I&#8217;m going to guide you to <strong>10 must-see videos on WordPress.TV</strong>.<span id="more-938"></span> Since the website is fairly new, most of these videos are addressed to WordPress.com users, or users that are new to WordPress in general. So, as a heads-up, those of you with a fair level of knowledge might not find these vids to be very educational or spectacular.</p>
<p>But before we get to those 10 videos, let&#8217;s start with a small WordPress.TV introductory video.</p>
<h3>Welcome to WordPress.TV Video</h3>
<p><embed src="http://v.wordpress.com/DEesBAlR" type="application/x-shockwave-flash" width="630" height="354" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<h3>1. The WordPress.com Dashboard</h3>
<p>New to WordPress and its amazing dashboard? At a first glance, the dashboard might seem like a lot information to digest, but with the new administrative options, the dashboard turn into one of the most important and accessible tools on your blog. (<a title="The WordPress.com dashboard - introduction" href="http://wordpress.tv/2009/01/05/the-wordpresscom-dashboard-introduction/" target="_blank">Video source</a>)</p>
<p><embed src="http://v.wordpress.com/TNpNObS3" type="application/x-shockwave-flash" width="630" height="354" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<h3>2. How to get a post out quickly with QuickPress</h3>
<p>This video walks you through the functions and capabilities of &#8220;QuickPress&#8221;, a section on the dashboard of your self-installed or WordPress.com blog. The purpose of this section is to fasten the publishing of those posts you really need to get out quick, without wasting time with every possible setting available. (<a title="Getting a post out quickly with QuickPress&lt;br &gt;&lt;/a&gt;" href="http://wordpress.tv/2009/01/05/getting-a-post-out-quickly-with-quickpress/" target="_blank">Video source</a>)</p>
<p><embed src="http://v.wordpress.com/MLuVmwS8" type="application/x-shockwave-flash" width="630" height="354" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<h3>3. Moderating recent comments from the dashboard</h3>
<p>Moderating recent comments has just become a whole lot easier with WordPress 2.7&#8242;s new dashboard and this video guides you through the steps you need to take. (<a href="http://wordpress.tv/2009/01/05/moderating-your-recent-comments-from-the-dashboard/" title="Moderating your recent comments from the dashboard<br />
" target="_blank">Video source</a>)</p>
<p><embed src="http://v.wordpress.com/tm75AUjW" type="application/x-shockwave-flash" width="630" height="354" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<h3>4. Adjusting the discussion settings</h3>
<p>This video explains the setting of how will your readers interact with you and your blog through comments. (<a href="http://wordpress.tv/2009/01/05/setting-your-discussion-settings/" title="Setting your discussion settings" target="_blank">Video source</a>)</p>
<p><embed src="http://v.wordpress.com/LQQ5rkRe" type="application/x-shockwave-flash" width="630" height="354" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<h3>5. How to rearrange the post editor to suit your own style</h3>
<p>With WordPress 2.7 it has become a lot easier to configure the Post/Edit screen to suit your own style or writing. You can choose which sections you need displayed and which you don&#8217;t, and even the order they appear in the management area. (<a href="http://wordpress.tv/2009/01/14/rearranging-the-post-editor-to-suit-your-style/" title="Rearranging the post editor to suit your style<br />
" target="_blank">Video source</a>)</p>
<p><embed src="http://v.wordpress.com/1wJPJNqL" type="application/x-shockwave-flash" width="630" height="354" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<h3>6. How to create a static frontpage for your blog</h3>
<p>Sometimes, a recent blog posts archive is not enough to display on your blog&#8217;s homepage. Sometimes, people need to turn their blog homepages in actual landing pages with additional information. Setting up a static page for your blog is a fairly easy task and this video teaches you just how to do it. (<a href="http://wordpress.tv/2009/01/13/creating-a-static-front-page-for-your-blog/" title="Creating a static front page for your blog" target="_blank">Video source</a>)</p>
<p><embed src="http://v.wordpress.com/MLOHB4jk" type="application/x-shockwave-flash" width="630" height="354" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<h3>7. Using the WordPress.com Video Player &#8211; A DemoGirl Tour</h3>
<p><strong>Molly McDonald</strong>, also known as <a href="http://demogirl.com/about/" title="DemoGirl" target="_blank"><strong>DemoGirl</strong></a>, does <strong>an amazing job</strong> at teaching you all you need to know about WordPress.com&#8217;s video player. Quality user videos like this one reinforce my belief in WordPress TV&#8217;s bright future. (<a href="http://wordpress.tv/2009/01/23/using-the-wordpresscom-video-player-a-demogirl-tour/" title="Using the WordPress.com Video Player - A DemoGirl Tour" target="_blank">Video source</a> / <a href="http://demogirl.com" title="DemoGirl" target="_blank">Author website</a>)</p>
<p><embed src="http://v.wordpress.com/BDrqedFr" type="application/x-shockwave-flash" width="630" height="473" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<h3>8. How to change the reading settings</h3>
<p>In this video, you will learn how to adjust the settings of your blog in terms of reading, and thus adjusting the way readers experience your content, whether when reading on-site or in their feed reader. (<a href="http://wordpress.tv/2009/01/05/changing-your-reading-settings/" title="Changing your reading settings" target="_blank">Video source</a>)</p>
<p><embed src="http://v.wordpress.com/oh4INxys" type="application/x-shockwave-flash" width="630" height="354" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<h3>9. Integrating a bbPress Forum with your self-installed WordPress</h3>
<p>This video by <strong><a href="http://bbpress.org/" target="_blank" title="bbPress - Turning WordPress into a forum">bbPress</a> developer <a href="http://unlettered.org/" target="_blank">Sam Bauers</a></strong> guides you through the process of integrating a bbPress forum on your self-installed WordPress blog. Also, this video stands as proof that WordPress developers have now a place to better interact with their community of users through video tutorials. (<a href="http://wordpress.tv/2009/01/23/integrating-a-bbpress-forum-with-your-self-installed-wordpress/" title="Integrating a bbPress Forum with your self-installed WordPress" target="_blank">Video source</a> / <a href="http://unlettered.org/" target="_blank">Author website</a> )</p>
<p><embed src="http://v.wordpress.com/VSHNDg1D" type="application/x-shockwave-flash" width="630" height="354" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<h3>10. CSS-Tricks: Designing for WordPress</h3>
<p>Finally, this 3 part video tutorial by <strong>Chris Coyier of <a href="http://css-tricks.com/" title="CSS Tricks" target="_blank">CSS-Tricks.com</a></strong> takes you through the steps of designing a WordPress from scratch. Since this video is also presented on its author website, I encourage you to view it there, where you also have access to all links and files used.</p>
<p>Here are the links to all three parts of the tutorial:</p>
<ul>
<li><strong>Part one:</strong> <a href="http://css-tricks.com/video-screencasts/25-designing-for-wordpress-part-one/" title="Designing for WordPress: Part One" target="_blank">On CSS-Tricks.com</a> / <a href="http://wordpress.tv/2009/01/23/css-tricks-designing-for-wordpress-part-one-of-three/" title="CSS-Tricks: Designing for WordPress Part One of Three" target="_blank">On WordPress.TV</a></li>
<li><strong>Part two:</strong> <a href="http://css-tricks.com/video-screencasts/26-designing-for-wordpress-part-two/" title="Designing for WordPress: Part Two" target="_blank">On CSS-Tricks.com</a> / <a href="http://wordpress.tv/2009/01/23/css-tricks-designing-for-wordpress-part-two-of-three/" title="CSS-Tricks: Designing for WordPress Part Two of Three" target="_blank">On WordPress.TV</a></li>
<li><strong>Part three:</strong> <a href="http://css-tricks.com/video-screencasts/27-designing-for-wordpress-part-three/" title="Designing for WordPress: Part Three" target="_blank">On CSS-Tricks.com</a> / <a href="http://wordpress.tv/2009/01/23/css-tricks-designing-for-wordpress-part-three-of-three/" title="CSS Tricks: Designing for WordPress Part Three of Three" target="_blank">On WordPress.TV</a></li>
</ul>
<h3>Next, on WordPress.TV&#8230;</h3>
<p>Most probably a lot of great, interesting content. Make sure you <a href="http://wordpress.tv/" title="WordPress TV">bookmark the WordPress.TV website</a>, I&#8217;m sure it will be worthwhile.</p>
<hr /><h3>Free PDF eBook: Corporate Blogging Guide by Blogsessive</h3>As a subscribe reader of Blogsessive, this is my gift to you: a guide to corporate blogging (but not only) that will help you in your blogging adventures! <a href="http://blogsessive.com/wp-content/plugins/download-monitor/download.php?id=8" target="_blank">Download now, for FREE!</a><br /><br /><hr/><div style="background: #eeeeee;">Advertise on Blogsessive! <a href="http://buysellads.com/buy/detail/310/" title="Advertise on Blogsessive">125x125 banners</a> for <strong>$50 per month</strong>!</div>&copy;2008-2010 Copyright by <a href="http://blogsessive.com" title="Blogging tips">Blogsessive - Blogging Tips</a>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please <a href="http://blogsessive.com/contact" title="Contact Blogsessive">contact us</a>, so that we can take legal action immediately.<img src="http://blogsessive.com/?ak_action=api_record_view&id=938&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blogsessive.com/blogging-tips/10-must-see-videos-on-wordpresstv/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>FeedBurner Email Subscription in Simple Balance 2.0</title>
		<link>http://blogsessive.com/blogging-tools/feedburner-email-subscription-in-simple-balance-20/</link>
		<comments>http://blogsessive.com/blogging-tools/feedburner-email-subscription-in-simple-balance-20/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 21:57:10 +0000</pubDate>
		<dc:creator>Alex, Blogsessive</dc:creator>
				<category><![CDATA[Blogging Tools]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[FeedBurner]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[Simple Balance]]></category>

		<guid isPermaLink="false">http://blogsessive.com/?p=473</guid>
		<description><![CDATA[Blogsessive recommends WP WebHost for quality WordPress blog hosting! Since its launch, over 1800 people downloaded the Simple Balance 2.0 WordPress theme. For that, I thank each and every one of you! The idea behind this theme was to keep it as simple as possible, yet effective. Simplicity in administration is one of the keywords [...]]]></description>
			<content:encoded><![CDATA[<p>Looking for really <a href="http://blogsessive.com/go-themeforest/" title="Affordable Premium WP Themes" target="_blank"><strong>affordable premium WordPress themes</strong></a>?</p><p><img style="float: left; margin-right: 10px;" title="FeedBurner" src="http://blogsessive.com/wp-content/uploads/2008/10/feedburner-logo.png" alt="FeedBurner Email Subscription in Simple Balance 2.0" width="200" height="200" /> Since its launch, over 1800 people downloaded the <a title="Simple WordPress Theme" href="http://blogsessive.com/blogging-tools/simple-balance-free-simple-wordpress-theme/" target="_blank"><strong>Simple Balance 2.0 WordPress theme</strong></a>. For that, I thank each and every one of you!</p>
<p>The idea behind this theme was to keep it as simple as possible, yet effective. Simplicity in administration is one of the keywords behind its creation. But some things need a bit of coding knowledge to tweak.</p>
<p>One of them is the email subscription form, which, once you install the theme, serves only as a design template that does not work unless proper code has been added to it.</p>
<p>I&#8217;ve been asked via comments and email what&#8217;s wrong with it, or how can it be made functional and this made me write the following step-by-step tutorial on <strong>how to integrate the FeedBurner email subscription form in Simple Balance 2.0</strong>.<span id="more-473"></span></p>
<h3>Getting the FeedBurner Email Form Code</h3>
<p>Here&#8217;s a quick screenshot that illustrates the required steps:</p>
<p class="articlefeat" style="text-align:center;"><img title="Getting the FeedBurner Form" src="http://blogsessive.com/wp-content/uploads/2008/10/feedburner-actions.gif" alt="Get the FeedBurner Email Form" width="582" height="508" /></p>
<p><strong>Step 1:</strong> Click the <strong>Publicize</strong> tab;</p>
<p><strong>Step 2:</strong> Look for the <strong>Email Subscription</strong> item in the left side menu and click it;</p>
<p><strong>Step 3</strong>: Copy the form code and paste it in a .TXT file for later use.</p>
<p>Once you&#8217;ve pasted the code in a .TXT file, you&#8217;ll see that it looks a bit blocky, not being properly formatted using new lines and TAB&#8217;s.</p>
<p>Below is a sample of my code (do not copy it unless you want your readers to subscribe to my feed). Try to come to a similar formatting by breaking the line in the same places I did it.</p>
<pre class="brush: html">
&lt;form style=&quot;border:1px solid #ccc;padding:3px;text-align:center;&quot; action=&quot;http://feedburner.google.com/fb/a/mailverify&quot; method=&quot;post&quot; target=&quot;popupwindow&quot; onsubmit=&quot;window.open(&#039;http://feedburner.google.com/
fb/a/mailverify?uri=Blogsessive&#039;, &#039;popupwindow&#039;, &#039;scrollbars=yes,width=550,height=520&#039;);return true&quot;&gt;
	&lt;p&gt;Enter your email address:&lt;/p&gt;
	&lt;p&gt;&lt;input type=&quot;text&quot; style=&quot;width:140px&quot; name=&quot;email&quot;/&gt;&lt;/p&gt;
	&lt;input type=&quot;hidden&quot; value=&quot;Blogsessive&quot; name=&quot;uri&quot;/&gt;
	&lt;input type=&quot;hidden&quot; name=&quot;loc&quot; value=&quot;en_US&quot;/&gt;
	&lt;input type=&quot;submit&quot; value=&quot;Subscribe&quot; /&gt;
	&lt;p&gt;Delivered by &lt;a href=&quot;http://feedburner.google.com&quot;
	target=&quot;_blank&quot;&gt;FeedBurner&lt;/a&gt;&lt;/p&gt;
&lt;/form&gt;
</pre>
<p>Unless you want to display the link back to FeedBurner, you can delete right from the start the following line:</p>
<pre class="brush: html">&lt;p&gt;Delivered by &lt;a href=&quot;http://feedburner.google.com&quot; target=&quot;_blank&quot;&gt;FeedBurner&lt;/a&gt;&lt;/p&gt;</pre>
<h3>Editing the Simple Balance 2.0 Email Subscription Form</h3>
<p>Now that you have the FeedBurner form code, all you need to do is to integrate it with Simple Balance&#8217;s custom designed form.</p>
<p>No need to panic, as it&#8217;s a much easier job than it seems. <strong>First</strong>, you need to locate the theme&#8217;s files and open the file called <strong>lsidebar.php</strong> with your preferred HTML (or simply Notepad) editor.</p>
<p><strong>Next</strong>, you need to locate the following chunk of code (normally starts of line 22):</p>
<pre class="brush: html">
&lt;h2&gt;Subscribe by Email&lt;/h2&gt;
&lt;ul&gt;
	&lt;li class=&quot;rssForm&quot;&gt;
		&lt;form action=&quot;&quot;&gt;
			&lt;input type=&quot;text&quot; class=&quot;rssEmail&quot; /&gt;
			&lt;input type=&quot;submit&quot; class=&quot;rssSubmit&quot; value=&quot;Subscribe&quot; /&gt;
		&lt;/form&gt;
		&lt;small&gt;We take privacy seriously.&lt;br /&gt;
		Your email address will &lt;strong&gt;not&lt;/strong&gt; be shared.&lt;/small&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>Now, go to the FeedBurner form code and <strong>copy the one part that is similar to mine</strong> as shown below:</p>
<pre class="brush: html">
&lt;form style=&quot;border:1px solid #ccc;padding:3px;text-align:center;&quot; action=&quot;http://feedburner.google.com/fb/a/mailverify&quot; method=&quot;post&quot; target=&quot;popupwindow&quot; onsubmit=&quot;window.open(&#039;http://feedburner.google.com/
fb/a/mailverify?uri=Blogsessive&#039;, &#039;popupwindow&#039;, &#039;scrollbars=yes,width=550,height=520&#039;);return true&quot;&gt;
</pre>
<p>The only difference is that instead of &#8216;uri=Blogsessive&#8217; it will have your blog&#8217;s name.</p>
<p>Remove the styling contained in this line by taking out this chunk of code:&#8221;</p>
<pre class="brush: html">style=&quot;border:1px solid #ccc;padding:3px;text-align:center;&quot;</pre>
<p>and copy the remaining code (similar to the one below):</p>
<pre class="brush: html">&lt;form action=&quot;http://feedburner.google.com/fb/a/mailverify&quot; method=&quot;post&quot; target=&quot;popupwindow&quot; onsubmit=&quot;window.open(&#039;http://feedburner.google.com/fb/a/mailverify?uri=Blogsessive&#039;, &#039;popupwindow&#039;, &#039;scrollbars=yes,width=550,
height=520&#039;);return true&quot;&gt;</pre>
<p>Ok, did you <strong>copy the code</strong>? Now, let&#8217;s head back to the <strong>lsidebar.php</strong> file, to our previously selected chunk of code.</p>
<p><strong>Locate this code</strong>:</p>
<pre class="brush: html">&lt;form action=&quot;&quot;&gt;</pre>
<p>and <strong>replace it</strong> with what you&#8217;ve copied from the FeedBurner code.</p>
<p>While we&#8217;re here, <strong>locate this line</strong> of code:</p>
<pre class="brush: html">&lt;input type=&quot;text&quot; class=&quot;rssEmail&quot; /&gt;</pre>
<p>and <strong>replace it</strong> with this one:</p>
<pre class="brush: html">&lt;input type=&quot;text&quot; class=&quot;rssEmail&quot; name=&quot;email&quot; /&gt;</pre>
<p>Now, we head <strong>back to the FeedBurner code to copy</strong> the two lines similar to these:</p>
<pre class="brush: html">
&lt;input type=&quot;hidden&quot; value=&quot;Blogsessive&quot; name=&quot;uri&quot;/&gt;
&lt;input type=&quot;hidden&quot; name=&quot;loc&quot; value=&quot;en_US&quot;/&gt;
</pre>
<p>Again, instead of <em>value=&#8221;Blogsessive&#8221;</em> you&#8217;ll have your blog&#8217;s feed name. After you copy the two line, go back to <strong>lsidebar.php</strong> and add them below the previously edited line:</p>
<pre class="brush: html">&lt;input type=&quot;text&quot; class=&quot;rssEmail&quot; name=&quot;email&quot; /&gt;</pre>
<p>and above this line:</p>
<pre class="brush: html">&lt;input type=&quot;submit&quot; class=&quot;rssSubmit&quot; value=&quot;Subscribe&quot; /&gt;</pre>
<p>Ok, we&#8217;re half way there. No, I&#8217;m joking. That&#8217;s all. You&#8217;ve implemented the form and it should be fully functional and looking pretty much like the one I&#8217;ve used to exemplify this tutorial.</p>
<p>Save the<strong> lsidebar.php</strong> file and upload it to your FTP server.</p>
<h3>The End Result</h3>
<p>Your code should look similar to mine (except for the feed name mentioned in two places):</p>
<pre class="brush: html">
&lt;h2&gt;Subscribe by Email&lt;/h2&gt;
&lt;ul&gt;
	&lt;li class=&quot;rssForm&quot;&gt;
		&lt;form style=&quot;border:1px solid #ccc;padding:3px;text-align:center;&quot;
		action=&quot;http://feedburner.google.com/fb/a/mailverify&quot; method=&quot;post&quot;
		target=&quot;popupwindow&quot; onsubmit=&quot;window.open(&#039;http://feedburner.google.com/
		fb/a/mailverify?uri=Blogsessive&#039;, &#039;popupwindow&#039;, &#039;scrollbars=yes,width=550,
		height=520&#039;);return true&quot;&gt;
			&lt;input type=&quot;text&quot; class=&quot;rssEmail&quot; name=&quot;email&quot; /&gt;
			&lt;input type=&quot;submit&quot; class=&quot;rssSubmit&quot; value=&quot;Subscribe&quot; /&gt;
			&lt;input type=&quot;hidden&quot; value=&quot;Blogsessive&quot; name=&quot;uri&quot;/&gt;
			&lt;input type=&quot;hidden&quot; name=&quot;loc&quot; value=&quot;en_US&quot;/&gt;
		&lt;/form&gt;
		&lt;small&gt;We take privacy seriously.&lt;br /&gt;
		Your email address will &lt;strong&gt;not&lt;/strong&gt; be shared.&lt;/small&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>Now, you&#8217;ll be able to provide your readers with a functional email subscription based on FeedBurner&#8217;s code, but looking like the one designed for your free WordPress theme of choice: Simple Balance 2.0.</p>
<p>Any questions on this tutorial? I&#8217;d be happy to answer you in the comments section.</p>
<hr /><h3>Free PDF eBook: Corporate Blogging Guide by Blogsessive</h3>As a subscribe reader of Blogsessive, this is my gift to you: a guide to corporate blogging (but not only) that will help you in your blogging adventures! <a href="http://blogsessive.com/wp-content/plugins/download-monitor/download.php?id=8" target="_blank">Download now, for FREE!</a><br /><br /><hr/><div style="background: #eeeeee;">Advertise on Blogsessive! <a href="http://buysellads.com/buy/detail/310/" title="Advertise on Blogsessive">125x125 banners</a> for <strong>$50 per month</strong>!</div>&copy;2008-2010 Copyright by <a href="http://blogsessive.com" title="Blogging tips">Blogsessive - Blogging Tips</a>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please <a href="http://blogsessive.com/contact" title="Contact Blogsessive">contact us</a>, so that we can take legal action immediately.<img src="http://blogsessive.com/?ak_action=api_record_view&id=473&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blogsessive.com/blogging-tools/feedburner-email-subscription-in-simple-balance-20/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Post Excerpts and the More Tag in WordPress</title>
		<link>http://blogsessive.com/blogging-tools/wordpress-post-excerpts-more-tag/</link>
		<comments>http://blogsessive.com/blogging-tools/wordpress-post-excerpts-more-tag/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 20:38:27 +0000</pubDate>
		<dc:creator>Alex, Blogsessive</dc:creator>
				<category><![CDATA[Blogging Tools]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[excerpts]]></category>
		<category><![CDATA[more]]></category>
		<category><![CDATA[template tags]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogsessive.com/?p=418</guid>
		<description><![CDATA[With the StudioPress WordPress themes you can really take your blog to a higher level!Not only once, it has been said that displaying full posts on your blog home page, category pages or archive pages increases the chance of being penalized for duplicate content. In WordPress, using post excerpts has proven to be a good [...]]]></description>
			<content:encoded><![CDATA[<p>With the StudioPress WordPress themes you can really <a href="http://blogsessive.com/go-studiopress/" title="Take Your Blog to a Higher Level" target="ejejcsingle"><strong>take your blog to a higher level</strong></a>!<p>Not only once, it has been said that displaying full posts on your blog home page, category pages or archive pages increases the chance of being penalized for duplicate content.</p>
<p>In WordPress, using <strong>post excerpts</strong> has proven to be a good alternative, but one that has its downsides:</p>
<ul>
<li>You lose control over text formatting;</li>
<li>Images won&#8217;t be displayed;</li>
<li>If you don&#8217;t take time to write them yourself, WordPress might not select the most appropriate fragments;</li>
<li>Readers might not be convinced to further click, if the excerpt is not attractive enough.</li>
</ul>
<h3>Better Post Excerpts</h3>
<p>If you&#8217;re concerned about your writing style, you&#8217;ll most definitely take care about how you structure your posts, where you insert images and how you write the introductory paragraph.</p>
<p>With these in mind, you basically got yourself a very good post excerpt, one that you should not leave to WordPress to decide when and where to cut.</p>
<h4>The &#8216;More&#8217; Tag</h4>
<p>This is the most valid alternative to displaying post excerpts, if <strong>the_excerpt() </strong>template tag does not fit your needs.</p>
<p><strong>More</strong> is what the WordPress developers call a <em>quicktag</em>, designed to cut-off large posts into two fragments: one that will be displayed as an excerpt and one that users will continue to read from after clicking the &#8220;read more&#8221; link. It serves as a marker inside the post so that users who come from the excerpt link, will start reading the content from that point on, and not from the beginning, again.<span id="more-418"></span></p>
<p>What this quicktag actually represents is a HTML comment that WordPress translates a the cut-off point. To use it while editing your posts in HTML view, you simply need to add this where you want the post cut:</p>
<pre>Your introductory paragraph should be placed before using the 'more' quicktag.
That way it will act as a post excerpt.
&lt;!--more--&gt;</pre>
<p>Using it like in the above example will return a post excerpt similar to this:</p>
<blockquote><p>Your introductory paragraph should be placed before using the &#8216;more&#8217; quicktag.<br />
That way it will act as a post excerpt. <a href="#" rel="nofollow">more&#8230;</a></p></blockquote>
<h3>Customizing the &#8216;more&#8217; link</h3>
<p>The default text (<em>more&#8230;</em>) is not very attractive, right? I mean, you must really be interested in the rest of the story to click it.</p>
<p>But fear not, there are many ways in which you could customize the link, applying a global or single post effect. Described below are two methods you could use.</p>
<h4 style="margin-top: 25px">Method One: Customizing the_content() template tag</h4>
<p class="articlefeat">
<strong>Effects:</strong> Global<br />
<strong>Requirements:</strong> Minor coding knowledge</p>
<p>As per default, posts excerpts are displayed by using <em>the_excerpt()</em>, while full posts are displayed through the use of <em>the_content() tag</em>.</p>
<p>If you take a look at the code of your theme&#8217;s <em>index.php</em> file, and of course if it uses full posts, you&#8217;ll notice a line of code similar to this one:</p>
<pre>&lt;?php the_content(); ?&gt;</pre>
<p>The easiest way to customize it and obtain a global effect would be by adding a parameter containing your own &#8216;read more&#8217; text, as shown in the example below:</p>
<pre>&lt;?php the_content(' Continue reading this post!'); ?&gt;</pre>
<p>The end result will look similar to this:</p>
<blockquote><p>Your introductory paragraph should be placed before using the &#8216;more&#8217; quicktag.<br />
That way it will act as a post excerpt. <a href="#" rel="nofollow"> Continue reading this post!</a></p></blockquote>
<p>To further more customize the link, you can even use HTML code and add CSS classes to it:</p>
<pre>&lt;?php the_content(' <span class="moreLink">Continue reading this post!</span>'); ?&gt;</pre>
<p>or use WordPress&#8217; <em>get_the_title()</em> template tag to add the post name inside the link, like this:</p>
<pre>&lt;?php the_content(' Continue reading '.get_the_title()); ?&gt;</pre>
<p>Assuming the example of my own post title, this will result in something similar the this:</p>
<blockquote><p>Your introductory paragraph should be placed before using the &#8216;more&#8217; quicktag.</p>
<p>That way it will act as a post excerpt. <a href="#" rel="nofollow"> Continue reading Post Excerpts and the More Tag in WordPress</a></p></blockquote>
<p>Of course, you could always use a combination of HTML tags and WordPress template tags to further customize the link, as long as you keep in mind that the effect will be global (will apply to all posts using the <em>more</em> quicktag).</p>
<h4 style="margin-top: 25px">Method Two: Customizing the &lt;!&#45;&#45;more&#45;&#45;&gt; quicktag</h4>
<p class="articlefeat">
<strong>Effects:</strong> Single post<br />
<strong>Requirements:</strong> Nothing a 5 year old won&#8217;t manage</p>
<p>Assuming you have adjusted the link to your needs by using the above described global-method and on some posts you need to tweak the link more, the best way to customize the display text is my adding it to the &lt;!&#45;&#45;more&#45;&#45;&gt; quicktag, as shown below, in your post HTML view:</p>
<pre>&lt;!--more This is my custom more text--&gt;</pre>
<p>This will result in:</p>
<blockquote><p>Your introductory paragraph should be placed before using the &#8216;more&#8217; quicktag.<br />
That way it will act as a post excerpt. <a href="#" rel="nofollow"> This is my custom more text</a></p></blockquote>
<p><strong>Note:</strong> The results of this method override the defaults or the effects of the first method and only affect the text, and not the formatting.</p>
<h3>That&#8217;s it!</h3>
<p>Easy as one, two, three, right? Happy customizing! And in case you need more information, here are a few links from the WordPress Codex:</p>
<ul>
<li><a href="http://codex.wordpress.org/Customizing_the_Read_More" target="_blank" rel="external">Customizing the Read More</a></li>
<li><a href="http://codex.wordpress.org/Template_Tags/the_content" target="_blank" rel="external">Template Tags: the_content()</a></li>
<li><a href="http://codex.wordpress.org/Template_Tags/the_excerpt" target="_blank" rel="external">Template Tags: the_excerpt()</a></li>
</ul>
<hr /><h3>Free PDF eBook: Corporate Blogging Guide by Blogsessive</h3>As a subscribe reader of Blogsessive, this is my gift to you: a guide to corporate blogging (but not only) that will help you in your blogging adventures! <a href="http://blogsessive.com/wp-content/plugins/download-monitor/download.php?id=8" target="_blank">Download now, for FREE!</a><br /><br /><hr/><div style="background: #eeeeee;">Advertise on Blogsessive! <a href="http://buysellads.com/buy/detail/310/" title="Advertise on Blogsessive">125x125 banners</a> for <strong>$50 per month</strong>!</div>&copy;2008-2010 Copyright by <a href="http://blogsessive.com" title="Blogging tips">Blogsessive - Blogging Tips</a>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please <a href="http://blogsessive.com/contact" title="Contact Blogsessive">contact us</a>, so that we can take legal action immediately.<img src="http://blogsessive.com/?ak_action=api_record_view&id=418&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blogsessive.com/blogging-tools/wordpress-post-excerpts-more-tag/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Blog SEO Tips &#8211; SEO Friendly Titles (H1, H2, H3)</title>
		<link>http://blogsessive.com/blogging-tips/blog-seo-tips-titles/</link>
		<comments>http://blogsessive.com/blogging-tips/blog-seo-tips-titles/#comments</comments>
		<pubDate>Sun, 25 May 2008 20:38:06 +0000</pubDate>
		<dc:creator>Alex, Blogsessive</dc:creator>
				<category><![CDATA[Blogging Tips]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[WordPress SEO]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[blog SEO tips]]></category>
		<category><![CDATA[headings]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[titles]]></category>

		<guid isPermaLink="false">http://blogsessive.com/?p=89</guid>
		<description><![CDATA[In this blog SEO tips I'm going to talk about the importance of using SEO friendly titles (H1, H2, H3) and the right way to do so.]]></description>
			<content:encoded><![CDATA[<p>With the StudioPress WordPress themes you can really <a href="http://blogsessive.com/go-studiopress/" title="Take Your Blog to a Higher Level" target="ejejcsingle"><strong>take your blog to a higher level</strong></a>!<p>Another quiet Sunday in the blogosphere, as usual. This morning I thought about writing another link share post or a WordPress theme recommendation, but later I&#8217;ve decided to break the pattern (since it&#8217;s all so quiet) and make Sundays the host of a blog SEO tips series. In this first post I&#8217;m going to talk about the importance of using <strong>SEO friendly titles</strong> (H1, H2, H3) and the right way to do so.</p>
<h3>Usual Coding Patterns in WordPress Themes</h3>
<p>If you&#8217;re even a bit familiar with the WordPress themes, by now you&#8217;ve probably took a look at your theme&#8217;s files. Blog pages are rendered through an association of a few PHP files with standard names (index.php, archive.php, single.php) with different <strong>templates</strong> of the theme, based on the content type.</p>
<p>The <strong>index.php</strong> file usually stands for your home page, also being capable of replacing any other template that hasn&#8217;t been already defined. So, if you don&#8217;t have a template for search results (search.php), the index file will take over and render your search results page.</p>
<p>Each of these templates includes smaller pieces of code to build up the final result. The most used are header.php, sidebar.php and footer.php.</p>
<p>For now, we&#8217;ll limit our attention to the following files in your theme&#8217;s folder:</p>
<ul>
<li>header.php</li>
<li>index.php</li>
<li>single.php</li>
<li>page.php (not every theme has it)</li>
<li>archive.php, search.php (not every theme has them)</li>
</ul>
<h3>Optimizing the Header File</h3>
<p>Having your primary keyword present at the top of you page it&#8217;s very important.<br />
Considering the fact that most themes come with text based logos instead of graphics, we&#8217;ll be looking for the &lt;h1&gt; tag in the header.php file.<span id="more-89"></span></p>
<p>If you look at the WordPress default theme will find this piece of code, close to the end of the file:</p>
<pre>&lt;h1&gt;&lt;a href="&lt;?php echo get_option('home'); ?&gt;/"&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;div class="description"&gt;&lt;?php bloginfo('description'); ?&gt;&lt;/div&gt;</pre>
<p>The first line displays your blog&#8217;s title into a link to the homepage, inside the H1 tag.<br />
The second line displays your blog&#8217;s description.</p>
<p>H1 is the most important heading style and the coding recommendations state that only one should be used per page. When talking about a homepage, archive page or search results, it&#8217;s best that we optimize these pages according to our main keywords, therefore this H1 tag is required.</p>
<p>But what about on the single post pages? When we display single post, we would want to have their pages optimized according to their content, not the overall keywords of the blog. This is where the H1 should be removed from the header.php file, and placed instead of the H2 surrounding the posts title, to give make it more visible and representative in the eyes of a search engine spider.</p>
<p>How do we do that? First we need to add some conditional tags in the header.<br />
Look for the piece of code that I&#8217;ve listed above and replace it with this one:</p>
<pre>&lt;?php if(is_single() OR is_page()) {
// On single post pages and static pages we use this code
?&gt;
&lt;h2&gt;&lt;a href="&lt;?php echo get_option('home'); ?&gt;/"&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;div class="description"&gt;&lt;?php bloginfo('description'); ?&gt;&lt;/div&gt;
&lt;?php }
else {
// On home page and archive style pages we use this code
?&gt;
&lt;h1&gt;&lt;a href="&lt;?php echo get_option('home'); ?&gt;/"&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;div class="description"&gt;&lt;?php bloginfo('description'); ?&gt;&lt;/div&gt;
&lt;?php } ?&gt;</pre>
<p>By using some <a title="WordPress conditional tags" href="http://codex.wordpress.org/Conditional_Tags" target="_blank">WordPress conditional tags</a> we managed to limit the use of the H1 HTML tag to all archive style pages (including the homepage).</p>
<p>Next, we move to single posts and static pages to continue our optimization.</p>
<h3>Optimizing the Single Posts and Static Pages</h3>
<p>After we&#8217;ve made the changes in the header file, we need to apply some modifications to the single.php and page.php files to make their titles more search engine friendly.</p>
<p>Open the default theme&#8217;s single.php file and look for this piece of code:</p>
<pre>&lt;h2&gt;&lt;a href="&lt;?php echo get_permalink() ?&gt;" rel="bookmark"
title="Permanent Link: &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;</pre>
<p>Remember that I&#8217;ve told you we are allowed to used &lt;h1&gt; only once per file, for our most important title / phrase. Since we&#8217;ve eliminated the use of &lt;h1&gt; on single posts and static pages in the header.php, now, all we have to do is to change &lt;h2&gt; and &lt;/h2&gt; with &lt;h1&gt; and &lt;/h1&gt;, just like this:</p>
<pre>&lt;h1&gt;&lt;a href="&lt;?php echo get_permalink() ?&gt;" rel="bookmark"
title="Permanent Link: &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h1&gt;</pre>
<p>There you go, now your most important phrase on a single post page is the post&#8217;s title, as it should be!<br />
Most themes don&#8217;t come with this type of heading importance separation and by following this guide you&#8217;ll be able to fix this issue on your own with no trouble at all.</p>
<p>While the default theme does not have a page.php template defined, you could clone the single.php file and rename it. If you don&#8217;t clone it, the index.php file will be used to display static pages, which means you&#8217;ll list page titles using the &lt;h2&gt; instead of &lt;h1&gt;.</p>
<h3>Consider Using Subheadings in Your Posts</h3>
<p>For further SEO improvement, you should consider using relevant subheadings inside your post to evidentiate different parts of your post&#8217;s structure.<br />
Write down your article and when you&#8217;re finished, switch to HTML view and add &lt;h3&gt; &amp; &lt;/h3&gt; around you subheadings, like this:</p>
<pre>&lt;h3&gt;This Is a Subheading&lt;/h3&gt;</pre>
<h3>Final Thoughts</h3>
<p>Usually, titles are the most important links on your blog. Through them, users and spiders alike navigate through your content. Use them smart and effectively.<br />
If you have any questions or need further help with this, feel free to drop a comment.<br />
Also, join me again next Sunday for a new post in the Blog Seo Tips series.</p>
<hr /><h3>Free PDF eBook: Corporate Blogging Guide by Blogsessive</h3>As a subscribe reader of Blogsessive, this is my gift to you: a guide to corporate blogging (but not only) that will help you in your blogging adventures! <a href="http://blogsessive.com/wp-content/plugins/download-monitor/download.php?id=8" target="_blank">Download now, for FREE!</a><br /><br /><hr/><div style="background: #eeeeee;">Advertise on Blogsessive! <a href="http://buysellads.com/buy/detail/310/" title="Advertise on Blogsessive">125x125 banners</a> for <strong>$50 per month</strong>!</div>&copy;2008-2010 Copyright by <a href="http://blogsessive.com" title="Blogging tips">Blogsessive - Blogging Tips</a>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please <a href="http://blogsessive.com/contact" title="Contact Blogsessive">contact us</a>, so that we can take legal action immediately.<img src="http://blogsessive.com/?ak_action=api_record_view&id=89&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blogsessive.com/blogging-tips/blog-seo-tips-titles/feed/</wfw:commentRss>
		<slash:comments>60</slash:comments>
		</item>
		<item>
		<title>My Link Order Plugin: Validation Error Solution</title>
		<link>http://blogsessive.com/blogging-tools/my-link-order-plugin-validation-error-solution/</link>
		<comments>http://blogsessive.com/blogging-tools/my-link-order-plugin-validation-error-solution/#comments</comments>
		<pubDate>Sat, 10 May 2008 11:29:55 +0000</pubDate>
		<dc:creator>Alex, Blogsessive</dc:creator>
				<category><![CDATA[Blogging Tools]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[My Link Order]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://blogsessive.com/?p=69</guid>
		<description><![CDATA[My Link Order plugin generates an XHTML validation error, specifically: it creates am ID duplicate for each blog roll category that you add. Here is the solution to fix this problem.]]></description>
			<content:encoded><![CDATA[<p>Have you read "<a href="http://blogsessive.com/go-wprockstar/" title="How To Be a Rockstar WordPress Designer" target="ejejcsingle"><strong>How To Be a Rockstar WordPress Designer</strong></a>" yet?</p><p>As you might remember, <a title="Keep your blog ordered with WordPress Plugins" href="http://blogsessive.com/blogging-tools/keep-your-blog-ordered-with-these-wordpress-plugins/" target="_blank">a while ago I&#8217;ve recommended</a> you the plugins developed by GeekyWeekly: My Link Order, My Page Order and My Category Order.</p>
<p>I&#8217;d still recommend them to everyone how wants to organize his blog easier and better, even if recently I&#8217;ve found out that the <strong>My Link Order</strong> plugin generates an XHTML validation error, specifically: it creates an ID duplicate for each blog roll category that you add.</p>
<p>The validation error could look like:</p>
<pre>ID "mylinkorder" already defined</pre>
<p>or</p>
<pre>anchor "mylinkorder" already defined</pre>
<h3>My Link Order Fix</h3>
<p>So, how to fix this? Actually it&#8217;s pretty simple.</p>
<p>1. Navigate to your plugins folder and open for editing the <em><strong>mylinkorder.php</strong></em> file;</p>
<p>2. Find this line of code:</p>
<pre>'category_before' =&gt; $before_widget, 'category_after' =&gt; $after_widget,</pre>
<p>Depending on the plugin version, it should be between lines 180 and 200.</p>
<p>3. Comment the like by adding 2 slashes at the beginning, so the end result would look like:</p>
<pre>//'category_before' =&gt; $before_widget, 'category_after' =&gt; $after_widget,</pre>
<p>4. That&#8217;s it! Upload the file and enjoy your valid ordered blog.</p>
<hr /><h3>Free PDF eBook: Corporate Blogging Guide by Blogsessive</h3>As a subscribe reader of Blogsessive, this is my gift to you: a guide to corporate blogging (but not only) that will help you in your blogging adventures! <a href="http://blogsessive.com/wp-content/plugins/download-monitor/download.php?id=8" target="_blank">Download now, for FREE!</a><br /><br /><hr/><div style="background: #eeeeee;">Advertise on Blogsessive! <a href="http://buysellads.com/buy/detail/310/" title="Advertise on Blogsessive">125x125 banners</a> for <strong>$50 per month</strong>!</div>&copy;2008-2010 Copyright by <a href="http://blogsessive.com" title="Blogging tips">Blogsessive - Blogging Tips</a>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please <a href="http://blogsessive.com/contact" title="Contact Blogsessive">contact us</a>, so that we can take legal action immediately.<img src="http://blogsessive.com/?ak_action=api_record_view&id=69&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blogsessive.com/blogging-tools/my-link-order-plugin-validation-error-solution/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Remove the White Space in wp_list_pages()</title>
		<link>http://blogsessive.com/blogging-tools/how-to-remove-the-white-space-in-wp_list_pages/</link>
		<comments>http://blogsessive.com/blogging-tools/how-to-remove-the-white-space-in-wp_list_pages/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 19:57:06 +0000</pubDate>
		<dc:creator>Alex, Blogsessive</dc:creator>
				<category><![CDATA[Blogging Tools]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[template tags]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[white space]]></category>
		<category><![CDATA[wp_list_pages]]></category>

		<guid isPermaLink="false">http://blogsessive.com/?p=39</guid>
		<description><![CDATA[The white space generated by wp_list_pages() has been a nightmare for many WordPress themes designers. It doesn't have to be one for you!]]></description>
			<content:encoded><![CDATA[<p>With the StudioPress WordPress themes you can really <a href="http://blogsessive.com/go-studiopress/" title="Take Your Blog to a Higher Level" target="ejejcsingle"><strong>take your blog to a higher level</strong></a>!<p><strong>wp_list_pages()</strong> is one of the most common WordPress template tags. Sometimes, the little white space that some browsers add to the output of this function can create a big mess in your theme&#8217;s template, making it hard to style, especially when trying to create a horizontal list. The fix for this is quite simple and requires minimum coding knowledge, if none at all.</p>
<h3>The Problem</h3>
<p>The wp_list_pages() generates either a series of &lt;li&gt; elements containing links to all of you blog&#8217;s pages, or a full unordered list with a heading at the beginning.<br />
The output of this list looks like this:<span id="more-39"></span></p>
<pre>&lt;ul&gt;
&lt;li&gt;&lt;a href="#"&gt;Page name&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;Page name&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>While some browsers don&#8217;t have a problem with elements being generated on new lines, in some, this method causes a white space to show up in front of each list item. This space becomes visible and annoying when trying to create a horizontal menu with background colors and equal horizontal spacing.</p>
<h3>The Fix</h3>
<p>To get rid of the white space, your output would need to look like this:</p>
<pre>&lt;ul&gt;&lt;li&gt;&lt;a href="#"&gt;Page name&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#"&gt;Page name&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</pre>
<p>This can be achieved by using a small PHP function that will take the code generated by wp_list_pages() and turn it into something similar to the example above. To make this function available for use in your templates you need to edit the &#8220;functions.php&#8221; file, found in you theme&#8217;s directory. If you don&#8217;t have such a file, create an empty one and name it &#8220;functions.php&#8221;.</p>
<p>In functions.php add the following code at the beginning or at the end of the file. Just be careful not to paste it inside another function and cause the script to break.</p>
<pre>function qbkl_nospace($input) {
$output = str_replace(array("\n", "\r", "\t"), "", $input);
echo $output;
}</pre>
<p><img class="alignnone size-full wp-image-40" title="whitespace-fix" src="http://blogsessive.com/wp-content/uploads/2008/04/whitespace-fix.gif" alt="White space fix" width="500" height="60" /></p>
<h3>Usage</h3>
<p>To apply the fix, simply find the wp_list_pages() in your theme&#8217;s template (usually header.php or sidebar.php) and edit the code according to the following example:</p>
<p>Find:</p>
<pre>&lt;?php wp_list_pages(); ?&gt;</pre>
<p>Replace with:</p>
<pre>&lt;?php qbkl_nospace(wp_list_pages()); ?&gt;</pre>
<p>This fix works with any function or template tag that generates the same problem.</p>
<p>The white space generated by wp_list_pages() has been a nightmare for many WordPress themes designers. It doesn&#8217;t have to be one for you!</p>
<h3>Where is wp_list_pages() located?</h3>
<p>Although it&#8217;s not recommended that you alter the base code of WordPress, advanced users might feel like taking such a job.</p>
<p>If you need to alter the output, <strong>wp_list_pages</strong> is defined in the <em>post-template.php</em> file, in the &#8220;<em>wp-includes</em>&#8221; folder of your WordPress blog.</p>
<p>For further tweaking, you might also need to adjust the <strong>walk_page_tree</strong> function, located in the same file, which makes use of the class <strong>Walker_Page</strong>, extending the <strong>Walker</strong> class, both located in <em>wp-includes/classes.php</em>.</p>
<p>* The above file names and locations are confirmed for WordPress 2.5 to 2.6.3.</p>
<p>If you&#8217;re having any questions or need further assistance, please use <strong><a title="Add your comment" href="http://blogsessive.com/blogging-tools/how-to-remove-the-white-space-in-wp_list_pages/#respond" target="_self">this post&#8217;s comment form</a></strong>.</p>
<hr /><h3>Free PDF eBook: Corporate Blogging Guide by Blogsessive</h3>As a subscribe reader of Blogsessive, this is my gift to you: a guide to corporate blogging (but not only) that will help you in your blogging adventures! <a href="http://blogsessive.com/wp-content/plugins/download-monitor/download.php?id=8" target="_blank">Download now, for FREE!</a><br /><br /><hr/><div style="background: #eeeeee;">Advertise on Blogsessive! <a href="http://buysellads.com/buy/detail/310/" title="Advertise on Blogsessive">125x125 banners</a> for <strong>$50 per month</strong>!</div>&copy;2008-2010 Copyright by <a href="http://blogsessive.com" title="Blogging tips">Blogsessive - Blogging Tips</a>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please <a href="http://blogsessive.com/contact" title="Contact Blogsessive">contact us</a>, so that we can take legal action immediately.<img src="http://blogsessive.com/?ak_action=api_record_view&id=39&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blogsessive.com/blogging-tools/how-to-remove-the-white-space-in-wp_list_pages/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>WordPress Template Tags: wp_get_archives()</title>
		<link>http://blogsessive.com/blogging-tools/wordpress-template-tags-wp_get_archives/</link>
		<comments>http://blogsessive.com/blogging-tools/wordpress-template-tags-wp_get_archives/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 16:04:04 +0000</pubDate>
		<dc:creator>Alex, Blogsessive</dc:creator>
				<category><![CDATA[Blogging Tools]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[template tags]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wp_get_archives()]]></category>

		<guid isPermaLink="false">http://blogsessive.com/blogging-tools/wordpress-template-tags-wp_get_archives/</guid>
		<description><![CDATA[Blogsessive recommends WP WebHost for quality WordPress blog hosting!Welcome to our new series&#8217; first post! The &#8220;WordPress Template Tags&#8221; series is intended to bring into spotlight some of WordPress&#8217; less common, but very useful template tags. While the contents can&#8217;t be considered a revelation to advanced WP users and developers, it can be of big [...]]]></description>
			<content:encoded><![CDATA[<p>Blogsessive recommends WP WebHost for <a href="http://blogsessive.com/go-wpwebhost/" title="WordPress Hosting" target="_blank"><strong>quality WordPress blog hosting</strong></a>!</p><p>Welcome to our new series&#8217; first post! The &#8220;WordPress Template Tags&#8221; series is intended to bring into spotlight some of WordPress&#8217; less common, but very useful template tags. While the contents can&#8217;t be considered a revelation to advanced WP users and developers, it can be of big help to those who take their first steps in the amazing world of online publishing using this famous blogging platform.</p>
<p>But enough chit chat! Here&#8217;s our first recommendation:</p>
<h3>wp_get_archives()</h3>
<p>Have you ever thought of how to display a list of your most recent posts? Or a list of all posts published in the last 10 days? Or 6 months? Or 2 years?<span id="more-27"></span><br />
If so, after searching for a solution, you came across a plugin to help you, or used the WordPress&#8217; standard &#8220;Recent Posts&#8221; widget.</p>
<p>For such a small need, you had to install one more thing, when it could have solved with one tiny line of code using the wp_get_archives() template tag.</p>
<p>What makes this tag so useful is the possibility to customize the result based on a few factors like: type, format, limit, code to be added before &amp; after or post count. Since by default this template tag returns results inside of &lt;li&gt;&lt;/li&gt; elements, remember to always enclose it in &lt;ul&gt;&lt;/ul&gt;, like shown below:</p>
<h3>Usage &amp; Examples:</h3>
<p>1. Display an archive of the last 6 months:</p>
<pre>&lt;ul&gt;&lt;?php wp_get_archives('type=monthly&amp;limit=6'); ?&gt;&lt;/ul&gt;</pre>
<p>2. Display the latest 10 posts:</p>
<pre>&lt;ul&gt;&lt;?php wp_get_archives('type=postbypost&amp;limit=10'); ?&gt;&lt;/ul&gt;</pre>
<p>Also, the display mode can be customized so that instead of showing a &lt;ul&gt; / &lt;li&gt; list, the archives could be displayed in a dropdown form element.</p>
<p><strong>More reference:</strong> <a href="http://codex.wordpress.org/Template_Tags/wp_get_archives" title="WordPress Codex">WordPress Codex on wp_get_archives()</a></p>
<hr /><h3>Free PDF eBook: Corporate Blogging Guide by Blogsessive</h3>As a subscribe reader of Blogsessive, this is my gift to you: a guide to corporate blogging (but not only) that will help you in your blogging adventures! <a href="http://blogsessive.com/wp-content/plugins/download-monitor/download.php?id=8" target="_blank">Download now, for FREE!</a><br /><br /><hr/><div style="background: #eeeeee;">Advertise on Blogsessive! <a href="http://buysellads.com/buy/detail/310/" title="Advertise on Blogsessive">125x125 banners</a> for <strong>$50 per month</strong>!</div>&copy;2008-2010 Copyright by <a href="http://blogsessive.com" title="Blogging tips">Blogsessive - Blogging Tips</a>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please <a href="http://blogsessive.com/contact" title="Contact Blogsessive">contact us</a>, so that we can take legal action immediately.<img src="http://blogsessive.com/?ak_action=api_record_view&id=27&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blogsessive.com/blogging-tools/wordpress-template-tags-wp_get_archives/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

