<?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>WordPress Themes Collection &#187; Blog</title>
	<atom:link href="http://wordpressthemescollection.com/category/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://wordpressthemescollection.com</link>
	<description>All the best Premium WordPress themes available online</description>
	<lastBuildDate>Thu, 09 Sep 2010 08:29:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Envato Cheap stuff! $400 worth for just $20</title>
		<link>http://wordpressthemescollection.com/envato-cheap-stuff-400-worth-for-just-20-738.html</link>
		<comments>http://wordpressthemescollection.com/envato-cheap-stuff-400-worth-for-just-20-738.html#comments</comments>
		<pubDate>Thu, 19 Aug 2010 16:16:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=738</guid>
		<description><![CDATA[It is this time of the year again which everyone that goes on one of the Envato market place like: birthday time. And because Envato is not like any other company, when it is their birthday, they give presents away. Like last year, they have released a  new bundle including 50 files, picked from the [...]]]></description>
			<content:encoded><![CDATA[<p>It is this time of the year again which everyone that goes on one of the Envato market place like: birthday time. And because Envato is not like any other company, when it is their birthday, they give presents away.</p>
<p>Like last year, they have released a  new bundle including 50 files, picked from the different market places. All that for $20! At this price it&#8217;s almost free Envato themes, audio, flash, artwork and 3D rendering you&#8217;re getting.</p>
<p>So rather than thinking about it just click on the banner and get yourself a pretty good deal right now!</p>
<p><a href="http://themeforest.net/item/envato-birthday-bundle-2010/119266?ref=benben"><img class="alignnone size-full wp-image-739" title="0.__large_preview" src="http://wordpressthemescollection.com/wp-content/uploads/2010/08/0.__large_preview.jpg" alt="" width="533" height="271" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/envato-cheap-stuff-400-worth-for-just-20-738.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WooThemes 5 for 1 promotion, until midnight 30th of June</title>
		<link>http://wordpressthemescollection.com/woothemes-5-for-1-promotion-until-midnight-30th-of-june-702.html</link>
		<comments>http://wordpressthemescollection.com/woothemes-5-for-1-promotion-until-midnight-30th-of-june-702.html#comments</comments>
		<pubDate>Tue, 29 Jun 2010 14:59:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=702</guid>
		<description><![CDATA[WooThemes have just started a new fantastic promotion today. Until the 30th of June you can pick any 5 themes for the price of one! And all yearly subscriptions also have a 50%  discount. Pretty amazing when you consider the quality of the themes those guys are doing. Don&#8217;t wait, go on the site now: [...]]]></description>
			<content:encoded><![CDATA[<p>WooThemes have just started a new fantastic promotion today. Until the 30th of June you can pick any 5 themes for the price of one! And all yearly subscriptions also have a 50%  discount.</p>
<p>Pretty amazing when you consider the quality of the themes those guys are doing. Don&#8217;t wait, go on the site now: <a href="http://www.woothemes.com/amember/go.php?r=272&amp;i=b16">WooThemes</a>.</p>
<p>My dream package of 5 for 1:</p>
<p><a href="http://wordpressthemescollection.com/inspire-business-oriented-687.html">Inspire</a></p>
<p><a href="http://www.woothemes.com/amember/go.php?r=272&amp;i=l76"><img class="alignnone size-medium wp-image-688" title="Inspire" src="http://wordpressthemescollection.com/wp-content/uploads/2010/06/Inspire-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p><a href="http://wordpressthemescollection.com/spectrum-magazine-premium-theme-656.html">Spectrum</a></p>
<p><a href="http://www.woothemes.com/amember/go.php?r=272&amp;i=l73"><img class="alignnone size-medium wp-image-658" title="Spectrum - Just another WooTheme" src="http://wordpressthemescollection.com/wp-content/uploads/2010/05/Spectrum-Just-another-WooTheme-e1273503014788-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p><a href="http://wordpressthemescollection.com/diarise-events-calendar-premium-theme-650.html">Diarise</a></p>
<p><a href="http://www.woothemes.com/amember/go.php?r=272&amp;i=l71"><img class="alignnone size-medium wp-image-651" title="diarise" src="http://wordpressthemescollection.com/wp-content/uploads/2010/04/diarise-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p><a href="http://wordpressthemescollection.com/postcard-a-traveler-premium-theme-603.html">Postcard</a></p>
<p><a href="http://www.woothemes.com/amember/go.php?r=272&amp;i=l63"><img class="alignnone size-medium wp-image-605" title="WooThemes Postcard Demo - Just another WordPress weblog" src="http://wordpressthemescollection.com/wp-content/uploads/2010/03/WooThemes-Postcard-Demo - Just-another-WordPress-weblog-e1269262997642-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p><a href="http://wordpressthemescollection.com/delegate-premium-theme-538.html">Delegate</a></p>
<p><a href="http://wordpressthemescollection.com/delegate-premium-theme-538.html"><img class="alignnone size-medium wp-image-539" title="Delegate - Just another WordPress weblog" src="http://wordpressthemescollection.com/wp-content/uploads/2010/01/Delegate - Just-another-WordPress-weblog-e1264511579971-300x199.jpg" alt="" width="300" height="199" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/woothemes-5-for-1-promotion-until-midnight-30th-of-june-702.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tips: excerpt filters that give you some more control</title>
		<link>http://wordpressthemescollection.com/quick-tips-excerpt-filters-that-give-you-some-more-control-669.html</link>
		<comments>http://wordpressthemescollection.com/quick-tips-excerpt-filters-that-give-you-some-more-control-669.html#comments</comments>
		<pubDate>Tue, 18 May 2010 10:22:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=669</guid>
		<description><![CDATA[Filter in WordPress are a joy and certainly what make the framework so flexible. Like the last post on enabling menu support, this is just a quick tips on two filters introduced in WordPress 2.8 and 2.9. excerpt_length The name says it all, it allowd you to change the length of the excerpt displayed. The [...]]]></description>
			<content:encoded><![CDATA[<p>Filter in WordPress are a joy and certainly what make the framework so flexible. Like the last post on enabling menu support, this is just a quick tips on two filters introduced in WordPress 2.8 and 2.9.</p>
<h2>excerpt_length</h2>
<p>The name says it all, it allowd you to change the length of the excerpt displayed. The usage is very simple:</p>
<pre><code>function mytheme_excerpt_length( $length ) {
	return 40;
}
add_filter( 'excerpt_length', 'mytheme_excerpt_length' );</code></pre>
<p>The above function changes the number of words returned by the excerpt to 40. The code goes in your theme functions.php.</p>
<h2>excerpt_more</h2>
<p>Again pretty self explanatory, this one changes the end of the excerpt to whatever you want. For example, to add a link you would add this to your functions.php:</p>
<pre><code>function mytheme_excerpt_more( $more ) {
	return ' &amp;hellip; &lt;a href=&quot;'. get_permalink() . '&quot;&gt;' . __('Continue reading', 'mytheme') . '&lt;/a&gt;';
}
add_filter( 'excerpt_more', 'mytheme_excerpt_more' );</code></pre>
<p>This code will add a &#8216;Continue Reading&#8217; link at the end of each excerpt and change the default &#8216;[...]&#8216; at the end to &#8216;&#8230;&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/quick-tips-excerpt-filters-that-give-you-some-more-control-669.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turn you WordPress into a mobile friendly site, instantly</title>
		<link>http://wordpressthemescollection.com/turn-you-wordpress-into-a-mobile-friendly-site-instantly-663.html</link>
		<comments>http://wordpressthemescollection.com/turn-you-wordpress-into-a-mobile-friendly-site-instantly-663.html#comments</comments>
		<pubDate>Thu, 13 May 2010 12:36:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=663</guid>
		<description><![CDATA[If you are viewing this site using your smartphone or iPad/iPod you will notice that the design has changed. We have installed a new plugin on the site today that displays a special theme for mobile browsers. The plugin is called WPtouch and is freely available from the WordPress plugin repository here. it comes with [...]]]></description>
			<content:encoded><![CDATA[<p>If you are viewing this site using your smartphone or iPad/iPod you will notice that the design has changed. We have installed a new plugin on the site today that displays a special theme for mobile browsers.</p>
<p>The plugin is called WPtouch and is freely available from the WordPress plugin repository <a href="http://wordpress.org/extend/plugins/wptouch/">here</a>. it comes with a built in mobile friendly theme with an Apple style design that works.</p>
<p>Everything is there to make your mobile users at ease with a nice layout the will fit the screen and display your posts and pages nicely.</p>
<p>It also includes ajax loading for content so you loose less time waiting for the browser to load and more time actually reading. Having the content fitting the view port is much better when using a small screen. No more horizontal scroll and zoom.</p>
<p>There are loads of options in the backend to customize the theme but if it&#8217;s not enough you can always get your hands dirty and change the code. It is WordPress code after all and if you are familiar with theme design then you should be able to get by quite easily.</p>
<p>With the rapid increase in mobile browsing over the past few month this is something every site should consider.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/turn-you-wordpress-into-a-mobile-friendly-site-instantly-663.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick tips: Enable menu support for your themes in WP 3.0</title>
		<link>http://wordpressthemescollection.com/quick-tips-enable-menu-support-for-your-themes-in-wp-3-0-623.html</link>
		<comments>http://wordpressthemescollection.com/quick-tips-enable-menu-support-for-your-themes-in-wp-3-0-623.html#comments</comments>
		<pubDate>Thu, 01 Apr 2010 14:48:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=623</guid>
		<description><![CDATA[You may be aware that a new major version of WordPress is coming out soon. Version 3.0 will bring some features like a new menu builder. The menu builder will allow you to create a menu from any categories, pages and links, order them by drag and drop, create submenus, etc. If you are a [...]]]></description>
			<content:encoded><![CDATA[<p>You may be aware that a new major version of WordPress is coming out soon. Version 3.0 will bring some features like a new menu builder.</p>
<p>The menu builder will allow you to create a menu from any categories, pages and links, order them by drag and drop, create submenus, etc. If you are a WooTheme user you are already using this menu builder so you now what I am talking about.</p>
<p>Now to make you theme compatible with this new feature there are small step you need to take:</p>
<h2>1 Tell WP your theme uses the menu builder</h2>
<p>Add this simple line to your functions.php file</p>
<pre><code>// This theme uses wp_nav_menu()
add_theme_support( 'nav-menus' );</code></pre>
<h2>Use the new function</h2>
<p>Then Use the <a href="http://codex.wordpress.org/Function_Reference/wp_nav_menu">wp_nav_menu</a> in your header:</p>
<pre><code>&lt;?php wp_nav_menu( 'sort_column=menu_order&amp;container_class=menu-header' ); ?&gt;</code></pre>
<p>And that&#8217;s it. I know it&#8217;s short but that&#8217;s why it&#8217;s called a quick tip :p</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/quick-tips-enable-menu-support-for-your-themes-in-wp-3-0-623.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The little details: playing with date display</title>
		<link>http://wordpressthemescollection.com/the-little-details-playing-with-date-display-558.html</link>
		<comments>http://wordpressthemescollection.com/the-little-details-playing-with-date-display-558.html#comments</comments>
		<pubDate>Thu, 25 Feb 2010 11:21:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=558</guid>
		<description><![CDATA[The little details is a new category about what tiny details can make a good or just average design. Details give depth to a website in ways that the user does not always see but feel nonetheless. Today&#8217;s &#8220;little details&#8221; will focus on the date display. Particularly present on blog, the date is often left [...]]]></description>
			<content:encoded><![CDATA[<p>The little details is a new category about what tiny details can make a good or just average design. Details give depth to a website in ways that the user does not always see but feel nonetheless.</p>
<p>Today&#8217;s &#8220;little details&#8221; will focus on the date display. Particularly present on blog, the date is often left aside and displayed as a simple string. While this approach is indeed working for some designs, other take advantage of this added information to play with typography, space or support the rest of the design with colours.</p>
<p>But lets have a look at some examples:</p>
<p><a href="http://www.noupe.com/"><img class="alignnone size-full wp-image-575" title="Noupe" src="http://wordpressthemescollection.com/wp-content/uploads/2010/02/Noupe-e1267020075164.jpeg" alt="" width="300" height="300" /></a></p>
<p><a href="http://www.woothemes.com/amember/go.php?r=272&amp;i=l63"><img class="alignnone size-full wp-image-574" title="WooThemes Postcard Demo - Just another WordPress weblog" src="http://wordpressthemescollection.com/wp-content/uploads/2010/02/WooThemes-Postcard-Demo - Just-another-WordPress-weblog-e1267020052836.jpeg" alt="" width="299" height="299" /></a></p>
<p><a href="http://www.webdesignerwall.com/"><img class="alignnone size-full wp-image-572" title="Web Designer Wall - Design Trends and Tutorials" src="http://wordpressthemescollection.com/wp-content/uploads/2010/02/Web-Designer-Wall-Design-Trends-and-Tutorials-e1267019914422.jpeg" alt="" width="300" height="300" /></a></p>
<p><a href="http://spyrestudios.com/"><img class="alignnone size-full wp-image-571" title="Spyre Studios - Web-Design And Inspiration Blog" src="http://wordpressthemescollection.com/wp-content/uploads/2010/02/Spyre-Studios-Web-Design-And-Inspiration-Blog-e1267019931190.jpeg" alt="" width="300" height="300" /></a></p>
<p><a href="http://inspiringpixel.com/"><img class="alignnone size-full wp-image-569" title="Inspiring Pixel" src="http://wordpressthemescollection.com/wp-content/uploads/2010/02/Inspiring-Pixel-e1267019964503.jpeg" alt="" width="299" height="299" /></a></p>
<p><a href="http://24ways.org/"><img class="alignnone size-full wp-image-583" title="24 ways - web design and development articles and tutorials for advent" src="http://wordpressthemescollection.com/wp-content/uploads/2010/02/24-ways-web-design-and-development-articles-and-tutorials-for-advent-e1267096736803.jpeg" alt="" width="299" height="299" /></a></p>
<p><a href="http://designintheraw.com/"><img class="alignnone size-full wp-image-568" title="CSS + XHTML Designs and Development - Design in the Raw" src="http://wordpressthemescollection.com/wp-content/uploads/2010/02/CSS-+-XHTML-Designs-and-Development-Design-in-the-Raw-e1267019980764.jpeg" alt="" width="299" height="299" /></a></p>
<p><a href="http://www.arvindandrion.com/"><img class="alignnone size-full wp-image-567" title="Arvind Andrion" src="http://wordpressthemescollection.com/wp-content/uploads/2010/02/Arvind-Andrion-e1267019999861.jpeg" alt="" width="300" height="300" /></a></p>
<p><a href="http://www.learningjquery.com/"><img class="alignnone size-full wp-image-576" title="Learning jQuery - Tips, Techniques, Tutorials" src="http://wordpressthemescollection.com/wp-content/uploads/2010/02/Learning-jQuery-Tips-Techniques-Tutorials1-e1267020303504.jpeg" alt="" width="300" height="300" /></a></p>
<h2>Some Premium themes with nice date styling</h2>
<p><a href="http://www.woothemes.com/amember/go.php?r=272&amp;i=l4"><img class="alignnone size-full wp-image-577" title="Bueno WooThemes Demos" src="http://wordpressthemescollection.com/wp-content/uploads/2010/02/Bueno-WooThemes-Demos-e1267020418709.jpeg" alt="" width="300" height="300" /></a></p>
<p><a href="http://themeforest.net/item/blue-earth-wordpress-theme/full_screen_preview/83359?ref=benben"><img class="alignnone size-full wp-image-580" title="Blue Earth WordPress theme Preview - ThemeForest" src="http://wordpressthemescollection.com/wp-content/uploads/2010/02/Blue-Earth-Wordpress-theme-Preview-ThemeForest-e1267096592444.jpeg" alt="" width="299" height="299" /></a></p>
<p><a href="http://themeforest.net/item/creative-wordpress-theme-9-in-1/full_screen_preview/84549?ref=benben"><img class="alignnone size-full wp-image-581" title="Creative WordPress Theme - 9 in 1 Preview - ThemeForest" src="http://wordpressthemescollection.com/wp-content/uploads/2010/02/Creative-WordPress-Theme-9-in-1-Preview-ThemeForest-e1267096639800.jpeg" alt="" width="300" height="300" /></a></p>
<p><a href="http://themeforest.net/item/gateway-studios-for-wordpress/full_screen_preview/82145?ref=benben"><img class="alignnone size-full wp-image-582" title="Gateway Studios for WordPress Preview - ThemeForest" src="http://wordpressthemescollection.com/wp-content/uploads/2010/02/Gateway-Studios-for-WordPress-Preview-ThemeForest-e1267096684288.jpeg" alt="" width="300" height="300" /></a></p>
<p>Styling the date of posts is the little detail that can make your design even better. Have some examples you would like to share? Feel free to post them in the comments section.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/the-little-details-playing-with-date-display-558.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WooThemes Playground</title>
		<link>http://wordpressthemescollection.com/woothemes-playground-552.html</link>
		<comments>http://wordpressthemescollection.com/woothemes-playground-552.html#comments</comments>
		<pubDate>Mon, 08 Feb 2010 15:42:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=552</guid>
		<description><![CDATA[WooThemes, the fantastic premium WordPress theme club has just released something they call &#8220;The Playground&#8220;. It basically allows you to try any of their themes, front end AND back end. This is a very good move from their part we think has new potential buyer will be able to try out the theme inside out [...]]]></description>
			<content:encoded><![CDATA[<p>WooThemes, the fantastic premium WordPress theme club has just released something they call &#8220;<a href="http://test.woothemes.com/">The Playground</a>&#8220;. It basically allows you to try any of their themes, front end AND back end. This is a very good move from their part we think has new potential buyer will be able to try out the theme inside out before buying and particularly the WooFramework 2.</p>
<p><a href="http://test.woothemes.com/"><img class="alignnone size-full wp-image-553" title="playground1" src="http://wordpressthemescollection.com/wp-content/uploads/2010/02/playground1-e1265643819786.jpg" alt="" width="400" height="137" /></a></p>
<p>Many good theme are good because they include some bespoke back end functionalities. But when demoing a theme you usually don&#8217;t get to try them out.</p>
<p><a href="http://test.woothemes.com/">The Playground</a> is based on a WPMU install using all the themes available and you can create new pages, posts, post comments and change skins, style, etc&#8230;</p>
<p>Now let&#8217;s see if ThemeForest take the same approach and open the theme testing to the backend as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/woothemes-playground-552.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ajax WordPress post popup with SimpleModal and jQuery</title>
		<link>http://wordpressthemescollection.com/ajax-wordpress-post-popup-with-simplemodal-and-jquery-488.html</link>
		<comments>http://wordpressthemescollection.com/ajax-wordpress-post-popup-with-simplemodal-and-jquery-488.html#comments</comments>
		<pubDate>Wed, 16 Dec 2009 19:14:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=488</guid>
		<description><![CDATA[Today we are going to look at getting the content of a post using ajax and then display it in a popup box. The popup part is actually the easiest part, thanks to the fantastic Simple Modal plugin for jQuery written by Eric Martin. So the basics here are: we call a page using ajax, [...]]]></description>
			<content:encoded><![CDATA[<p>Today we are going to look at getting the content of a post using ajax and then display it in a popup box. The popup part is actually the easiest part, thanks to the fantastic<a href="http://www.ericmmartin.com/projects/simplemodal/"> Simple Modal plugin</a> for jQuery written by Eric Martin.</p>
<p>So the basics here are:</p>
<ul>
<li>we call a page using ajax, passing the id of the post</li>
<li>The page grabs the content of the post we requested and returns it to the script</li>
<li>We then output the content in a div and &#8220;simplemodal&#8221; it</li>
</ul>
<p>And for the result, click on <a class="postpopup" rel="499" href="javascript:;">this link</a>.</p>
<p>Note: be sure to dowload the latest version of both jQuery and SimpleModal.</p>
<p><span id="more-488"></span></p>
<p>The major problem when it comes to ajax and WordPress is that you need to call a php script that will have access to all the WordPress built in functions. The solution came from <a href="http://www.tyssendesign.com.au/articles/cms/fetching-posts-in-wordpress-expressionengine-with-jquery-ajax/">this post</a> from John Faulds.</p>
<p>Basically you create a page template that will be in charge of grabbing the post from the id we pass and returning the content to the script.</p>
<p>This is going to be a simple loop like this:</p>
<pre><code>&lt;?php
/*
Template Name: Ajax Handler
*/
?&gt;
&lt;?php
	$post = get_post($_GET['id']);
?&gt;
&lt;?php if ($post) : ?&gt;
	&lt;?php setup_postdata($post); ?&gt;
	&lt;div class=&quot;whatever&quot;&gt;
		&lt;h2 class=&quot;entry-title&quot;&gt;&lt;?php the_title() ?&gt;&lt;/h2&gt;
		&lt;div class=&quot;entry-content&quot;&gt;
			&lt;?php the_content(); ?&gt;
		&lt;/div&gt;
	&lt;/div&gt;
&lt;?php endif; ?&gt;</code></pre>
<p>Save this code in a file called ajax-handler.php in you theme folder. Now if you go in your admin panel and create a new page, you should be able to select this template as the page template. So I have created a page in WordPress called Ajax Handler with the template &#8220;Ajax Handler&#8221; assigned to it. The special function we use here, get_post(), will grab the content of a post with the Id we&#8217;ve passed with ajax as a GET variable.</p>
<p>Talking about ajax, lets have a look at the function to do the stuff:</p>
<pre><code>jQuery(document).ready(function() {
	jQuery('a.postpopup').click(function(){
		id = jQuery(this).attr('rel');
		jQuery('&lt;div id=&quot;ajax-popup&quot;&gt;&lt;/div&gt;').hide().appendTo('body').load('http://urlofyoursite.com/ajax-handler/?id='+id).modal();
		return false;
	});
});</code></pre>
<p>note: in the &#8216;load&#8217; function you want to use the permalink to the page NOT the path the template file of the ajax handler.</p>
<p>note 2: I am using &#8216;jQuery&#8217; instead of $ because I use the jQuery included in WordPress which is in no conflict mode. If you use normal jQuery then replace all occurrences of &#8216;jQuery&#8217; by $ in my javascript snippet. This code would go in an external javascript file you would include on your page or in the header. But the first option is recommended.</p>
<p>This a very simple way to do it, thanks to jQuery. This means: when a click on a link with a class postpopup, get the id from its rel attribute, create a empty div, load the page &#8216;ajax-handler&#8217; and add the content of the data returned to the div. Then SimpleModal it.</p>
<p>The html for the link should look like this:</p>
<pre><code>&lt;a href=&quot;javascript:;&quot; rel=&quot;postid&quot; class=&quot;postpopup&quot;&gt;this link&lt;/a&gt;</code></pre>
<p>note: in this html it would be better to replace the href by the actual url of the post, so if someone hasn&#8217;t got javascript enable they can still view the content.</p>
<p>And that&#8217;s it, all done. To get everything to work you will of course need to include jQuery and SimpleModal on your page. Don&#8217;t forget to hide your ajax handler page from your blig navigation. If your theme is using the wp_list_pages function you can pass a parameter &#8216;exclude=id_of_the_page&#8217; to exclude it from the list.</p>
<p>And for the result, click on <a class="postpopup" rel="499" href="javascript:;">this link</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/ajax-wordpress-post-popup-with-simplemodal-and-jquery-488.html/feed</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>WordPress 2.9 upcoming features</title>
		<link>http://wordpressthemescollection.com/wordpress-2-9-upcoming-features-381.html</link>
		<comments>http://wordpressthemescollection.com/wordpress-2-9-upcoming-features-381.html#comments</comments>
		<pubDate>Fri, 04 Dec 2009 17:25:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=381</guid>
		<description><![CDATA[WordPress 2.9 is coming up in the next few weeks and it packed full of new features. Some will not really concern you, some will make your life ten times easier. Out of the lot I think the crop tool for images is my favorite closely followed by the category template support. Support location of [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress 2.9 is coming up in the next few weeks and it packed full of new features. Some will not really concern you, some will make your life ten times easier. Out of the lot I think the crop tool for images is my favorite closely followed by the category template support.<span id="more-381"></span></p>
<h2>Support <a title="Template Hierarchy" href="http://codex.wordpress.org/Template_Hierarchy#Category_display">location of category templates</a> based on category-slug as well as category-id</h2>
<p>This is probably the feature that will help most CMS developer. It works the same way as sidebars does. You add the slug of the category to the name of the file and when you display this category WordPress will look for the template and use it to output the posts.</p>
<p>Example: You want a specific template for the &#8220;Members&#8221; category. You create a file in your theme called category-members.php. When displaying the members category WordPress use this template. This allow for a complete control over each category display like page templates do for pages.</p>
<h2>Image editor</h2>
<p>At least, we will be able to crop, resize and rotate pictures from the backend. The feature is accessible just after you&#8217;ve uploaded a picture by clicking on the &#8220;edit picture&#8221; link.</p>
<h2>Trash</h2>
<p>Ever deleted a post and realized to late that it was the wrong one? The addition of the trash state let you bring back deleted posts, pages and pictures for the dead.</p>
<h2>Post Thumbnail</h2>
<p>Probably one of the most hacked / plugged in feature on WordPress. The 2.9 version adds the ability to attache a picture to a post and use it in conjunction with the post_image() template function to display it. The obvious use for it is when you want to get this kind of layout:</p>
<h2>Embeds</h2>
<p>Easier way to embed media using oEmbed.</p>
<h2>Raise the version of MySQL supported from 4.0 to 4.1.2</h2>
<p>The MySQL requirement have been raised to 4.1.2 which will allow the developers to use new SQL functions and hopefully speed up stuff a bit. More info there:</p>
<h2>Canonical tag support</h2>
<p>The canonical tag is used by search engines to avoid duplicated content issue. It will be added to single posts and pages.</p>
<h2>register_theme_directory()</h2>
<p>Plugins will be able to set a new directory for WordPress to look for themes.</p>
<h2>Widgets outside of sidebars</h2>
<p>the new widget() function will let you call widgets outside the traditional registered sidebar.</p>
<h2>Comment metadata</h2>
<p>Add support for metadata to comments. The is the same function as per metadata on posts and pages and will allow you to use new variable in your templates.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/wordpress-2-9-upcoming-features-381.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Small excerpts in site navigation showcase</title>
		<link>http://wordpressthemescollection.com/small-excerpts-in-site-navigation-showcase-458.html</link>
		<comments>http://wordpressthemescollection.com/small-excerpts-in-site-navigation-showcase-458.html#comments</comments>
		<pubDate>Tue, 24 Nov 2009 13:45:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=458</guid>
		<description><![CDATA[The navigation on a website is of course one of the most important part of the design. The user need to understand how to explore your site at first glance otherwise he will probably get frustrated and live. Some sites add a few words to each link to explain what the page linked is about. [...]]]></description>
			<content:encoded><![CDATA[<p>The navigation on a website is of course one of the most important part of the design. The user need to understand how to explore your site at first glance otherwise he will probably get frustrated and live. Some sites add a few words to each link to explain what the page linked is about.</p>
<p>Let&#8217;s have a look at a few examples:</p>
<p><a href="http://designintellection.com/"><img class="alignnone size-full wp-image-476" title="Design Intellection" src="http://wordpressthemescollection.com/wp-content/uploads/2009/11/Design-Intellection.jpeg" alt="Design Intellection" width="520" height="187" /></a></p>
<p><a href="http://www.zenelements.com/"><img class="alignnone size-full wp-image-475" title="Zen Elements - Graphic Design, Photography &amp; Web Site Design - Scotland, Dundee" src="http://wordpressthemescollection.com/wp-content/uploads/2009/11/Zen-Elements-Graphic-Design-Photography-Web-Site-Design-Scotland-Dundee.jpeg" alt="Zen Elements - Graphic Design, Photography &amp; Web Site Design - Scotland, Dundee" width="520" height="204" /></a></p>
<p><a href="http://sneakybadger.com/"><img class="alignnone size-full wp-image-474" title="Sneaky Badger Interactive - Web Design and Development" src="http://wordpressthemescollection.com/wp-content/uploads/2009/11/Sneaky-Badger-Interactive-Web-Design-and-Development.jpeg" alt="Sneaky Badger Interactive - Web Design and Development" width="520" height="220" /></a></p>
<p><a href="http://www.simonamunteanu.com"><img class="alignnone size-full wp-image-472" title="simonamuntanu" src="http://wordpressthemescollection.com/wp-content/uploads/2009/11/simonamuntanu.jpg" alt="simonamuntanu" width="520" height="229" /></a></p>
<p><a href="http://meinlpercussion.com/"><img class="alignnone size-full wp-image-471" title="MEINL PERCUSSION - PASSION FOR DETAILS- Home" src="http://wordpressthemescollection.com/wp-content/uploads/2009/11/MEINL-PERCUSSION-PASSION-FOR-DETAILS-Home.jpeg" alt="MEINL PERCUSSION - PASSION FOR DETAILS- Home" width="520" height="147" /></a></p>
<p><a href="http://www.julianandrade.com/reel.htm"><img class="alignnone size-full wp-image-470" title="Julian Andrade Film Portfolio" src="http://wordpressthemescollection.com/wp-content/uploads/2009/11/Julian-Andrade-Film-Portfolio.jpeg" alt="Julian Andrade Film Portfolio" width="520" height="196" /></a></p>
<p><a href="http://www.clark-studios.co.uk/"><img class="alignnone size-full wp-image-469" title="Clark Studios - Web Designer &amp; Programmer based in Farnborough, Hampshire, UK" src="http://wordpressthemescollection.com/wp-content/uploads/2009/11/Clark-Studios-Web-Designer-Programmer-based-in-Farnborough-Hampshire-UK.jpeg" alt="Clark Studios - Web Designer &amp; Programmer based in Farnborough, Hampshire, UK" width="520" height="220" /></a></p>
<p><a href="http://www.brianhoff.net/"><img class="alignnone size-full wp-image-468" title="Brian Hoff --- Brand and Website Designer from Philadelphia" src="http://wordpressthemescollection.com/wp-content/uploads/2009/11/Brian-Hoff-Brand-and-Website-Designer-from-Philadelphia.jpeg" alt="Brian Hoff --- Brand and Website Designer from Philadelphia" width="520" height="220" /></a></p>
<p><a href="http://applereviews.com/"><img class="alignnone size-full wp-image-467" title="AppleReviews.com - Everything Apple!" src="http://wordpressthemescollection.com/wp-content/uploads/2009/11/AppleReviews.com-Everything-Apple.jpeg" alt="AppleReviews.com - Everything Apple!" width="520" height="176" /></a></p>
<p><a href="http://www.aifosvn.com/"><img class="alignnone size-full wp-image-466" title="Aifosvn" src="http://wordpressthemescollection.com/wp-content/uploads/2009/11/Aifosvn.jpeg" alt="Aifosvn" width="520" height="220" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/small-excerpts-in-site-navigation-showcase-458.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Trend: Javascript sliders and WordPress</title>
		<link>http://wordpressthemescollection.com/trend-javascript-sliders-and-wordpress-379.html</link>
		<comments>http://wordpressthemescollection.com/trend-javascript-sliders-and-wordpress-379.html#comments</comments>
		<pubDate>Tue, 20 Oct 2009 15:45:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=379</guid>
		<description><![CDATA[Javascript sliders are not a new trend as such but they seem to be the current reference when it comes to portfolios and showcases. It is especially interesting to see how they are implemented in a WordPress environment so I have shortlisted a few WordPress powered sites that uses javascript sliders in one way or [...]]]></description>
			<content:encoded><![CDATA[<p>Javascript sliders are not a new trend as such but they seem to be the current reference when it comes to portfolios and showcases.</p>
<p>It is especially interesting to see how they are implemented in a WordPress environment so I have shortlisted a few WordPress powered sites that uses javascript sliders in one way or another.<span id="more-379"></span></p>
<h4><a href="http://www.radiumlabs.com/">Radium</a></h4>
<p><a href="http://www.radiumlabs.com/"><img class="alignnone size-full wp-image-400" title="Search Engine Marketing Agency - Radium" src="http://wordpressthemescollection.com/wp-content/uploads/2009/10/Search-Engine-Marketing-Agency-Radium.jpeg" alt="Search Engine Marketing Agency - Radium" width="520" height="294" /></a></p>
<h4><a href="http://www.netdreams.co.uk/">internet dreams</a></h4>
<p><a href="http://www.netdreams.co.uk/"><img class="alignnone size-full wp-image-404" title="Web design London - Creative web agency from Richmond, London" src="http://wordpressthemescollection.com/wp-content/uploads/2009/10/Web-design-London-Creative-web-agency-from-Richmond-London.jpeg" alt="Web design London - Creative web agency from Richmond, London" width="520" height="272" /></a></p>
<h4><a href="http://www.branded07.com/">Branded07</a></h4>
<p><a href="http://www.branded07.com/"><img class="alignnone size-full wp-image-399" title="Online web design portfolio of Rob Palmer, Creating accessible website design · Branded07" src="http://wordpressthemescollection.com/wp-content/uploads/2009/10/Online-web-design-portfolio-of-Rob-Palmer-Creating-accessible-website-design-·-Branded07.jpeg" alt="Online web design portfolio of Rob Palmer, Creating accessible website design · Branded07" width="520" height="247" /></a></p>
<h4><a href="http://www.tutorial9.net/">Tutorial9</a></h4>
<p><a href="http://www.tutorial9.net/"><img class="alignnone size-full wp-image-401" title="Tutorial9 - Photoshop Tutorials, Photography Tuts, and Resources" src="http://wordpressthemescollection.com/wp-content/uploads/2009/10/Tutorial9-Photoshop-Tutorials-Photography-Tuts-and-Resources.jpeg" alt="Tutorial9 - Photoshop Tutorials, Photography Tuts, and Resources" width="520" height="241" /></a></p>
<h4><a href="http://www.copimaj.ro/">Copimaj Interactive</a></h4>
<p><a href="http://www.copimaj.ro/"><img class="alignnone size-full wp-image-396" title="Copimaj Interactive - Agentie Interactiva- Marketing Online, Web Design, PR online" src="http://wordpressthemescollection.com/wp-content/uploads/2009/10/Copimaj-Interactive-Agentie-Interactiva-Marketing-Online-Web-Design-PR-online.jpeg" alt="Copimaj Interactive - Agentie Interactiva- Marketing Online, Web Design, PR online" width="520" height="234" /></a></p>
<h4><a href="http://www.hyperxlocal.com/">HyperX Local</a></h4>
<p><a href="http://www.hyperxlocal.com/"><img class="alignnone size-full wp-image-397" title="HyperX Local" src="http://wordpressthemescollection.com/wp-content/uploads/2009/10/HyperX-Local.jpeg" alt="HyperX Local" width="520" height="243" /></a></p>
<h4><a href="http://www.splitmango.com/">Split Mango</a></h4>
<p><a href="http://www.splitmango.com/"><img class="alignnone size-full wp-image-402" title="Vancouver Web Design &amp; Search Engine Optimization - SEO, PPC" src="http://wordpressthemescollection.com/wp-content/uploads/2009/10/Vancouver-Web-Design-Search-Engine-Optimization-SEO-PPC.jpeg" alt="Vancouver Web Design &amp; Search Engine Optimization - SEO, PPC" width="520" height="286" /></a></p>
<h4><a href="http://icondock.com/">IconDock</a></h4>
<p><a href="http://icondock.com/"><img class="alignnone size-full wp-image-398" title="IconDock - The Art of Stock Icons" src="http://wordpressthemescollection.com/wp-content/uploads/2009/10/IconDock-The-Art-of-Stock-Icons.jpeg" alt="IconDock - The Art of Stock Icons" width="520" height="250" /></a></p>
<h4><a href="http://welessthanthree.com/">We &lt;3 ™ </a></h4>
<p><a href="http://welessthanthree.com/"><img class="alignnone size-full wp-image-403" title="We -3 ™ – Brooklyn based web design, graphic design, identity and branding" src="http://wordpressthemescollection.com/wp-content/uploads/2009/10/We-3-™-–-Brooklyn-based-web-design-graphic-design-identity-and-branding.jpeg" alt="We -3 ™ – Brooklyn based web design, graphic design, identity and branding" width="520" height="244" /></a></p>
<h4><a href="http://www.ankara-haliyikama.net/">Ankara Halı Yıkama Merkezi</a></h4>
<p><a href="http://www.ankara-haliyikama.net/"><img class="alignnone size-full wp-image-395" title="Ankara Halı Yıkama Merkezi - Halı Yıkama Bizim İşimiz... Temizlik Firması - Halı Yıkama Ankara" src="http://wordpressthemescollection.com/wp-content/uploads/2009/10/Ankara-Halı-Yıkama-Merkezi-Halı-Yıkama-Bizim-İşimiz...-Temizlik-Firması-Halı-Yıkama-Ankara.jpeg" alt="Ankara Halı Yıkama Merkezi - Halı Yıkama Bizim İşimiz... Temizlik Firması - Halı Yıkama Ankara" width="520" height="237" /></a></p>
<h2>Do it yourself</h2>
<p>If you like that you might want to implement one yourself. It&#8217;s easier than what it looks like and even if you don&#8217;t now much about javascript you should be able to pull it off. All we need to do is a custom query that displays posts from a specific category. Then a javascript that takes those posts and turn them in a slider.</p>
<p>The code could look like that (goes in you template file, either header.php or index.php or the homepage template):</p>
<pre><code>&lt;?php
//only display if on the frontpage
if(is_front_page()):  ?&gt;

&lt;div id=&quot;banner&quot;&gt;
	&lt;?php
	//get the posts from the slider category
	$homeslider = new WP_Query(array(
		'cat' =&gt; $id_of_the_category,
		'showposts' =&gt; $how_many_posts,
		'post_type' =&gt; 'post',
		'post_status' =&gt; 'publish',
		'caller_get_posts' =&gt; 1)
	);
	if ($homeslider-&gt;have_posts()) :
	?&gt;

	&lt;div class=&quot;wrapper&quot;&gt;

		&lt;ul&gt;
			&lt;?php while ($homeslider-&gt;have_posts()) : $homeslider-&gt;the_post(); ?&gt;
				&lt;li class=&quot;slider post&quot;&gt;
					&lt;div class=&quot;slider_text hentry&quot;&gt;
						&lt;h2&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
						&lt;?php
						//reset more to be able to display the read more link
						global $more;
						$more = 0;
						the_content('Read more...');
						?&gt;
					&lt;/div&gt;
				&lt;/li&gt;
			&lt;?php endwhile; ?&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;?php endif; ?&gt;
&lt;/div&gt;
		
&lt;?php endif; ?&gt;</code></pre>
<p>Then grab the fantastic code from Chris Coyier&#8217;s <a href="http://css-tricks.com/examples/AnythingSlider/">AnythingSlider</a> script and add this at the top of the file:</p>
<pre><code>$(document).ready(function() {
	$('#banner').anythingSlider({
			easing: &quot;swing&quot;,                // Anything other than &quot;linear&quot; or &quot;swing&quot; requires the easing plugin
			autoPlay: false,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not
			startStopped: false,            // If autoPlay is on, this can force it to start stopped
			delay: 3000,                    // How long between slide transitions in AutoPlay mode
			animationTime: 600,             // How long the slide transition takes
			hashTags: true,                 // Should links change the hashtag in the URL?
			buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
			pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
			startText: &quot;Start&quot;,             // Start text
			stopText: &quot;Stop&quot;,               // Stop text
			navigationFormatter: null       // Details at the top of the file on this use (advanced use)
	});
});</code></pre>
<p>Add the CSS and images from AnythingSlider and don&#8217;t forget to call the javascript file (after the jQuery call) and the CSS file in the header. Remember that if you use the jQuery from WordPress you have to change the $ by jQuery in the file and the code at the top.</p>
<h2>Ready made solutions</h2>
<p>Now if you like the slider effect then there are a few <a href="http://wordpressthemescollection.com">WordPress themes</a> out there that will give you just that:</p>
<h4>Pacifica, ThemeForest, from $30 single use.</h4>
<p><a href="http://themeforest.net/item/pacifica-wp-a-premium-wordpress-portfolio-theme/61047?ref=benben"><img title="Pacifica" src="../wp-content/uploads/2009/10/Pacifica-A-Premium-Portfolio-Theme.jpeg" alt="" width="498" height="331" /></a></p>
<h4>Levitation, ThemeForest, from $35 single use</h4>
<p><a href="http://themeforest.net/item/levitation-wordpress-business-portfolio-4-in-1/60299?ref=benben"><img class="alignnone" title="Levitation" src="http://wordpressthemescollection.com/wp-content/uploads/2009/09/Leviation.jpeg" alt="" width="498" height="331" /></a></p>
<h4>Twicet, ThemeForest, from $35 single use</h4>
<p><a href="http://themeforest.net/item/twicet-business-portfolio-wordpress-5-in-1/49773?ref=benben"><img class="alignnone" title="Twicet" src="http://wordpressthemescollection.com/wp-content/uploads/2009/07/Kriesi.at-%E2%80%93-Twicet-Demo.jpeg" alt="" width="498" height="331" /></a></p>
<h4>Vibrant CMS, WooThemes, from $70 single use (plus one free theme!)</h4>
<p><a href="http://www.woothemes.com/amember/go.php?r=272&amp;i=l35"><img class="alignnone" title="Vibrant CMS" src="http://wordpressthemescollection.com/wp-content/uploads/2009/07/Vibrant-CMS%C2%A0-%C2%A0Just-another-WordPress-weblog.jpeg" alt="" width="498" height="331" /></a></p>
<h4>The Gazette Edition, WooThemes, from $70 single (plus one free theme!)</h4>
<p><a href="http://www.woothemes.com/amember/go.php?r=272&amp;i=l32"><img class="alignnone" title="The Gazette Edition" src="http://wordpressthemescollection.com/wp-content/uploads/2009/06/Gazette-Edition.jpeg" alt="" width="498" height="331" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/trend-javascript-sliders-and-wordpress-379.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Automatically generate a content table in WordPress</title>
		<link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html</link>
		<comments>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comments</comments>
		<pubDate>Thu, 08 Oct 2009 14:52:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=349</guid>
		<description><![CDATA[A content table is what you can use in some big and small documents to reference all the titles so as to give quick access to certain part of the document. You see that often on FAQs pages for example or other long page where inner navigation is needed. The point here is to automate [...]]]></description>
			<content:encoded><![CDATA[<p>A content table is what you can use in some big and small documents to reference all the titles so as to give quick access to certain part of the document.</p>
<p>You see that often on FAQs pages for example or other long page where inner navigation is needed.</p>
<p>The point here is to automate the process of creating a content table in WordPress. We are going to produce a list of a certain type of headers at the top of the page/post and link them with anchors to the document. Something similar to this:<span id="more-349"></span></p>
<div id='content_table'><a name='go_content_table' id='go_content_table'></a><h3>Content table</h3><ul class='xoxo ct_column'><li><a href="#let8217s-get-started">Let&#8217;s get started</a></li><li><a href="#so-what-have-we-got-there">So, what have we got there.</a></li></ul><ul class='xoxo ct_column'><li><a href="#the-getcontenttable-function">The get_content_table function.</a></li><li><a href="#now-the-interesting-stuff">Now the interesting stuff:</a></li></ul></div>
<p>Sounds good but there is a limitation. We are not going to support nested titles list for now. It is possible but it would make the code much more complex.</p>
<p>The code is pretty simple and will consist of one function hooked to the filter &#8220;the_content&#8221; available in WordPress. Using a shortcode like content_table tag=&#8221;h2&#8243;  between [] will tell the function to generate the table.</p>
<h2 name="let8217s-get-started" id="let8217s-get-started">Let&#8217;s get started<a class="backtop"href="#go_content_table">Back to top</a></h2>
<p>Here is the full code. I&#8217;ll go in more details below.</p>
<pre><code>/**
 * Function to auto generate a content table from the content
 * @author Ben  http://wordpressthemescollection.com
 * @since 1
 */
add_filter('the_content', 'get_content_table');

function get_content_table($content){

	preg_match('/\[content_table\s(.*?)\]/', $content, $m);
	if($m[0]):
		$attr = shortcode_parse_atts($m[1]);
		
		$in_tag = $attr['tag'];

		preg_match_all('|&lt;'.$in_tag.'&gt;(.*)&lt;/'.$in_tag.'&gt;|', $content, $titles);
		
		//if there are titles, build the content table
		if($titles[1]){

			$max = count($titles[1]);
			$counter = 0;
			$content_table = &quot;&lt;div id='content_table'&gt;&lt;a name='go_content_table' id='go_content_table'&gt;&lt;/a&gt;&lt;h3&gt;Content table&lt;/h3&gt;&lt;ul class='xoxo ct_column'&gt;&quot;;
			foreach($titles[1] as $title):

				if($counter &gt;= ceil($max/2)){
					$content_table .= &quot;&lt;/ul&gt;&lt;ul class='xoxo ct_column'&gt;&quot;;
					$counter = 0;
				}
				$counter++;

				$content_table .= '&lt;li&gt;&lt;a href=&quot;#'.slug($title).'&quot;&gt;'.$title.'&lt;/a&gt;&lt;/li&gt;';

			endforeach;
			$content_table .= &quot;&lt;/ul&gt;&lt;/div&gt;&quot;;
		}
		//echo $content_table;
		//replace the shortcode by the content table
		$content = str_replace('&lt;p&gt;'.$m[0].'&lt;/p&gt;', $content_table, $content);

		//add &quot;back to top&quot; links in headers
		$content = preg_replace(&quot;|&lt;&quot;.$in_tag.&quot;&gt;(.*)&lt;/&quot;.$in_tag.&quot;&gt;|e&quot;, &quot;'&lt;'.$in_tag.' name=\&quot;'.slug('$1').'\&quot; id=\&quot;'.slug('$1').'\&quot;&gt;$1&lt;a class=\&quot;backtop\&quot;href=\&quot;#go_content_table\&quot;&gt;Back to top&lt;/a&gt;&lt;/'.$in_tag.'&gt;'&quot;, $content);

	endif;

	return $content;
}

function slug($string)
{
	$slug = trim($string);
	$slug= preg_replace('/[^a-zA-Z0-9 -]/','', $slug); // only take alphanumerical characters, but keep the spaces and dashes too...
	$slug= str_replace(' ','-', $slug); // replace spaces by dashes
	$slug= strtolower($slug); // make it lowercase
	return $slug;
}</code></pre>
<h2 name="so-what-have-we-got-there" id="so-what-have-we-got-there">So, what have we got there.<a class="backtop"href="#go_content_table">Back to top</a></h2>
<pre><code>add_filter('the_content', 'get_content_table');</code></pre>
<p>The function add_filter is a built function in WordPress which link functions to a particular trigger. In this case we use the filter the_content, which is called just before WordPress prints out the content of a post/page. The filter will pass the content of the post/page to each functions hooked to it. Now all we need is work on the content using the function get_content_table we&#8217;ve just hooked.</p>
<h2 name="the-getcontenttable-function" id="the-getcontenttable-function">The get_content_table function.<a class="backtop"href="#go_content_table">Back to top</a></h2>
<pre><code>preg_match('/[content_tables(.*?)]/', $content, $m);
	if($m[0]):</code></pre>
<p>First we need to find out if the content table is requested so we search for the string content_table (parameters) (between []). If we find one then we carry on, if not we just return the content untouched.</p>
<pre><code>$attr = shortcode_parse_atts($m[1]);

$in_tag = $attr['tag'];

preg_match_all('|&lt;'.$in_tag.'&gt;(.*)&lt;/'.$in_tag.'&gt;|', $content, $titles);</code></pre>
<p>If the shortcode is there we need to get which tag needs to be used to build the table. WordPress provides a function to do that in the shortcode api. Once we have the targeted tag we can do a search for it in the content and put the results in an array.</p>
<h2 name="now-the-interesting-stuff" id="now-the-interesting-stuff">Now the interesting stuff:<a class="backtop"href="#go_content_table">Back to top</a></h2>
<pre><code>if($titles[1]){

	$max = count($titles[1]);
	$counter = 0;
	$content_table = &quot;&lt;div id='content_table'&gt;&lt;a name='go_content_table' id='go_content_table'&gt;&lt;/a&gt;&lt;ul class='xoxo ct_column'&gt;&quot;;
	foreach($titles[1] as $title):

		if($counter &gt;= ceil($max/2)){
			$content_table .= &quot;&lt;/ul&gt;&lt;ul class='xoxo ct_column'&gt;&quot;;
			$counter = 0;
		}
		$counter++;

		$content_table .= '&lt;li&gt;&lt;a href=&quot;#'.slug($title).'&quot;&gt;'.$title.'&lt;/a&gt;&lt;/li&gt;';

	endforeach;
	$content_table .= &quot;&lt;/ul&gt;&lt;/div&gt;&quot;;
}</code></pre>
<p>If the right type of titles are present then we start building the  content_table. First we find out how many elements we&#8217;ve got then create a div container to hold everything and start the first unordered list.</p>
<p>When we reach half of the elements we close the first ul and open a new one to create to list. This will help if you want to split the content table in two columns. Note: we have to slug the titles to use them as anchor links and keep the code valid.</p>
<p>The next is to add the back to top link to the existing titles:</p>
<pre><code>$content = preg_replace(&quot;|&lt;&quot;.$in_tag.&quot;&gt;(.*)&lt;/&quot;.$in_tag.&quot;&gt;|e&quot;, &quot;'&lt;'.$in_tag.' name=&quot;'.slug('$1').'&quot; id=&quot;'.slug('$1').'&quot;&gt;$1&lt;a class=&quot;backtop&quot;href=&quot;#go_content_table&quot;&gt;Back to top&lt;/a&gt;&lt;/'.$in_tag.'&gt;'&quot;, $content);</code></pre>
<p>We use the power of regular expressions and callback function to get that sorted. I think this was the trickiest bit of the code.</p>
<p>If you place this code in you function folder and add a the content_table tag=&#8221;X&#8221; (between [], don&#8217;t forget the double quotes around the tag) shortcode (where X is the tag used for your titles) then you should get a nice content table where you have added the shortcode. Add some simple styling and you&#8217;re done!</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Draft, Autumn and Freebies</title>
		<link>http://wordpressthemescollection.com/draft-autumn-and-freebies-339.html</link>
		<comments>http://wordpressthemescollection.com/draft-autumn-and-freebies-339.html#comments</comments>
		<pubDate>Thu, 01 Oct 2009 13:02:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=339</guid>
		<description><![CDATA[This time of the year again, when everything drag slowly to winter. Trees get their new colours and freebies fly all around. Seriously, Freebies. In the past few days the Envato network has been giving away stuff: Free Wood textures on psd tuts+ Free Icon set from Graphic River Free file of the month from [...]]]></description>
			<content:encoded><![CDATA[<p>This time of the year again, when everything drag slowly to winter. Trees get their new colours and freebies fly all around. Seriously, Freebies. In the past few days the Envato network has been giving away stuff:</p>
<p>Free Wood textures on psd tuts+</p>
<p><a href="http://psd.tutsplus.com/freebies/texture/free-high-res-wood-textures/"><img class="alignnone" title="Free wood textures" src="http://psdtuts.s3.amazonaws.com/Freebies/texture/014_wood_textures/wood_texture_preview.jpg" alt="" width="401" height="401" /></a></p>
<p>Free Icon set from Graphic River</p>
<p><a href="http://graphicriver.net/free-icons"><img class="alignnone size-medium wp-image-342" title="freeicons" src="http://wordpressthemescollection.com/wp-content/uploads/2009/10/freeicons-300x269.jpg" alt="freeicons" width="300" height="269" /></a></p>
<p>Free file of the month from ThemeForest</p>
<p><a href="http://blog.themeforest.net/site-news/free-file-of-the-month-october/"><img class="alignnone" title="Free file of the month" src="http://s3.envato.com/files/161598/Screenshots/01_404-Page-Not-Found.__large_preview.jpg" alt="" width="490" height="249" /></a></p>
<p>So enjoy those free stuff and don&#8217;t forget to check the selection of non free but <a href="http://wordpressthemescollection.com">premium WordPress themes</a> we have here.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/draft-autumn-and-freebies-339.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Those themes and plugins that transform WordPress</title>
		<link>http://wordpressthemescollection.com/those-themes-and-plugins-that-transform-wordpress-292.html</link>
		<comments>http://wordpressthemescollection.com/those-themes-and-plugins-that-transform-wordpress-292.html#comments</comments>
		<pubDate>Tue, 15 Sep 2009 18:01:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=292</guid>
		<description><![CDATA[WordPress is a great content management system but some projects require special functionalities that Wp can&#8217;t handle out of the box. The way plugins and themes work make it possible for a programmer to add pretty much anything to WordPress and there are some interesting example out there that are pushing Wp far beyond what [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress is a great content management system but some projects require special functionalities that Wp can&#8217;t handle out of the box. The way plugins and themes work make it possible for a programmer to add pretty much anything to WordPress and there are some interesting example out there that are pushing Wp far beyond what it is designed for originally.</p>
<p>We are concentrating here on two aspects that seem to be the most important in the current trend but feel free to share anything else in the comments.<span id="more-292"></span></p>
<h2>Social Sites</h2>
<h3><a href="http://p2theme.com/">P2 Theme</a></h3>
<p><a href="http://p2theme.com/"><img class="alignnone size-full wp-image-309" title="P2 - Faster Blogging" src="http://wordpressthemescollection.com/wp-content/uploads/2009/09/P2-Faster-Blogging.jpeg" alt="P2 - Faster Blogging" width="520" height="332" /></a></p>
<p>The <a href="http://p2theme.com/">P2 theme</a> is the updated version of one called <a href="http://en.blog.wordpress.com/2008/01/28/introducing-prologue/">Prologue</a>. It has been developed by Automatic, the guys behind WordPress and some other great stuff. What the theme does is transform you blog into a Twitter like platform. It&#8217;s almost better than Twitter as new posts are updated automatically using Ajax. It is particularly suited for company who need a internal messaging app where employees can share links and have small discussions. Matt Mullenweg explains on his blog <a href="http://ma.tt/2009/05/how-p2-changed-automattic/">how P2 changed Automatic</a>.</p>
<h3><a href="http://mu.wordpress.org/">WordPress Mu</a></h3>
<p><a href="http://mu.wordpress.org/"><img class="alignnone size-full wp-image-312" title="WordPress MU › Blog Tool and Publishing Platform" src="http://wordpressthemescollection.com/wp-content/uploads/2009/09/WordPress-MU-›-Blog-Tool-and-Publishing-Platform.jpeg" alt="WordPress MU › Blog Tool and Publishing Platform" width="520" height="328" /></a></p>
<p>WordPress Mu is not actually a plugin or a theme but a set of modified core files that allow you to set up your own WordPress.com like site. Being able to create an infinity of blogs with one install is pretty amazing. And seeing how good it runs on WordPress.com it seems to be scalable as hell. You download Wp Mu like you would download WordPress and the install is pretty much the same but you will need some server configuration knowledge if you want to make the most of it.</p>
<h3><a href="http://buddypress.org/">BuddyPress</a></h3>
<p><a href="http://buddypress.org/"><img class="alignnone size-full wp-image-311" title="Test Drive BuddyPress — Home" src="http://wordpressthemescollection.com/wp-content/uploads/2009/09/Test-Drive-BuddyPress-—-Home.jpeg" alt="Test Drive BuddyPress — Home" width="520" height="332" /></a></p>
<p>BuddyPress is a Wp Mu plugin that will transform you mu install into a fully featured social platform very similar to Facebook. Friends, groups, Status, profile and blog, it&#8217;s all there to start your own social site. And of course it has the flexibility and styling possibilities of WordPress.</p>
<h3><a href="http://www.woothemes.com/amember/go.php?r=272&amp;i=l18">Wootube</a></h3>
<p><a href="http://www.woothemes.com/amember/go.php?r=272&amp;i=l18"><img class="alignnone size-full wp-image-308" title="Get ready for impact! - WooTube" src="http://wordpressthemescollection.com/wp-content/uploads/2009/09/Get-ready-for-impact - WooTube.jpeg" alt="Get ready for impact! - WooTube" width="520" height="332" /></a></p>
<p>Wootube is a premium WordPress theme from WooThemes that will help you create you own Youtube like site. The styling is clean and uses the famous WooThemes framework to give you the flexibility you need.</p>
<h2>E-commerce / Affiliate</h2>
<h3>E-commerce themes</h3>
<p><a href="http://themeforest.net/item/wpshop-reloaded-wordpress-ecommerce/53051?ref=benben">wpShop Reloaded</a></p>
<p><a href="http://themeforest.net/item/wpshop-reloaded-wordpress-ecommerce/53051?ref=benben"><img class="alignnone size-full wp-image-313" title="WPShop-Reloaded - A WordPress eCommerce Theme" src="http://wordpressthemescollection.com/wp-content/uploads/2009/09/WPShop-Reloaded-A-WordPress-eCommerce-Theme.jpeg" alt="WPShop-Reloaded - A WordPress eCommerce Theme" width="520" height="328" /></a></p>
<p><a href="http://themeforest.net/item/egoods/26764?ref=benben">eGoods</a></p>
<p><a href="http://themeforest.net/item/egoods/26764?ref=benben"><img class="alignnone size-full wp-image-307" title="eGoods" src="http://wordpressthemescollection.com/wp-content/uploads/2009/09/eGoods.jpeg" alt="eGoods" width="520" height="332" /></a></p>
<p>Those two themes from ThemeForest are premium themes that will turn your WordPress install in a shopping cart. If you already have a WordPress powered site and want some basic e-commerce functionalities then this should be ideal. Of course theydon&#8217;t stack up against the likes of Magento and Prestashop but if you just need to sell a few things they are perfect. wpshop-reloaded $35 for single use. eGoods $30 for single use.</p>
<p><a href="http://themeforest.net/item/product-affiliator/34997?ref=benben">Product Affiliator</a></p>
<p><a href="http://themeforest.net/item/product-affiliator/34997?ref=benben"><img class="alignnone size-full wp-image-310" title="ProductAffiliator" src="http://wordpressthemescollection.com/wp-content/uploads/2009/09/ProductAffiliator.jpeg" alt="ProductAffiliator" width="520" height="332" /></a></p>
<p>The Product Affiliator theme from ThemeForest again is will help you sell affiliate product. So it is in a way like the two themes above but here you don&#8217;t deal with payements and cart. Product Affiliator $25 for single use.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/those-themes-and-plugins-that-transform-wordpress-292.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Minimalist designs in WordPress and good themes to get started</title>
		<link>http://wordpressthemescollection.com/minimalist-designs-in-wordpress-and-good-themes-to-get-started-240.html</link>
		<comments>http://wordpressthemescollection.com/minimalist-designs-in-wordpress-and-good-themes-to-get-started-240.html#comments</comments>
		<pubDate>Wed, 26 Aug 2009 10:21:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=240</guid>
		<description><![CDATA[Minimalist is maybe not what comes to mind when someone start designing a new website. In our post-web2.0 era everyone wants more fancy and flashy sites. Less is often better and that&#8217;s something we designers seem to forget to satisfy our lust for intricate designs. Detail is what makes a good design, and minimal is [...]]]></description>
			<content:encoded><![CDATA[<p>Minimalist is maybe not what comes to mind when someone start designing a new website. In our post-web2.0 era everyone wants more fancy and flashy sites.</p>
<p>Less is often better and that&#8217;s something we designers seem to forget to satisfy our lust for intricate designs. Detail is what makes a good design, and minimal is all about that. Minimal is fresh, often very usable and doesn&#8217;t blow your mind up with things to concentrate on.<span id="more-240"></span></p>
<p>We&#8217;ve done a small selection of nice minimalist WordPress sites and a few minimal themes to quick start your next project.</p>
<p><a href="http://www.hellomay.com/blog/"><img class="alignnone size-full wp-image-259" title="the May Blog" src="http://wordpressthemescollection.com/wp-content/uploads/2009/08/the-May-Blog.jpeg" alt="the May Blog" width="520" height="354" /></a></p>
<p><a href="http://rogierbikker.com/"><img class="alignnone size-full wp-image-257" title="Rogier Bikker" src="http://wordpressthemescollection.com/wp-content/uploads/2009/08/Rogier-Bikker.jpeg" alt="Rogier Bikker" width="520" height="354" /></a></p>
<p><a href="http://www.raymondselda.com/"><img class="alignnone size-full wp-image-256" title="Philippines Web Design - Freelance Web Designer in Manila, Philippines - Raymond Selda" src="http://wordpressthemescollection.com/wp-content/uploads/2009/08/Philippines-Web-Design-Freelance-Web-Designer-in-Manila-Philippines-Raymond-Selda.jpeg" alt="Philippines Web Design - Freelance Web Designer in Manila, Philippines - Raymond Selda" width="520" height="354" /></a></p>
<p><a href="http://informationarchitects.jp/"><img class="alignnone size-full wp-image-255" title="Information Architects" src="http://wordpressthemescollection.com/wp-content/uploads/2009/08/Information-Architects.jpeg" alt="Information Architects" width="520" height="354" /></a></p>
<p><a href="http://www.welcometohr.com/"><img class="alignnone size-full wp-image-254" title="Human Resources™" src="http://wordpressthemescollection.com/wp-content/uploads/2009/08/Human-Resources™.jpeg" alt="Human Resources™" width="520" height="354" /></a></p>
<p><a href="http://www.kevingwong.com/"><img class="alignnone size-full wp-image-253" title="Home page of photo portfolio website of Kevin G. Wong" src="http://wordpressthemescollection.com/wp-content/uploads/2009/08/Home-page-of-photo-portfolio-website-of-Kevin-G.-Wong.jpeg" alt="Home page of photo portfolio website of Kevin G. Wong" width="520" height="354" /></a></p>
<p><a href="http://www.heartworker.com/"><img class="alignnone size-full wp-image-252" title="Heartworker" src="http://wordpressthemescollection.com/wp-content/uploads/2009/08/Heartworker.jpeg" alt="Heartworker" width="520" height="354" /></a></p>
<p><a href="http://astheria.com/"><img class="alignnone size-full wp-image-251" title="Astheria" src="http://wordpressthemescollection.com/wp-content/uploads/2009/08/Astheria.jpeg" alt="Astheria" width="520" height="354" /></a></p>
<p><a href="http://www.thegridsystem.org/"><img class="alignnone size-full wp-image-260" title="The Grid System" src="http://wordpressthemescollection.com/wp-content/uploads/2009/08/The-Grid-System.jpeg" alt="The Grid System" width="520" height="354" /></a></p>
<p><a href="http://www.hellomuller.com/blog/"><img title="Muller — News &amp; Blog" src="../wp-content/uploads/2009/08/Muller-%E2%80%94-News-Blog.jpeg" alt="Muller — News &amp; Blog" width="520" height="354" /></a></p>
<h2>Some themes to get you started</h2>
<p>Minimo is a simple and attractive one page portfolio showcase theme, $10 for single use (<a href="http://themeforest.net/item/minimo-a-minimal-one-page-portfolio-theme/full_screen_preview/49798?ref=benben">demo</a>)</p>
<p><a href="http://themeforest.net/item/minimo-a-minimal-one-page-portfolio-theme/49798?ref=benben"><img class="alignnone size-full wp-image-267" title="Minimo -A Minimalistic Portfolio Theme by Pixelcraft" src="http://wordpressthemescollection.com/wp-content/uploads/2009/08/Minimo-A-Minimalistic-Portfolio-Theme-by-Pixelcraft.jpeg" alt="Minimo -A Minimalistic Portfolio Theme by Pixelcraft" width="520" height="354" /></a></p>
<p>Minimal WordPress Template, $25 for single use (<a href="http://themeforest.net/item/minimal-wordpress-portfolio/full_screen_preview/54184?ref=benben">demo</a>)</p>
<p><a href="http://themeforest.net/item/minimal-wordpress-portfolio/54184?ref=benben"><img class="alignnone size-full wp-image-268" title="minimal." src="http://wordpressthemescollection.com/wp-content/uploads/2009/08/minimal..jpeg" alt="minimal." width="520" height="354" /></a></p>
<p>Apricot, a nice free WordPress themes. Might need some adjustement to make the most of the latest versions of wordpress but it is a good start.</p>
<p><a href="http://www.ardamis.com/2007/06/03/apricot/"><img title="apricot_500" src="../wp-content/uploads/2009/08/apricot_500.png" alt="apricot_500" width="500" height="1083" /></a></p>
<p>Press from Obox. Premium template, single use cost $50 but the theme is awesome</p>
<p><a href="http://www.obox-design.com/themes_page.cfm/theme/press"><img class="alignnone size-full wp-image-265" title="120820092021_index" src="http://wordpressthemescollection.com/wp-content/uploads/2009/08/120820092021_index.jpg" alt="120820092021_index" width="520" height="468" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/minimalist-designs-in-wordpress-and-good-themes-to-get-started-240.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Envato&#8217;s Birthday, giveaways and cheap stuff</title>
		<link>http://wordpressthemescollection.com/envatos-birthday-giveaways-and-cheap-stuff-213.html</link>
		<comments>http://wordpressthemescollection.com/envatos-birthday-giveaways-and-cheap-stuff-213.html#comments</comments>
		<pubDate>Tue, 18 Aug 2009 13:03:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=213</guid>
		<description><![CDATA[The Envato network celebrates its 3 years of operation this week and Collis promised us exiting stuff to share and giveaway. The most interesting for us is of course the market place bundle, $300 worth of files for $20!! Files will be selected from all over the market place and sold in a Bundle for [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://themeforest.net/item/the-birthday-bundle-2009/54759?ref=benben"><img class="alignnone" title="Envatos biorthday" src="http://envato.s3.amazonaws.com/Birthday2009/01_Marketplaces.jpg" alt="" width="485" height="242" /></a></p>
<p>The Envato network celebrates its 3 years of operation this week and Collis promised us exiting stuff to share and giveaway.</p>
<p>The most interesting for us is of course the market place bundle, $300 worth of files for $20!! Files will be selected from all over the market place and sold in a Bundle for 3 days only during this week. So be ready to jump, the link is right here: <a href="http://themeforest.net/item/the-birthday-bundle-2009/54759?ref=benben">Envato&#8217;s market place bundle</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/envatos-birthday-giveaways-and-cheap-stuff-213.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The (almost) ultimate members page in WordPress</title>
		<link>http://wordpressthemescollection.com/the-almost-ultimate-members-page-in-wordpress-182.html</link>
		<comments>http://wordpressthemescollection.com/the-almost-ultimate-members-page-in-wordpress-182.html#comments</comments>
		<pubDate>Mon, 17 Aug 2009 14:56:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=182</guid>
		<description><![CDATA[One of the core feature of WordPress has always been to allow people to easily register on your blog. You can use this function to filter who can comment on your posts for example or to allow other people to submit articles to your blog. But so far there is nothing that allow you to [...]]]></description>
			<content:encoded><![CDATA[<p>One of the core feature of WordPress has always been to allow people to easily register on your blog. You can use this function to filter who can comment on your posts for example or to allow other people to submit articles to your blog.</p>
<p>But so far there is nothing that allow you to restrict access to a part of your blog to registered members, apart from the password you can add on a single post/page.<span id="more-182"></span></p>
<p>Some solutions have been suggested in the past and we are trying here to compile the best of those to make the ultimate members page.</p>
<p>The brief:</p>
<ul>
<li>Content shouldn&#8217;t be accessible from non logged users.</li>
<li>Provide an easy way to login, without going to the default WordPress backend</li>
<li>Allow people to post articles to be reviewed</li>
<li>Protect Rss feed, archives, index, etc from displaying restricted posts</li>
<li>Allow admin to use subcategories on the Members posts</li>
</ul>
<p>Limitations:</p>
<ul>
<li>Users won&#8217;t be able to set the category of their post themselves, which in a way is a good thing. Each submitted post will go to the default &#8216;Members&#8217; category. The admin can then add subcategories if needed.</li>
<li>You need a category.php file in your theme, might change in the future though</li>
</ul>
<p>The code will pretty much all go in the function.php file as a php class. We are gonna use WordPress categories here, no page with custom template. That&#8217;s the way we started it but it seems more flexible using the default categorisation rather than a custom page template, especially for sub-categories.</p>
<p>This tutorial is for people with some knowledge in php. You might pull it off by raw copy-paste but it&#8217;s always better to understand what you are doing in case something goes wrong. And as usual do this at your how risks, it worked for us on test sites, but you never know&#8230;backup backup backup!</p>
<h2>The files</h2>
<p>For the lazy here is everything you need in two files: one to include in your function.php and the category.php template you need: <a href="http://wordpressthemescollection.com/wp-content/uploads/2009/08/members.zip">members.zip</a></p>
<p>So should we get started?</p>
<h2>Category exclusion</h2>
<p>This tutorial is based on the fact that your members only category is called &#8216;Members&#8217;. If you want to change the name to something else you will have to make sure every reference to &#8216;members&#8217; as the category is changed.</p>
<p>This is the function that will hide the members category from archives, general Rss feed, index. It also redirects someone not logged and trying to access the members rss to the Members category page with the log in form. We have a small issue here but we&#8217;ll talk about it later.</p>
<pre><code>/*
* Exclude members and sub members categories from feed, index, archives, etc...
*/
function exclude_category($query) {

	if($query-&gt;is_feed &amp;&amp; !is_user_logged_in() &amp;&amp; ($query-&gt;in_category == 'members' || $this-&gt;post_is_in_descendant_category($this-&gt;members_id))){
		header(&quot;HTTP/1.0 403 forbidden&quot;); 
		header('Location: '.get_category_link($this-&gt;members_id));
		exit;
	}

	if (!$query-&gt;is_admin &amp;&amp; !$query-&gt;in_category == 'members' &amp;&amp; !$this-&gt;post_is_in_descendant_category($this-&gt;members_id)){
		$query-&gt;set('cat', '-'.$this-&gt;members_id);
	}
	return $query;
}</code></pre>
<p>This is a quick function that will find out if a post&#8217;s assigned categories are descendants of target categories.</p>
<pre><code>/**
 * Tests if any of a post's assigned categories are descendants of target categories
 * From wordpress codex http://codex.wordpress.org/Function_Reference/in_category
 *
 * @param mixed $cats The target categories. Integer ID or array of integer IDs
 * @param mixed $_post The post
 * @return bool True if at least 1 of the post's categories is a descendant of any of the target categories
 * @see get_term_by() You can get a category by name or slug, then pass ID to this function
 * @uses get_term_children() Gets descendants of target category
 * @uses in_category() Tests against descendant categories
 * @version 2.7
 */
function post_is_in_descendant_category( $cats, $_post = null )
{
	foreach ( (array) $cats as $cat ) {
		// get_term_children() accepts integer ID only
		$descendants = get_term_children( (int) $cat, 'category');
		if ( $descendants &amp;&amp; in_category( $descendants, $_post ) )
			return true;
	}
	return false;
}</code></pre>
<h2>Members category template</h2>
<p>Next we need this special template for the members category. The template will go into an other function in our class and this function will be called in the category.php file.</p>
<pre><code>/* 
 * Print out the template to use in members categories
 * Login form that redirect to same page
 * Post editor for members to post a new entry
 * Display of latest members posts
 */
function get_members_template(){ 
	//you don't want anyone to be able to send you some random post requests do you?
	if(is_user_logged_in()){
		//if a post is submitted, check it and create a new post in the databse if ok
		if($_POST['submit']){

			$submit = 1;

			if($_POST['title'] == ''){
				$error .= '&lt;li&gt;Please type in a title for your article&lt;/li&gt;';
			}
			if($_POST['content'] == ''){
				$error .= '&lt;li&gt;Please type in the content of you article&lt;/li&gt;';
			}

			if($error == ''){

				$your_post_title = $_POST['title'];
				$your_post_content = $_POST['content'];
				// Create post object
				$my_post = array();
				$my_post['post_title'] = $your_post_title;
				$my_post['post_content'] = $your_post_content;
				$my_post['post_status'] = 'pending';
				$my_post['post_author'] = $user_ID;
				$my_post['post_category'] = array(get_cat_id('members'));
				$my_post['post_type'] = 'post';

				// Insert the post into the database
				$postId = wp_insert_post($my_post);

				if(!empty($postId) &amp;&amp; $postId != 0)
				{
					$message .= &quot;&lt;li&gt;The article has been submited and will go live in the next 48hrs if approved&lt;/li&gt;&quot;;
					$your_post_title = '';
					$your_post_content = '';
				}
				else $error .= &quot;An error occured with your post&quot;;
			}
		}
	}
	?&gt;

	&lt;h2 class=&quot;pagetitle&quot;&gt;Archive for the &amp;#8216;&lt;?php single_cat_title(); ?&gt;&amp;#8217; Category&lt;/h2&gt;

	&lt;?php 
	/*
	 * If user not logged in display login form
	*/
	if(!is_user_logged_in()): ?&gt;

		&lt;h3&gt;Members access only&lt;/h3&gt;
		&lt;p&gt;
			The content of this page is reserved to members of the website only.
		&lt;/p&gt;
		&lt;form action=&quot;&lt;?php echo wp_login_url($_SERVER['REQUEST_URI']); ?&gt;&quot; method=&quot;post&quot; id=&quot;memberslogin&quot;&gt;

			&lt;h3&gt;Are you a member?&lt;/h3&gt;

			&lt;p&gt;If you are a member, please use the form below to login&lt;/p&gt;

			&lt;ol&gt;
				&lt;li class=&quot;inline&quot;&gt;&lt;label for=&quot;log&quot;&gt;Username&lt;/label&gt;&lt;input type=&quot;text&quot; name=&quot;log&quot; id=&quot;log&quot; value=&quot;&lt;?php echo wp_specialchars(stripslashes($user_login), 1) ?&gt;&quot; size=&quot;22&quot; /&gt;&lt;/li&gt;
				&lt;li class=&quot;inline&quot;&gt;&lt;label for=&quot;pwd&quot;&gt;Password&lt;/label&gt;&lt;input type=&quot;password&quot; name=&quot;pwd&quot; id=&quot;pwd&quot; size=&quot;22&quot; /&gt;&lt;/li&gt;
				&lt;li&gt;&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Send&quot; class=&quot;button&quot; /&gt;&lt;label for=&quot;rememberme&quot;&gt;&lt;input name=&quot;rememberme&quot; id=&quot;rememberme&quot; type=&quot;checkbox&quot; checked=&quot;checked&quot; value=&quot;forever&quot; /&gt; Remember me&lt;/label&gt;&lt;/li&gt;
			&lt;/ol&gt;
		&lt;/form&gt;
	&lt;?php

	else:

	?&gt;
		&lt;div class=&quot;adminaccess&quot;&gt;
			&lt;a href=&quot;javascript:;&quot; id=&quot;open-members-form&quot;&gt;Submit an article &amp;raquo;&lt;/a&gt;
			&lt;?php //first display the form to add a new post ?&gt;
			&lt;form id=&quot;members-post&quot; action=&quot;&quot; method=&quot;post&quot; class=&quot;&lt;?php if($submit) echo 'open'; ?&gt;&quot;&gt;
				&lt;?php if($error != ''): ?&gt;
					&lt;ul class=&quot;error&quot;&gt;
						&lt;?php echo $error; ?&gt;
					&lt;/ul&gt;
				&lt;?php endif; ?&gt;
				&lt;?php if($message != ''): ?&gt;
					&lt;ul class=&quot;success&quot;&gt;
						&lt;?php echo $message; ?&gt;
					&lt;/ul&gt;
				&lt;?php endif; ?&gt;
				&lt;div id=&quot;form-section-author&quot; class=&quot;form-section&quot;&gt;
					&lt;div class=&quot;form-label&quot;&gt;&lt;label for=&quot;title&quot;&gt;Article title&lt;/label&gt; &lt;em&gt;*&lt;/em&gt;&lt;/div&gt;
					&lt;div class=&quot;form-input&quot;&gt;&lt;input id=&quot;title&quot; name=&quot;title&quot; type=&quot;text&quot; value=&quot;&lt;?php echo $your_post_title ?&gt;&quot; size=&quot;40&quot; tabindex=&quot;3&quot; /&gt;&lt;/div&gt;
				&lt;/div&gt;&lt;!-- #form-section-author .form-section --&gt;

				&lt;div id=&quot;form-section-comment&quot; class=&quot;form-section&quot;&gt;
					&lt;div class=&quot;form-label&quot;&gt;&lt;label for=&quot;Content&quot;&gt;Article content&lt;/label&gt; &lt;em&gt;*&lt;/em&gt;&lt;/div&gt;
					&lt;div class=&quot;form-textarea&quot;&gt;&lt;textarea id=&quot;content-area&quot; name=&quot;content&quot; cols=&quot;65&quot; rows=&quot;12&quot; tabindex=&quot;6&quot;&gt;&lt;?php echo $your_post_content ?&gt;&lt;/textarea&gt;&lt;/div&gt;
				&lt;/div&gt;&lt;!-- #form-section-comment .form-section --&gt;
				&lt;p&gt;&lt;em&gt;*&lt;/em&gt; required fields&lt;/p&gt;
				&lt;div class=&quot;form-submit&quot;&gt;&lt;input id=&quot;submit&quot; name=&quot;submit&quot; type=&quot;submit&quot; value=&quot;&lt;?php _e('Submit your article for review', 'thematic') ?&gt;&quot; /&gt;&lt;/div&gt;
			&lt;/form&gt;
			&lt;a href=&quot;&lt;?php echo wp_logout_url(get_bloginfo('url')) ?&gt;&quot;&gt;Logout&lt;/a&gt;
		&lt;/div&gt;
		
		&lt;div class=&quot;navigation&quot;&gt;
			&lt;div class=&quot;alignleft&quot;&gt;&lt;?php next_posts_link('&amp;laquo; Older Entries') ?&gt;&lt;/div&gt;
			&lt;div class=&quot;alignright&quot;&gt;&lt;?php previous_posts_link('Newer Entries &amp;raquo;') ?&gt;&lt;/div&gt;
		&lt;/div&gt;
		
		&lt;?php 

		//Then display the latest post for the current category
		while ( have_posts() ) : the_post() ?&gt;

			&lt;div class=&quot;hentry&quot;&gt;
				&lt;h2&gt;&lt;?php the_title() ?&gt;&lt;/h2&gt;
				&lt;div class=&quot;entry-content&quot;&gt;
					&lt;?php the_content('read more'); ?&gt;
					&lt;span class=&quot;meta-prep meta-prep-author&quot;&gt;By&lt;/span&gt;
					&lt;span class=&quot;author vcard&quot;&gt;
						&lt;a class=&quot;url fn n&quot; href=&quot;'&lt;?php get_author_link(false, $authordata-&gt;ID, $authordata-&gt;user_nicename)?&gt;&quot; title=&quot;View all posts by &lt;?php echo get_the_author() ?&gt; &quot;&gt;
							&lt;?php echo get_the_author(); ?&gt;
						&lt;/a&gt;
					&lt;/span&gt;
				&lt;/div&gt;
			&lt;/div&gt;&lt;!-- .post --&gt;

		&lt;?php endwhile; ?&gt;
		
		&lt;div class=&quot;navigation&quot;&gt;
			&lt;div class=&quot;alignleft&quot;&gt;&lt;?php next_posts_link('&amp;laquo; Older Entries') ?&gt;&lt;/div&gt;
			&lt;div class=&quot;alignright&quot;&gt;&lt;?php previous_posts_link('Newer Entries &amp;raquo;') ?&gt;&lt;/div&gt;
		&lt;/div&gt;
		
		

	&lt;?php endif;
}</code></pre>
<p>The comments should hopefully be enough to let you understand what is happening. Basically if someone not logged in he will see the login form, if he is he will see a post submission form, a logout button and the latest post in the category.</p>
<h2>Category.php file</h2>
<p>Now we need to change the category.php file to call this function if we are in the right category:</p>
<pre><code>&lt;?php get_header(); ?&gt;

&lt;div id=&quot;content&quot;&gt;
	&lt;?php //if in the members category, call the template ?&gt;
	&lt;?php if(in_category('members') || $members_object-&gt;post_is_in_descendant_category($members_object-&gt;members_id)): ?&gt;
		
		&lt;?php $members_object-&gt;get_members_template(); ?&gt;
	&lt;?php //else do normal stuff ?&gt;
	&lt;?php else: ?&gt;
		
		&lt;h2 class=&quot;pagetitle&quot;&gt;Archive for the &amp;#8216;&lt;?php single_cat_title(); ?&gt;&amp;#8217; Category&lt;/h2&gt;
		
		&lt;?php if (have_posts()) : ?&gt;
		
			&lt;div class=&quot;navigation&quot;&gt;
				&lt;div class=&quot;alignleft&quot;&gt;&lt;?php next_posts_link('&amp;laquo; Older Entries') ?&gt;&lt;/div&gt;
				&lt;div class=&quot;alignright&quot;&gt;&lt;?php previous_posts_link('Newer Entries &amp;raquo;') ?&gt;&lt;/div&gt;
			&lt;/div&gt;

			&lt;?php while (have_posts()) : the_post(); ?&gt;
				&lt;div &lt;?php post_class() ?&gt;&gt;
					&lt;h3 id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &lt;?php the_title_attribute(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt;
					&lt;small&gt;&lt;?php the_time('l, F jS, Y') ?&gt;&lt;/small&gt;

					&lt;div class=&quot;entry&quot;&gt;
						&lt;?php the_content() ?&gt;
					&lt;/div&gt;

					&lt;p class=&quot;postmetadata&quot;&gt;&lt;?php the_tags('Tags: ', ', ', '&lt;br /&gt;'); ?&gt; Posted in &lt;?php the_category(', ') ?&gt; | &lt;?php edit_post_link('Edit', '', ' | '); ?&gt;  &lt;?php comments_popup_link('No Comments &amp;#187;', '1 Comment &amp;#187;', '% Comments &amp;#187;'); ?&gt;&lt;/p&gt;

				&lt;/div&gt;

			&lt;?php endwhile; ?&gt;

			&lt;div class=&quot;navigation&quot;&gt;
				&lt;div class=&quot;alignleft&quot;&gt;&lt;?php next_posts_link('&amp;laquo; Older Entries') ?&gt;&lt;/div&gt;
				&lt;div class=&quot;alignright&quot;&gt;&lt;?php previous_posts_link('Newer Entries &amp;raquo;') ?&gt;&lt;/div&gt;
			&lt;/div&gt;
			
		&lt;?php else :
			printf(&quot;&lt;h2 class='center'&gt;Sorry, but there aren't any posts in the %s category yet.&lt;/h2&gt;&quot;, single_cat_title('',false));
		endif; ?&gt;
		
	&lt;?php endif; ?&gt;
&lt;/div&gt;
&lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;</code></pre>
<h2>Add tinyMCE</h2>
<p>Just a quick cosmetic fix on the textarea in the form. Adding some style capabilities will make it easier for users to structure their posts.</p>
<pre><code>

//add tinymce to members page to build a more friendly post editor
function addtinymce() {

	if(in_category('members')){ ?&gt;
		&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;&lt;?php echo get_bloginfo('url') ?&gt;/wp-includes/js/tinymce/tiny_mce.js&quot;&gt;&lt;/script&gt;
		&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;
			tinyMCE.init({
							mode : &quot;none&quot;,
							theme : &quot;advanced&quot;,
							theme_advanced_buttons1 : &quot;bold,italic,strikethrough|,|,bullist,numlist,outdent,indent,|,link,unlink,|,formatselect&quot;,
							theme_advanced_buttons2 : &quot;&quot;,
							theme_advanced_buttons3 : &quot;&quot;,
							language : &quot;en&quot;,
							theme_advanced_toolbar_location : &quot;top&quot;,
							remove_linebreaks:&quot;1&quot;,
							paste_auto_cleanup_on_paste : true,
							theme_advanced_blockformats : &quot;Text=, Title 1=h3, Title 2=h4, Title 3=h5, Title 4=h6,Quote=blockquote&quot;,
							theme_advanced_toolbar_align : &quot;left&quot;});
		tinyMCE.execCommand(&quot;mceAddControl&quot;, true, &quot;content-area&quot;);
		&lt;/script&gt;
		
	&lt;?php
	}
}</code></pre>
<h2>All in all</h2>
<p>Now we have all our function we need to wrap them up in an object and hook them in the different places. So the full code, without the category.php modification of course, looks like this:</p>
<pre><code>
class Members_Section{

	var $members_id;

	function Members_Section(){
		add_filter('wp_footer', array($this,'addtinymce')); //hook the tinymce functions to the footer
		add_filter('pre_get_posts', array($this, 'exclude_category')); //hook the exclude category function
		$this-&gt;members_id = get_cat_id('members'); //get the id of the members page once and for all
	}

	//add tinymce to members page to build a more friendly post editor
	function addtinymce() {

		if(in_category('members')){ ?&gt;
			&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;&lt;?php echo get_bloginfo('url') ?&gt;/wp-includes/js/tinymce/tiny_mce.js&quot;&gt;&lt;/script&gt;
			&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;
				tinyMCE.init({
								mode : &quot;none&quot;,
								theme : &quot;advanced&quot;,
								theme_advanced_buttons1 : &quot;bold,italic,strikethrough|,|,bullist,numlist,outdent,indent,|,link,unlink,|,formatselect&quot;,
								theme_advanced_buttons2 : &quot;&quot;,
								theme_advanced_buttons3 : &quot;&quot;,
								language : &quot;en&quot;,
								theme_advanced_toolbar_location : &quot;top&quot;,
								remove_linebreaks:&quot;1&quot;,
								paste_auto_cleanup_on_paste : true,
								theme_advanced_blockformats : &quot;Text=, Title 1=h3, Title 2=h4, Title 3=h5, Title 4=h6,Quote=blockquote&quot;,
								theme_advanced_toolbar_align : &quot;left&quot;});
			tinyMCE.execCommand(&quot;mceAddControl&quot;, true, &quot;content-area&quot;);
			&lt;/script&gt;
			
		&lt;?php
		}
	}

	/*
	 * Exclude members and sub members categories from feed, index, archives, etc...
	*/
	function exclude_category($query) {

		if($query-&gt;is_feed &amp;&amp; !is_user_logged_in() &amp;&amp; ($query-&gt;in_category == 'members' || $this-&gt;post_is_in_descendant_category($this-&gt;members_id))){
			header(&quot;HTTP/1.0 403 forbidden&quot;); 
			header('Location: '.get_category_link($this-&gt;members_id));
			exit;
		}
	
		if (!$query-&gt;is_admin &amp;&amp; !$query-&gt;in_category == 'members' &amp;&amp; !$this-&gt;post_is_in_descendant_category($this-&gt;members_id)){
			$query-&gt;set('cat', '-'.$this-&gt;members_id);
		}
		return $query;
	}

	/**
	 * Tests if any of a post's assigned categories are descendants of target categories
	 * From wordpress codex http://codex.wordpress.org/Function_Reference/in_category
	 *
	 * @param mixed $cats The target categories. Integer ID or array of integer IDs
	 * @param mixed $_post The post
	 * @return bool True if at least 1 of the post's categories is a descendant of any of the target categories
	 * @see get_term_by() You can get a category by name or slug, then pass ID to this function
	 * @uses get_term_children() Gets descendants of target category
	 * @uses in_category() Tests against descendant categories
	 * @version 2.7
	 */
	function post_is_in_descendant_category( $cats, $_post = null )
	{
		foreach ( (array) $cats as $cat ) {
			// get_term_children() accepts integer ID only
			$descendants = get_term_children( (int) $cat, 'category');
			if ( $descendants &amp;&amp; in_category( $descendants, $_post ) )
				return true;
		}
		return false;
	}
	
	
	/* 
	 * Print out the template to use in members categories
	 * Login form that redirect to same page
	 * Post editor for members to post a new entry
	 * Display of latest members posts
	 */
	function get_members_template(){ 
		//you don't want anyone to be able to send you some random post requests do you?
		if(is_user_logged_in()){

			if($_POST['submit']){

				$submit = 1;

				if($_POST['title'] == ''){
					$error .= '&lt;li&gt;Please type in a title for your article&lt;/li&gt;';
				}
				if($_POST['content'] == ''){
					$error .= '&lt;li&gt;Please type in the content of you article&lt;/li&gt;';
				}

				if($error == ''){

					$your_post_title = $_POST['title'];
					$your_post_content = $_POST['content'];
					// Create post object
					$my_post = array();
					$my_post['post_title'] = $your_post_title;
					$my_post['post_content'] = $your_post_content;
					$my_post['post_status'] = 'pending';
					$my_post['post_author'] = $user_ID;
					$my_post['post_category'] = array(get_cat_id('members'));
					$my_post['post_type'] = 'post';
					// Insert the post into the database
					$postId = wp_insert_post($my_post);

					if(!empty($postId) &amp;&amp; $postId != 0)
					{
						$message .= &quot;&lt;li&gt;The article has been submited and will go live in the next 48hrs if approved&lt;/li&gt;&quot;;
						$your_post_title = '';
						$your_post_content = '';
					}
					else $error .= &quot;An error occured with your post&quot;;
				}
			}
		}
		?&gt;

		&lt;h2 class=&quot;pagetitle&quot;&gt;Archive for the &amp;#8216;&lt;?php single_cat_title(); ?&gt;&amp;#8217; Category&lt;/h2&gt;

		&lt;?php 
		/*
		 * If user not logged in display login form
		*/
		if(!is_user_logged_in()): ?&gt;

			&lt;h3&gt;Members access only&lt;/h3&gt;
			&lt;p&gt;
				The content of this page is reserved to members of the website only.
			&lt;/p&gt;
			&lt;form action=&quot;&lt;?php echo wp_login_url($_SERVER['REQUEST_URI']); ?&gt;&quot; method=&quot;post&quot; id=&quot;memberslogin&quot;&gt;

				&lt;h3&gt;Are you a member?&lt;/h3&gt;

				&lt;p&gt;If you are a member, please use the form below to login&lt;/p&gt;

				&lt;ol&gt;
					&lt;li class=&quot;inline&quot;&gt;&lt;label for=&quot;log&quot;&gt;Username&lt;/label&gt;&lt;input type=&quot;text&quot; name=&quot;log&quot; id=&quot;log&quot; value=&quot;&lt;?php echo wp_specialchars(stripslashes($user_login), 1) ?&gt;&quot; size=&quot;22&quot; /&gt;&lt;/li&gt;
					&lt;li class=&quot;inline&quot;&gt;&lt;label for=&quot;pwd&quot;&gt;Password&lt;/label&gt;&lt;input type=&quot;password&quot; name=&quot;pwd&quot; id=&quot;pwd&quot; size=&quot;22&quot; /&gt;&lt;/li&gt;
					&lt;li&gt;&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Send&quot; class=&quot;button&quot; /&gt;&lt;label for=&quot;rememberme&quot;&gt;&lt;input name=&quot;rememberme&quot; id=&quot;rememberme&quot; type=&quot;checkbox&quot; checked=&quot;checked&quot; value=&quot;forever&quot; /&gt; Remember me&lt;/label&gt;&lt;/li&gt;
				&lt;/ol&gt;
			&lt;/form&gt;
		&lt;?php

		else:

		?&gt;
			&lt;div class=&quot;adminaccess&quot;&gt;
				&lt;a href=&quot;javascript:;&quot; id=&quot;open-members-form&quot;&gt;Submit an article &amp;raquo;&lt;/a&gt;
				&lt;form id=&quot;members-post&quot; action=&quot;&quot; method=&quot;post&quot; class=&quot;&lt;?php if($submit) echo 'open'; ?&gt;&quot;&gt;
					&lt;?php if($error != ''): ?&gt;
						&lt;ul class=&quot;error&quot;&gt;
							&lt;?php echo $error; ?&gt;
						&lt;/ul&gt;
					&lt;?php endif; ?&gt;
					&lt;?php if($message != ''): ?&gt;
						&lt;ul class=&quot;success&quot;&gt;
							&lt;?php echo $message; ?&gt;
						&lt;/ul&gt;
					&lt;?php endif; ?&gt;
					&lt;div id=&quot;form-section-author&quot; class=&quot;form-section&quot;&gt;
						&lt;div class=&quot;form-label&quot;&gt;&lt;label for=&quot;title&quot;&gt;Article title&lt;/label&gt; &lt;em&gt;*&lt;/em&gt;&lt;/div&gt;
						&lt;div class=&quot;form-input&quot;&gt;&lt;input id=&quot;title&quot; name=&quot;title&quot; type=&quot;text&quot; value=&quot;&lt;?php echo $your_post_title ?&gt;&quot; size=&quot;40&quot; tabindex=&quot;3&quot; /&gt;&lt;/div&gt;
					&lt;/div&gt;&lt;!-- #form-section-author .form-section --&gt;

					&lt;div id=&quot;form-section-comment&quot; class=&quot;form-section&quot;&gt;
						&lt;div class=&quot;form-label&quot;&gt;&lt;label for=&quot;Content&quot;&gt;Article content&lt;/label&gt; &lt;em&gt;*&lt;/em&gt;&lt;/div&gt;
						&lt;div class=&quot;form-textarea&quot;&gt;&lt;textarea id=&quot;content-area&quot; name=&quot;content&quot; cols=&quot;65&quot; rows=&quot;12&quot; tabindex=&quot;6&quot;&gt;&lt;?php echo $your_post_content ?&gt;&lt;/textarea&gt;&lt;/div&gt;
					&lt;/div&gt;&lt;!-- #form-section-comment .form-section --&gt;
					&lt;p&gt;&lt;em&gt;*&lt;/em&gt; required fields&lt;/p&gt;
					&lt;div class=&quot;form-submit&quot;&gt;&lt;input id=&quot;submit&quot; name=&quot;submit&quot; type=&quot;submit&quot; value=&quot;&lt;?php _e('Submit your article for review', 'thematic') ?&gt;&quot; /&gt;&lt;/div&gt;
				&lt;/form&gt;
				&lt;a href=&quot;&lt;?php echo wp_logout_url(get_bloginfo('url')) ?&gt;&quot;&gt;Logout&lt;/a&gt;
			&lt;/div&gt;
			
			&lt;div class=&quot;navigation&quot;&gt;
				&lt;div class=&quot;alignleft&quot;&gt;&lt;?php next_posts_link('&amp;laquo; Older Entries') ?&gt;&lt;/div&gt;
				&lt;div class=&quot;alignright&quot;&gt;&lt;?php previous_posts_link('Newer Entries &amp;raquo;') ?&gt;&lt;/div&gt;
			&lt;/div&gt;
			
			&lt;?php while ( have_posts() ) : the_post() ?&gt;

			&lt;div class=&quot;hentry&quot;&gt;
				&lt;h2&gt;&lt;?php the_title() ?&gt;&lt;/h2&gt;
				&lt;div class=&quot;entry-content&quot;&gt;
					&lt;?php the_content('read more'); ?&gt;
					&lt;span class=&quot;meta-prep meta-prep-author&quot;&gt;By&lt;/span&gt;
					&lt;span class=&quot;author vcard&quot;&gt;
						&lt;a class=&quot;url fn n&quot; href=&quot;'&lt;?php get_author_link(false, $authordata-&gt;ID, $authordata-&gt;user_nicename)?&gt;&quot; title=&quot;View all posts by &lt;?php echo get_the_author() ?&gt; &quot;&gt;
							&lt;?php echo get_the_author(); ?&gt;
						&lt;/a&gt;
					&lt;/span&gt;
				&lt;/div&gt;
			&lt;/div&gt;&lt;!-- .post --&gt;

			&lt;?php endwhile; ?&gt;
			
			&lt;div class=&quot;navigation&quot;&gt;
				&lt;div class=&quot;alignleft&quot;&gt;&lt;?php next_posts_link('&amp;laquo; Older Entries') ?&gt;&lt;/div&gt;
				&lt;div class=&quot;alignright&quot;&gt;&lt;?php previous_posts_link('Newer Entries &amp;raquo;') ?&gt;&lt;/div&gt;
			&lt;/div&gt;
			
			

		&lt;?php endif;
	}
}
// Create the members object
$members_object = new Members_Section();
</code></pre>
<p>The hooks are in the constructor of the class and get called when we create the object (last line). This class goes in a separate file that then gets included in your function.php file or straight in the function.php, that&#8217;s up to you.</p>
<h2>Some issues</h2>
<p>There are some issues we couldn&#8217;t resolve. The main one is about the rss of the members category. The way Firefox caches rss feeds make the solution not perfect. If you are not logged in you will be redirected, no problem, but then if you login and go back to the rss feed, the browser cache will kick in and you will get redirected again.</p>
<p>The other small issue is in TinyMCE, the style dropdown we&#8217;ve added has got a strange default value. Not a big deal but still could be better.</p>
<p>If anyone has an idea about those to problem feel free to discuss in the comment section. And of course the discussion is open for comment, questions and anything related to the above.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/the-almost-ultimate-members-page-in-wordpress-182.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mortar, the new brick in the WooThemes premium themes collection</title>
		<link>http://wordpressthemescollection.com/mortar-the-new-brick-in-the-woothemes-premium-themes-collection-168.html</link>
		<comments>http://wordpressthemescollection.com/mortar-the-new-brick-in-the-woothemes-premium-themes-collection-168.html#comments</comments>
		<pubDate>Fri, 07 Aug 2009 10:19:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=168</guid>
		<description><![CDATA[WooThemes don&#8217;t have a frenetic release rate but when they get a new theme out it is always something a bit special. Their last creation is called Mortar. The theme is built on top of the 960 grid framework and so has a strong grid layout that makes it very structured. And to make it [...]]]></description>
			<content:encoded><![CDATA[<p>WooThemes don&#8217;t have a frenetic release rate but when they get a new theme out it is always something a bit special. Their last creation is called <a href="http://www.woothemes.com/amember/go.php?r=272&amp;i=l46">Mortar</a>. The theme is built on top of the 960 grid framework and so has a strong grid layout that makes it very structured.<span id="more-168"></span></p>
<p>And to make it even better they have used a javascript layout script called JS Masonry which order the page so it keeps a nice structure.</p>
<p><a href="http://www.woothemes.com/amember/go.php?r=272&amp;i=l46"><img class="alignnone size-full wp-image-170" title="mortar_default" src="http://wordpressthemescollection.com/wp-content/uploads/2009/08/mortar_default.png" alt="mortar_default" width="498" height="616" /></a></p>
<p>If you ave a look at the <a href="http://www.woothemes.com/amember/go.php?r=272&amp;i=l46">demo</a> you&#8217;ll see that each post is cleverly placed so their is no spaces left unused. Interesting, very interesting&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/mortar-the-new-brick-in-the-woothemes-premium-themes-collection-168.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Atlantica, free file of the month from ThemeForest</title>
		<link>http://wordpressthemescollection.com/atlantica-free-file-of-the-month-from-themeforest-156.html</link>
		<comments>http://wordpressthemescollection.com/atlantica-free-file-of-the-month-from-themeforest-156.html#comments</comments>
		<pubDate>Mon, 03 Aug 2009 10:23:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=156</guid>
		<description><![CDATA[A new month and a new free file at theme forest. This time they&#8217;ve released a psd template called Atlantica. It is basically the same as the WordPress theme but in, you guessed it, Photoshop layered files. The template come in two files: dark and bright and each as different colour schemes included to choose [...]]]></description>
			<content:encoded><![CDATA[<p>A new month and a new free file at theme forest. This time they&#8217;ve released a psd template called <a href="http://blog.themeforest.net/general/free-file-of-the-month-august-2009/">Atlantica</a>. It is basically the same as the <a href="http://wordpressthemescollection.com/atlantica-premium-wordpress-theme-100.html">WordPress theme</a> but in, you guessed it, Photoshop layered files.<span id="more-156"></span></p>
<p>The template come in two files: dark and bright and each as different colour schemes included to choose from. The theme as a bold typographic clean theme ideally suited for artists photographers and all kind of creative portfolios.</p>
<p style="text-align: center;"><a href="http://blog.themeforest.net/general/free-file-of-the-month-august-2009/"><img class="size-medium wp-image-158 aligncenter" title="1-altantica_preview_psd.__large_preview" src="http://wordpressthemescollection.com/wp-content/uploads/2009/08/1-altantica_preview_psd.__large_preview-300x152.jpg" alt="1-altantica_preview_psd.__large_preview" width="300" height="152" /></a></p>
<p>You are granted one free us in any kind of project and you may not redistribute the file in any way. Make good use of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/atlantica-free-file-of-the-month-from-themeforest-156.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Palm Pre and Iphone free psd vector pack</title>
		<link>http://wordpressthemescollection.com/palm-pre-and-iphone-free-psd-vector-pack-129.html</link>
		<comments>http://wordpressthemescollection.com/palm-pre-and-iphone-free-psd-vector-pack-129.html#comments</comments>
		<pubDate>Sun, 26 Jul 2009 09:42:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://wordpressthemescollection.com/?p=129</guid>
		<description><![CDATA[After creating a vector version of the Palm Pre and the Iphone in photoshop we thought it would be nice to release it for free download. No need to introduce the Iphone, it&#8217;s one the most desired phone at the moment and as been a great success for Apple. The Palm Pre is a serious [...]]]></description>
			<content:encoded><![CDATA[<p>After creating a vector version of the Palm Pre and the Iphone in photoshop we thought it would be nice to release it for free download. No need to introduce the Iphone, it&#8217;s one the most desired phone at the moment and as been a great success for Apple. The Palm Pre is a serious competitor is also a stylish handset.<span id="more-129"></span></p>
<p style="text-align: center;"><img class="size-full wp-image-136  aligncenter" title="iphone1" src="http://wordpressthemescollection.com/wp-content/uploads/2009/07/iphone1.png" alt="iphone1" width="309" height="500" /></p>
<p style="text-align: center;"><img class="size-full wp-image-137 aligncenter" title="palm-pre1" src="http://wordpressthemescollection.com/wp-content/uploads/2009/07/palm-pre1.png" alt="palm-pre1" width="220" height="352" /></p>
<p>We expect those two to get even more attention in the next few month and having them in vector format will definitely come handy. So here they are, feel free to download the pack. The archive contain one layered psd file for each and both are 100% shape made.</p>
<p>You can use those in any project, commercial or personal and you don&#8217;t have to give credits to us (but links are always appreciated). Of course we would love to here from you in the comments on how you&#8217;ve used them.</p>
<p>The archive: <a href="http://wordpressthemescollection.com/wp-content/uploads/2009/07/phones.zip">Palm Pre and Iphone</a> vector pack</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressthemescollection.com/palm-pre-and-iphone-free-psd-vector-pack-129.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
