<?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>WP Engineer</title>
	<atom:link href="http://wpengineer.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpengineer.com</link>
	<description>WordPress News, Hacks, Tipps, Tutorials, Plugins and Themes</description>
	<lastBuildDate>Fri, 12 Mar 2010 10:22:20 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>CeBIT, Busy Times And Thanks To Our Supporters!</title>
		<link>http://wpengineer.com/cebit-busy-times-and-thanks-to-our-supporters/</link>
		<comments>http://wpengineer.com/cebit-busy-times-and-thanks-to-our-supporters/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 00:40:34 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[WPengineer Misc]]></category>
		<category><![CDATA[CEBIT]]></category>
		<category><![CDATA[Sponsors]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1979</guid>
		<description><![CDATA[
Hey folks!
It's been quite busy lately in our daily life. Many projects, family and so on, but no worries, new interesting tutorials, news and tips are already in the pipe! Additionally Frank and I were at the CeBIT last week to meet old friends and built new contacts. Frank, second left on the photo, was [...]]]></description>
			<content:encoded><![CDATA[
<p>Hey folks!</p>
<p><a href="http://wpengineer.com/blog/wp-content/uploads/kubani_bueltge_windisch_heigl.jpg" class="liimagelink"><img src="http://wpengineer.com/blog/wp-content/uploads/kubani_bueltge_windisch_heigl-150x150.jpg" alt="" title="kubani_bueltge_windisch_heigl" width="150" height="150" class="alignleft size-thumbnail wp-image-1983" /></a>It's been quite busy lately in our daily life. Many projects, family and so on, but no worries, new interesting tutorials, news and tips are already in the pipe! Additionally Frank and I were at the CeBIT last week to meet old friends and built new contacts. Frank, second left on the photo, was there to work at the WordPress-Deutschland booth and help to show how powerful WordPress and BuddyPress is. It was pretty cool to see many WordPress interested people, some were Experts and others didn't know anything at all about WordPress. It was a big unknown for them, but they were amazed about the features, possibilities, userfriendly administration and of course - the price. If you work with WordPress quite a long time and you have other WordPress experts around you, it doesn't happen very often to introduce WordPress to completely novices 20 times a day, who didn't have a no clue what they can expect. It was fun to see their dropping jaw and their big surprising eyes. They were hooked immediately! <img src='http://wpengineer.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>We also like to thank our supporters on our website, we are still amazed by the great support and like to recommend their services to our loyal readers since they are all WordPress related:</p>
<p><a href="http://themeshift.com/" class="liimagelink"><img src="http://wpengineer.com/blog/wp-content/uploads/themeshift.png" alt="" title="themeshift" width="450" height="300" class="aligncenter size-full wp-image-1981" /></a><a href="http://themeshift.com/" class="liexternal">ThemeShift</a> provides one of the most beautiful, powerful and state of the art WordPress Themes available these days. <a href="http://themeshift.com/" class="liexternal">Take a look at them</a>!</p>
<hr />
<p><img src="http://wpengineer.com/blog/wp-content/uploads/wishlistmember.jpg" alt="wishlistmember" title="wishlistmember" width="450" height="258" class="aligncenter size-full wp-image-1356" /><br />
<a href="http://member.wishlistproducts.com/" class="liexternal">WishList Member</a> is a powerful membership script that can turn any WordPress blog into a full blown membership site. Very interesting, you have to check it out. WishList Member belongs to our loyal sponsors, we are very glad to have them and to provide our readers a great membership plugin.</p>
<hr />
<p><a href="http://wpseo.org" class="liimagelink"><img src="http://wpengineer.com/blog/wp-content/uploads/wpseo.jpg" alt="wpseo" title="wpseo" width="450" height="258" class="aligncenter size-full wp-image-1358" /></a><br />
<a href="http://wpseo.org" class="liexternal"> wpSEO</a> is a great Plugin for better SEO on your WordPress installation. Check it out and you will love it as Google will love your blog from now on. <img src='http://wpengineer.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Of course we are using it on WP Engineer too. WP 2.9 ready and with over 70 setting to optimize your blog. Now with <a href="http://www.wpseo.org/affiliate/" class="liexternal">affiliate program</a> to participate on the success of wpSEO.</p>
<hr />
<p><img src="http://wpengineer.com/blog/wp-content/uploads/make-better-websites.jpg" alt="make-better-websites" title="make-better-websites" width="450" height="258" class="aligncenter size-full wp-image-1355" /><br />
<a href="http://www.makebetterwebsites.com/" class="liexternal">MakeBetterWebsites</a> is a great gallery with a fine selection of high quality websites. All websites are handpicked and most of them I have first seen on this website instead of the usual suspects, seen on many other websites over and over again. Only high quality websites are seen on this website.</p>
<hr />
<p><img src="http://wpengineer.com/blog/wp-content/uploads/Pagelines-Themes.jpg" alt="Pagelines-Themes" title="Pagelines-Themes" width="449" height="335" class="aligncenter size-full wp-image-1929" />If you also want to have a great design for your website, just get a <a href="http://www.pagelines.com/" class="liexternal">PageLines Theme</a>. They have superior themes for WordPress that make it simple for you to have an awesome, fully-featured website that is easy to set up and manage.</p>
<hr />
<p><a href="http://wpwebhost.com/wordpress-hosting/" class="liimagelink"><img src="http://wpengineer.com/blog/wp-content/uploads/freedom.gif" alt="" title="freedom" width="450" height="187" class="aligncenter size-full wp-image-1980" /></a> <a href="http://wpwebhost.com/wordpress-hosting/" class="liexternal">WPWebHost</a> have a <a href="http://wpwebhost.com/wordpress-hosting/" class="liexternal">March special</a> going on, 30% off! They tailor made their servers and configuration for WordPress hosting. Now you can get the best compatibility and maximum performance for every of your WordPress-powered sites <a href="http://wpwebhost.com/wordpress-hosting/" class="liexternal">hosted with them</a>. One Click WordPress Installation, install new WordPress on your site with just a click of your mouse through their Control Panel.</p>
<hr />
<p><img src="http://wpengineer.com/blog/wp-content/uploads/wordpress-book.jpg" alt="wordpress-book" title="wordpress-book" width="450" height="471" class="aligncenter size-full wp-image-1927" /><a href="http://digwp.com/book/" class="liexternal">Download this book</a> to become a Pro in WordPress! 400 Pages of Practical Information. A Lifetime Subscription, when you buy this <a href="http://digwp.com/book/" class="liexternal">book</a>, you will instantly get the most current version. But also, you are getting a lifetime subscription to all updated (PDF) copies of the book. And lots of Code Samples!</p>
<hr />
<p><a href="http://wpmadness.com/" class="liimagelink"><img src="http://wpengineer.com/blog/wp-content/uploads/wpmadness.png" alt="" title="wpmadness" width="450" height="266" class="aligncenter size-full wp-image-1982" /></a> Freaking affordable but not cheap <a href="http://wpmadness.com/" class="liexternal">WordPress themes</a>, nothing can beat that price, only for $5!</p>
<h3>If you also interested to support our website, please go to <a href="http://buysellads.com/buy/detail/3646" class="liexternal">BuySellAds.com</a> and promote your service or product on WP Engineer. Maybe not this month, but maybe next month we have a spot just for you available. <img src='http://wpengineer.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </h3>
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/new-navi-design-in-wordpress-27/" rel="bookmark" title="Permanent Link: New Navi-Design in WordPress 2.7" class="liinternal">New Navi-Design in WordPress 2.7</a></li>
<li><a href="http://wpengineer.com/yaml-31-released/" rel="bookmark" title="Permanent Link: YAML 3.1 Released" class="liinternal">YAML 3.1 Released</a></li>
<li><a href="http://wpengineer.com/optimize-syndication-frequenzy/" rel="bookmark" title="Permanent Link: Optimize Syndication Frequenzy" class="liinternal">Optimize Syndication Frequenzy</a></li>
<li><a href="http://wpengineer.com/disable-flash-uploader/" rel="bookmark" title="Permanent Link: Disable Flash Uploader" class="liinternal">Disable Flash Uploader</a></li>
<li><a href="http://wpengineer.com/use-javascript-libraries-in-and-of-wordpress/" rel="bookmark" title="Permanent Link: Use JavaScript Libraries In And Of WordPress">Use JavaScript Libraries In And Of WordPress</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/cebit-busy-times-and-thanks-to-our-supporters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Screenshots Of WordPress 3.0</title>
		<link>http://wpengineer.com/new-screenshots-of-wordpress-3-0/</link>
		<comments>http://wpengineer.com/new-screenshots-of-wordpress-3-0/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 16:38:58 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[WordPress News]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP3.0]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1974</guid>
		<description><![CDATA[
Unfortunately we don't have time right now to write new posts, but at least we want you to show some new screenshots of WordPress 3.0.
WordPress 3.0 Background settings

Now you have the option to set positon, repeat and attachment.
WordPress 3.0 Header Image
8 header images are available in the new theme TwentyTen.
WordPress 3.0 Menu Settings


Related posts:

New Feature [...]]]></description>
			<content:encoded><![CDATA[
<p>Unfortunately we don't have time right now to write new posts, but at least we want you to show some new screenshots of WordPress 3.0.</p>
<h3>WordPress 3.0 Background settings</h3>
<p><img class="aligncenter size-full wp-image-1976" title="WordPress background settings" src="http://wpengineer.com/blog/wp-content/uploads/wordpress-background-dialog.jpg" alt="WordPress background settings" width="590" height="712" /></p>
<p>Now you have the option to set positon, repeat and attachment.</p>
<h3>WordPress 3.0 Header Image</h3>
<p><img class="aligncenter size-full wp-image-1977" title="WordPress 3.0 Header Image" src="http://wpengineer.com/blog/wp-content/uploads/wordpress-header-image.jpg" alt="WordPress 3.0 Header Image" width="590" height="456" />8 header images are available in the new theme TwentyTen.</p>
<h3>WordPress 3.0 Menu Settings</h3>
<p><img class="aligncenter size-full wp-image-1978" title="WordPress 3.0 Menu Screenshot" src="http://wpengineer.com/blog/wp-content/uploads/wordpress-menu-screen.jpg" alt="WordPress 3.0 Menu Screenshot" width="590" height="261" /><br />
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/new-feature-for-wordpress-2-9-wordpress-image-editor/" rel="bookmark" title="Permanent Link: New Feature for WordPress 2.9 &#8211; WordPress Image Editor" class="liinternal">New Feature for WordPress 2.9 &#8211; WordPress Image Editor</a></li>
<li><a href="http://wpengineer.com/wordpress-3-multisite-settings/" rel="bookmark" title="Permanent Link: WordPress 3.0 Multisite Settings" class="liinternal">WordPress 3.0 Multisite Settings</a></li>
<li><a href="http://wpengineer.com/comment-pagination-and-reply-depth-in-wordpress-27/" rel="bookmark" title="Permanent Link: Comment Pagination And Reply Depth In WordPress 2.7" class="liinternal">Comment Pagination And Reply Depth In WordPress 2.7</a></li>
<li><a href="http://wpengineer.com/hide-the-comment-pagination/" rel="bookmark" title="Permanent Link: Hide The Comment Pagination" class="liinternal">Hide The Comment Pagination</a></li>
<li><a href="http://wpengineer.com/new-feature-in-wordpress-2-9-the_post_image/" rel="bookmark" title="Permanent Link: New feature in WordPress 2.9 &#8211; the_post_image()" class="liinternal">New feature in WordPress 2.9 &#8211; the_post_image()</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/new-screenshots-of-wordpress-3-0/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Customize WordPress WYSIWYG Editor</title>
		<link>http://wpengineer.com/customize-wordpress-wysiwyg-editor/</link>
		<comments>http://wpengineer.com/customize-wordpress-wysiwyg-editor/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 14:01:45 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[HTML Editor]]></category>
		<category><![CDATA[TinyMCE]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[WYSIWYG Editor]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1963</guid>
		<description><![CDATA[
Adjustments to the editor TinyMCE via hook, so regardless of the core files of WordPress is also possible and must be used in a number of requirements. So in this article are some examples that can be adapted to its needs and should give an introduction of customizing the TinyMCE editor in WordPress.

You put the [...]]]></description>
			<content:encoded><![CDATA[
<p>Adjustments to the editor TinyMCE via hook, so regardless of the core files of WordPress is also possible and must be used in a number of requirements. So in this article are some examples that can be adapted to its needs and should give an introduction of customizing the TinyMCE editor in WordPress.<br />
<span id="more-1963"></span><br />
You put the following code snippet in the <code>functions.php</code> of the theme or stores it into a Plugin. There are a whole range of possibilities and I would like to show only a small range of them. Adjusting the buttons is quite comfortable to do via the Plugin <a href="http://wordpress.org/extend/plugins/tinymce-advanced/" class="liwp">TinyMCE Advanced</a>.</p>
<h4>Adjust HTML-Filter</h4>
<p>The default editor is set to always generate xHTML 1.0 and thus not all tags are allowed; a classic example are iframes, which you use for Google Map for example. Sure there are other approaches via short code, etc., but this is not the today topic. Merely as an example, allowing the tag <code>iframe</code>, with various attributes, and the Tags must be added to the variable <code>$ext</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> fb_change_mce_options<span style="color: #009900;">&#40;</span><span style="color: #000088;">$initArray</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">// Comma separated string od extendes tags</span>
	<span style="color: #666666; font-style: italic;">// Command separated string of extended elements</span>
	<span style="color: #000088;">$ext</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$initArray</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'extended_valid_elements'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$initArray</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'extended_valid_elements'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">','</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$ext</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$initArray</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'extended_valid_elements'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ext</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #666666; font-style: italic;">// maybe; set tiny paramter verify_html</span>
	<span style="color: #666666; font-style: italic;">//$initArray['verify_html'] = false;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$initArray</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'tiny_mce_before_init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'fb_change_mce_options'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h4>Customizing the function of the buttons in your Editor</h4>
<p>A way to expand the block formats (<code>theme_advanced_blockformats</code>) or modify and disable a few buttons in your editor (<code>theme_advanced_disable</code>).</p>
<p><img src="http://wpengineer.com/blog/wp-content/uploads/mytinymce-en.png" alt="" title="mytinymce-en" width="468" height="240" class="aligncenter size-full wp-image-1962" /></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> fb_change_mce_buttons<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$initArray</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">//@see http://wiki.moxiecode.com/index.php/TinyMCE:Control_reference</span>
	<span style="color: #000088;">$initArray</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'theme_advanced_blockformats'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'p,address,pre,code,h3,h4,h5,h6'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$initArray</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'theme_advanced_disable'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'forecolor'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$initArray</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'tiny_mce_before_init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'fb_change_mce_buttons'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h4>Change language of spelling</h4>
<p>In our third case, we adapt the language of the spelling checker, in our example we will now allow German and English only.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> fb_mce_external_languages<span style="color: #009900;">&#40;</span><span style="color: #000088;">$initArray</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$initArray</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'spellchecker_languages'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'+German=de, English=en'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$initArray</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'tiny_mce_before_init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'fb_mce_external_languages'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h4>The default values of WordPress</h4>
<p>Following the values that are used in the standard of wordpress which gives an insight into the possibilities for the transfer of the array.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #0000ff;">'mode'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'specific_textareas'</span>
<span style="color: #0000ff;">'editor_selector'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'theEditor'</span>
<span style="color: #0000ff;">'width'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'100%'</span>
<span style="color: #0000ff;">'theme'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'advanced'</span>
<span style="color: #0000ff;">'skin'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'wp_theme'</span>
<span style="color: #0000ff;">'theme_advanced_buttons1'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'bold,italic,strikethrough,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,|,link,unlink,wp_more,|,spellchecker,fullscreen,wp_adv'</span>
<span style="color: #0000ff;">'theme_advanced_buttons2'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'formatselect,underline,justifyfull,forecolor,|,pastetext,pasteword,removeformat,|,media,charmap,|,outdent,indent,|,undo,redo,wp_help'</span>
<span style="color: #0000ff;">'theme_advanced_buttons3'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span>
<span style="color: #0000ff;">'theme_advanced_buttons4'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span>
<span style="color: #0000ff;">'language'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'de'</span>
<span style="color: #0000ff;">'spellchecker_languages'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,+German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv'</span>
<span style="color: #0000ff;">'theme_advanced_toolbar_location'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'top'</span>
<span style="color: #0000ff;">'theme_advanced_toolbar_align'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'left'</span>
<span style="color: #0000ff;">'theme_advanced_statusbar_location'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'bottom'</span>
<span style="color: #0000ff;">'theme_advanced_resizing'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
<span style="color: #0000ff;">'theme_advanced_resize_horizontal'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span>
<span style="color: #0000ff;">'dialog_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'modal'</span>
<span style="color: #0000ff;">'relative_urls'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span>
<span style="color: #0000ff;">'remove_script_host'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span>
<span style="color: #0000ff;">'convert_urls'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span>
<span style="color: #0000ff;">'apply_source_formatting'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span>
<span style="color: #0000ff;">'remove_linebreaks'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
<span style="color: #0000ff;">'gecko_spellcheck'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
<span style="color: #0000ff;">'entities'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'38,amp,60,lt,62,gt'</span>
<span style="color: #0000ff;">'accessibility_focus'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
<span style="color: #0000ff;">'tabfocus_elements'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'major-publishing-actions'</span>
<span style="color: #0000ff;">'media_strict'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span>
<span style="color: #0000ff;">'paste_remove_styles'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
<span style="color: #0000ff;">'paste_remove_spans'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
<span style="color: #0000ff;">'paste_strip_class_attributes'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'all'</span>
<span style="color: #0000ff;">'wpeditimage_disable_captions'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span>
<span style="color: #0000ff;">'plugins'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'safari,inlinepopups,spellchecker,paste,wordpress,media,fullscreen,wpeditimage,wpgallery,tabfocus'</span></pre></div></div>

<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/disable-html-editor-wordpress/" rel="bookmark" title="Permanent Link: Disable HTML Editor In WordPress" class="liinternal">Disable HTML Editor In WordPress</a></li>
<li><a href="http://wpengineer.com/create-your-own-wordpress-login-design/" rel="bookmark" title="Permanent Link: Create Your Own WordPress Login Design" class="liinternal">Create Your Own WordPress Login Design</a></li>
<li><a href="http://wpengineer.com/new-feature-for-wordpress-2-9-wordpress-image-editor/" rel="bookmark" title="Permanent Link: New Feature for WordPress 2.9 &#8211; WordPress Image Editor" class="liinternal">New Feature for WordPress 2.9 &#8211; WordPress Image Editor</a></li>
<li><a href="http://wpengineer.com/list-all-users-in-wordpress/" rel="bookmark" title="Permanent Link: List All Users in WordPress" class="liinternal">List All Users in WordPress</a></li>
<li><a href="http://wpengineer.com/use-metaboxes-in-your-theme-or-plugin/" rel="bookmark" title="Permanent Link: Use Metaboxes In Your Theme Or Plugin" class="liinternal">Use Metaboxes In Your Theme Or Plugin</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/customize-wordpress-wysiwyg-editor/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Display Post Thumbnail Also In Edit Post and Page Overview</title>
		<link>http://wpengineer.com/display-post-thumbnail-post-page-overview/</link>
		<comments>http://wpengineer.com/display-post-thumbnail-post-page-overview/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 10:51:49 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[Post Thumbnail]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[wp2.9]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1960</guid>
		<description><![CDATA[
WordPress version 2.9 introduced the function of Post Thumbnail. We wrote about this feature in this post and here and also in many other blogs. I find it an advantage, if the overview of articles and pages also provides the associated thumbnail. Therefore, I would like to introduce a small code snippet that makes just [...]]]></description>
			<content:encoded><![CDATA[
<p>WordPress version 2.9 introduced the function of Post Thumbnail. We wrote about this feature <a href="http://wpengineer.com/about-wordpress-post-thumbnail/" class="liinternal">in this post</a> and <a href="http://wpengineer.com/wordpress-2-9-add_theme_support-and-has_post_image/" class="liinternal">here</a> and also in many other blogs. I find it an advantage, if the overview of articles and pages also provides the associated thumbnail. Therefore, I would like to introduce a small code snippet that makes just that.<br />
<span id="more-1960"></span></p>
<p><img src="http://wpengineer.com/blog/wp-content/uploads/post-thumbnail-edit.png" alt="" title="post-thumbnail-edit" width="450" height="360" class="aligncenter size-full wp-image-1961" /></p>
<p>The above screenshot should illustrate what the little extension does. The following code must be put in a Plugin or be copied into the <code>functions.php</code> of the theme.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'fb_AddThumbColumn'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'add_theme_support'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// for post and page</span>
	add_theme_support<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post-thumbnails'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'page'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> fb_AddThumbColumn<span style="color: #009900;">&#40;</span><span style="color: #000088;">$cols</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #000088;">$cols</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'thumbnail'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Thumbnail'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$cols</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> fb_AddThumbValue<span style="color: #009900;">&#40;</span><span style="color: #000088;">$column_name</span><span style="color: #339933;">,</span> <span style="color: #000088;">$post_id</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
			<span style="color: #000088;">$width</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> <span style="color: #cc66cc;">35</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$height</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> <span style="color: #cc66cc;">35</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'thumbnail'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$column_name</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #666666; font-style: italic;">// thumbnail of WP 2.9</span>
				<span style="color: #000088;">$thumbnail_id</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$post_id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'_thumbnail_id'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #666666; font-style: italic;">// image from gallery</span>
				<span style="color: #000088;">$attachments</span> <span style="color: #339933;">=</span> get_children<span style="color: #009900;">&#40;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post_parent'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$post_id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'attachment'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_mime_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'image'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumbnail_id</span><span style="color: #009900;">&#41;</span>
					<span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> wp_get_attachment_image<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$thumbnail_id</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$width</span><span style="color: #339933;">,</span> <span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$attachments</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$attachments</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$attachment_id</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$attachment</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
						<span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> wp_get_attachment_image<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$attachment_id</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$width</span><span style="color: #339933;">,</span> <span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span>
					<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$thumb</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
						<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$thumb</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
						<span style="color: #b1b100;">echo</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'None'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// for posts</span>
	add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'manage_posts_columns'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'fb_AddThumbColumn'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'manage_posts_custom_column'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'fb_AddThumbValue'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// for pages</span>
	add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'manage_pages_columns'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'fb_AddThumbColumn'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'manage_pages_custom_column'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'fb_AddThumbValue'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/new-feature-in-wordpress-2-9-the_post_image/" rel="bookmark" title="Permanent Link: New feature in WordPress 2.9 &#8211; the_post_image()" class="liinternal">New feature in WordPress 2.9 &#8211; the_post_image()</a></li>
<li><a href="http://wpengineer.com/about-wordpress-post-thumbnail/" rel="bookmark" title="Permanent Link: About WordPress Post Thumbnail" class="liinternal">About WordPress Post Thumbnail</a></li>
<li><a href="http://wpengineer.com/the-ultimative-guide-for-the_post_thumbnail-in-wordpress-2-9/" rel="bookmark" title="Permanent Link: The Ultimative Guide For the_post_thumbnail In WordPress 2.9" class="liinternal">The Ultimative Guide For the_post_thumbnail In WordPress 2.9</a></li>
<li><a href="http://wpengineer.com/wordpress-2-9-add_theme_support-and-has_post_image/" rel="bookmark" title="Permanent Link: WordPress 2.9 add_theme_support and has_post_image" class="liinternal">WordPress 2.9 add_theme_support and has_post_image</a></li>
<li><a href="http://wpengineer.com/display-always-subpages-in-sidebar/" rel="bookmark" title="Permanent Link: Display Always All Subpages in Sidebar" class="liinternal">Display Always All Subpages in Sidebar</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/display-post-thumbnail-post-page-overview/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>First Impressions of Custom Post Type</title>
		<link>http://wpengineer.com/impressions-of-custom-post-type/</link>
		<comments>http://wpengineer.com/impressions-of-custom-post-type/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 07:07:36 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress News]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[WP3.0]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1969</guid>
		<description><![CDATA[
One of the new very interesting things in WordPress 3.0 are individual post-types you can implement with little effort. Back then, you had to expand the database and write your own interface for it, now you just have to add a few lines of code - of course this is just the current state, which [...]]]></description>
			<content:encoded><![CDATA[
<p>One of the new very interesting things in WordPress 3.0 are individual post-types you can implement with little effort. Back then, you had to expand the database and write your own interface for it, now you just have to add a few lines of code - of course this is just the current state, which can be change until the final release.</p>
<p>After <a href="http://justintadlock.com/archives/2010/02/02/showing-custom-post-types-on-your-home-blog-page" class="liexternal">Justin had been playing with these types</a>, we check out the possibilities of types for "Movies".</p>
<h4>Simple Solution</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> post_type_movies<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	register_post_type<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'movies'</span><span style="color: #339933;">,</span>
                <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Movies'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'public'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'show_ui'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	register_taxonomy_for_object_type<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post_tag'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'movies'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_type_movies'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><img src="http://wpengineer.com/blog/wp-content/uploads/default-custom-post-type.png" alt="default custom post type" title="default-custom-post-type" width="450" height="373" class="aligncenter size-full wp-image-1970" /></p>
<h4>More parameters for meta-boxes</h4>
<p>Of course there are a number of parameters for this function and so the behavior and appearance of the corresponding edit page can be controlled quite easily, a small sample with additional meta boxes:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> post_type_movies<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	register_post_type<span style="color: #009900;">&#40;</span>
                     <span style="color: #0000ff;">'movies'</span><span style="color: #339933;">,</span> 
                     <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Movies'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
                             <span style="color: #0000ff;">'public'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span> 
                             <span style="color: #0000ff;">'show_ui'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
                             <span style="color: #0000ff;">'supports'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                                        <span style="color: #0000ff;">'post-thumbnails'</span><span style="color: #339933;">,</span>
                                        <span style="color: #0000ff;">'excerpts'</span><span style="color: #339933;">,</span>
                                        <span style="color: #0000ff;">'trackbacks'</span><span style="color: #339933;">,</span>
                                        <span style="color: #0000ff;">'custom-fields'</span><span style="color: #339933;">,</span>
                                        <span style="color: #0000ff;">'comments'</span><span style="color: #339933;">,</span>
                                        <span style="color: #0000ff;">'revisions'</span><span style="color: #009900;">&#41;</span>
                                <span style="color: #009900;">&#41;</span> 
                      <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	register_taxonomy_for_object_type<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post_tag'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'movies'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_type_movies'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><img src="http://wpengineer.com/blog/wp-content/uploads/custom-post-type.png" alt="" title="custom-post-type" width="450" height="602" class="aligncenter size-full wp-image-1971" /></p>
<h4>The default arguments</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Args prefixed with an underscore are reserved for internal use.</span>
<span style="color: #000088;">$defaults</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'publicly_queryable'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'exclude_from_search'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'_builtin'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'_edit_link'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'post.php?post=%d'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'capability_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'post'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'hierarchical'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'public'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'rewrite'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'query_var'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'supports'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'register_meta_box_cb'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'taxonomies'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'show_ui'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">null</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<ul>
<li><strong>label</strong> - A descriptive name for the post type marked for translation. Defaults to $post_type</li>
<li><strong>public</strong> - Whether posts of this type should be shown in the admin UI. Defaults to false</li>
<li><strong>exclude_from_search</strong> - Whether to exclude posts with this post type from search results. Defaults to true if the type is not public, false if the type is public</li>
<li><strong>publicly_queryable</strong> - Whether post_type queries can be performed from the front page.  Defaults to whatever public is set as</li>
<li><strong>show_ui</strong> - Whether to generate a default UI for managing this post type. Defaults to true if the type is public, false if the type is not public</li>
<li><strong>inherit_type</strong> - The post type from which to inherit the edit link and capability type. Defaults to none</li>
<li><strong>capability_type</strong> - The post type to use for checking read, edit, and delete capabilities. Defaults to "post"</li>
<li><strong>edit_cap</strong> - The capability that controls editing a particular object of this post type. Defaults to "edit_$capability_type" (edit_post)</li>
<li><strong>edit_type_cap</strong> - The capability that controls editing objects of this post type as a class. Defaults to "edit_ . $capability_type . s" (edit_posts)</li>
<li><strong>edit_others_cap</strong> - The capability that controls editing objects of this post type that are owned by other users. Defaults to "edit_others_ . $capability_type . s" (edit_others_posts)</li>
<li><strong>edit_others_cap</strong> - The capability that controls publishing objects of this post type. Defaults to "publish_ . $capability_type . s" (publish_posts)</li>
<li><strong>read_cap</strong> - The capability that controls reading a particular object of this post type. Defaults to "read_$capability_type" (read_post)</li>
<li><strong>delete_cap</strong> - The capability that controls deleting a particular object of this post type. Defaults to "delete_$capability_type" (delete_post)</li>
<li><strong>hierarchical</strong> - Whether the post type is hierarchical. Defaults to false</li>
<li><strong>supports</strong> - An alias for calling add_post_type_support() directly. See add_post_type_support() for Documentation. Defaults to none</li>
<li><strong>register_meta_box_cb</strong> - Provide a callback function that will be called when setting up the meta boxes for the edit form.  Do remove_meta_box() and add_meta_box() calls in the callback</li>
<li><strong>taxonomies</strong> - An array of taxonomy identifiers that will be registered for the post type.  Default is no taxonomies. Taxonomies can be registered later with register_taxonomy() or register_taxonomy_for_object_type()</li>
</ul>
<h4>Including Custom Taxonomies</h4>
<p>In the following example we include in our Post-Type a Taxonomy with two possibilities; own Tags and categories for Post-Type <em>Movies</em>, the classical tag, without hierarchy and one as category, tag with hierarchies.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> post_type_movies<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	register_post_type<span style="color: #009900;">&#40;</span>
                <span style="color: #0000ff;">'movies'</span><span style="color: #339933;">,</span> 
                <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                        <span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Movies'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
                        <span style="color: #0000ff;">'public'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
                        <span style="color: #0000ff;">'show_ui'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
                        <span style="color: #0000ff;">'supports'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                                     <span style="color: #0000ff;">'post-thumbnails'</span><span style="color: #339933;">,</span>
                                     <span style="color: #0000ff;">'excerpts'</span><span style="color: #339933;">,</span>
                                     <span style="color: #0000ff;">'trackbacks'</span><span style="color: #339933;">,</span>
                                     <span style="color: #0000ff;">'custom-fields'</span><span style="color: #339933;">,</span>
                                     <span style="color: #0000ff;">'comments'</span><span style="color: #339933;">,</span>
                                     <span style="color: #0000ff;">'revisions'</span><span style="color: #009900;">&#41;</span>
                <span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	register_taxonomy<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'actor'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'movies'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'hierarchical'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Actor'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
        register_taxonomy<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'production'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'movies'</span><span style="color: #339933;">,</span>
		<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                         <span style="color: #0000ff;">'hierarchical'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span>
			 <span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Production'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
			 <span style="color: #0000ff;">'query_var'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'production'</span><span style="color: #339933;">,</span>
			 <span style="color: #0000ff;">'rewrite'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'slug'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'production'</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_type_movies'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><img src="http://wpengineer.com/blog/wp-content/uploads/taxonomy-custom-post-type.png" alt="" title="taxonomy-custom-post-type" width="450" height="385" class="aligncenter size-full wp-image-1972" /></p>
<p>Definitely a very interesting and useful feature which provides many possibilities to play around with.<br />
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/custom-fields-in-your-feed/" rel="bookmark" title="Permanent Link: Custom Fields in your Feed" class="liinternal">Custom Fields in your Feed</a></li>
<li><a href="http://wpengineer.com/wordpress-3-0-custom-background-support/" rel="bookmark" title="Permanent Link: WordPress 3.0 Custom Background Support" class="liinternal">WordPress 3.0 Custom Background Support</a></li>
<li><a href="http://wpengineer.com/sort-posts-custom-fields/" rel="bookmark" title="Permanent Link: Sort Posts With The Help Of Custom Fields" class="liinternal">Sort Posts With The Help Of Custom Fields</a></li>
<li><a href="http://wpengineer.com/create-your-own-wordpress-login-design/" rel="bookmark" title="Permanent Link: Create Your Own WordPress Login Design" class="liinternal">Create Your Own WordPress Login Design</a></li>
<li><a href="http://wpengineer.com/numbering-your-comments-pingbacks-trackbacks-or-all/" rel="bookmark" title="Permanent Link: Numbering your comments, pingbacks, trackbacks or all" class="liinternal">Numbering your comments, pingbacks, trackbacks or all</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/impressions-of-custom-post-type/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>WordPress 3.0 Custom Background Support</title>
		<link>http://wpengineer.com/wordpress-3-0-custom-background-support/</link>
		<comments>http://wpengineer.com/wordpress-3-0-custom-background-support/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 08:22:34 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[WordPress News]]></category>
		<category><![CDATA[Background Image]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[Twenty Ten]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP3.0]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1964</guid>
		<description><![CDATA[
In Wordpress 3.0, it will have, additional to the Custom Header Image support, also a Custom Background Support. A first snapshot is in the current trunk. To use the functionality, the theme needs in  functions.php this line:

add_custom_background&#40;&#41;;

After that, there is in your backend under Appearance the menu Custom Background available.

After uploading an image, you [...]]]></description>
			<content:encoded><![CDATA[
<p>In Wordpress 3.0, it will have, additional to the Custom Header Image support, also a Custom Background Support. A first snapshot is in the current trunk. To use the functionality, the theme needs in  functions.php this line:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_custom_background<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>After that, there is in your backend under Appearance the menu Custom Background available.</p>
<p><img class="aligncenter size-full wp-image-1968" title="WordPress 3.0 Custom Background Step 1" src="http://wpengineer.com/blog/wp-content/uploads/wordpress-custom-background-step-1.jpg" alt="WordPress 3.0 Custom Background Step 1" width="400" height="320" /></p>
<p>After uploading an image, you have the option to activate "Tile the background" and delete the background image.</p>
<p><img class="aligncenter size-full wp-image-1967" title="WordPress 3.0 Custom Background Support Step 2" src="http://wpengineer.com/blog/wp-content/uploads/wordpress-custom-background-step-2.jpg" alt="WordPress 3.0 Custom Background Support Step 2" width="400" height="506" /></p>
<p>Here the result with the new Theme Twenty Ten.</p>
<p><img class="aligncenter size-full wp-image-1966" title="Theme Twenty Ten with Custom Background Support" src="http://wpengineer.com/blog/wp-content/uploads/wordpress-custom-background-frontend.jpg" alt="Theme Twenty Ten with Custom Background Support" width="400" height="202" /><br />
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/create-your-own-wordpress-login-design/" rel="bookmark" title="Permanent Link: Create Your Own WordPress Login Design" class="liinternal">Create Your Own WordPress Login Design</a></li>
<li><a href="http://wpengineer.com/custom-fields-in-your-feed/" rel="bookmark" title="Permanent Link: Custom Fields in your Feed" class="liinternal">Custom Fields in your Feed</a></li>
<li><a href="http://wpengineer.com/sort-posts-custom-fields/" rel="bookmark" title="Permanent Link: Sort Posts With The Help Of Custom Fields" class="liinternal">Sort Posts With The Help Of Custom Fields</a></li>
<li><a href="http://wpengineer.com/new-screenshots-of-wordpress-3-0/" rel="bookmark" title="Permanent Link: New Screenshots Of WordPress 3.0" class="liinternal">New Screenshots Of WordPress 3.0</a></li>
<li><a href="http://wpengineer.com/display-private-posts-to-logged-in-users/" rel="bookmark" title="Permanent Link: Display Private Posts to Logged in Users" class="liinternal">Display Private Posts to Logged in Users</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/wordpress-3-0-custom-background-support/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>WordPress: Useful Default Configuration Settings Via Plugin</title>
		<link>http://wpengineer.com/wordpress-useful-default-configuration-settings-via-plugin/</link>
		<comments>http://wpengineer.com/wordpress-useful-default-configuration-settings-via-plugin/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 11:24:41 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[options]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1957</guid>
		<description><![CDATA[
Everybody who installs WordPress quite often knows the problem: You always have to do the same adjustments, for example deleting the Hello World post. That cost time and money. Our friend Thomas Scholz alias toscho had a simple but genius idea, he puts all needed option settings in a Plugin. Just activate the Plugin, deactivate [...]]]></description>
			<content:encoded><![CDATA[
<p>Everybody who installs WordPress quite often knows the problem: You always have to do the same adjustments, for example deleting the Hello World post. That cost time and money. Our friend <a href="http://toscho.de/" title="Toscho Design" class="liexternal">Thomas Scholz</a> alias toscho had a simple but genius idea, he puts all needed option settings in a Plugin. Just activate the Plugin, deactivate it and delete it. Done!</p>
<p>You can adjust and expand the options as you like. A good overview is the wp-admin/options.php.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">/*
Plugin Name: Toscho's basic settings
Plugin URI: http://toscho.de/2010/wordpress-grundeinstellungen-per-plugin-setzen/
Description: Some useful default configuration settings. See 'wp-admin/options.php' for more options.
Version: 0.2
Author: Thomas Scholz
Author URI: http://toscho.de
*/</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> set_toscho_defaults<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$o</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'avatar_default'</span>            <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'blank'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'avatar_rating'</span>             <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'G'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'category_base'</span>             <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'/thema'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'comment_max_links'</span>         <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'comments_per_page'</span>         <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'date_format'</span>               <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'d.m.Y'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'default_ping_status'</span>       <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'closed'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'default_post_edit_rows'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">30</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'links_updated_date_format'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'j. F Y, H:i'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'permalink_structure'</span>       <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'/%year%/%postname%/'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'rss_language'</span>              <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'de'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'timezone_string'</span>           <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Etc/GMT-1'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'use_smilies'</span>               <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$o</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$k</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$v</span> <span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        update_option<span style="color: #009900;">&#40;</span><span style="color: #000088;">$k</span><span style="color: #339933;">,</span> <span style="color: #000088;">$v</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Delete dummy post and comment.</span>
    wp_delete_post<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    wp_delete_comment<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
register_activation_hook<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'set_toscho_defaults'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Here you can <a href="http://f.toscho.de/php-skripte/toscho_basic_settings-0.2.zip" title="Download toschos plugin" class="lizip">download</a> the Plugin by toscho.</p>
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/more-memory-for-wordpress-more-information-about-wordpress/" rel="bookmark" title="Permanent Link: More Memory For WordPress &#8211; More Information About WordPress" class="liinternal">More Memory For WordPress &#8211; More Information About WordPress</a></li>
<li><a href="http://wpengineer.com/theme-uninstaller/" rel="bookmark" title="Permanent Link: 5th Post Of Our Advent Calendar: Theme Uninstaller" class="liinternal">5th Post Of Our Advent Calendar: Theme Uninstaller</a></li>
<li><a href="http://wpengineer.com/wordpress-3-multisite-settings/" rel="bookmark" title="Permanent Link: WordPress 3.0 Multisite Settings" class="liinternal">WordPress 3.0 Multisite Settings</a></li>
<li><a href="http://wpengineer.com/quick-view-on-wordpress-settings/" rel="bookmark" title="Permanent Link: Quick View on WordPress Settings" class="liinternal">Quick View on WordPress Settings</a></li>
<li><a href="http://wpengineer.com/set-options-on-activation-themes/" rel="bookmark" title="Permanent Link: Set options on activation Themes" class="liinternal">Set options on activation Themes</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/wordpress-useful-default-configuration-settings-via-plugin/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>WordPress 3.0 Specific Author Templates</title>
		<link>http://wpengineer.com/wordpress-3-0-specific-author-templates/</link>
		<comments>http://wpengineer.com/wordpress-3-0-specific-author-templates/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 16:56:27 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[WordPress News]]></category>
		<category><![CDATA[author]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP3.0]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1958</guid>
		<description><![CDATA[
In WordPress 3.0 it will be possible to use specific author templates. The function get_author_template() has been expanded in wp-includes/theme.php.
Now you can create a author-michael.php or author-123.php, which will be called via the WordPress Template Hierarchy in connection to the author with user_nicename michael or ID 123. Basically the same funtionality as we known for [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://wpengineer.com/blog/wp-content/uploads/author-template.png" alt="WordPress 3.0 Author Template" title="WordPress 3.0 Author Template" width="300" height="200" class="alignleft size-full wp-image-1959" />In WordPress 3.0 it will be possible to use specific author templates. The function <strong>get_author_template()</strong> has been expanded in wp-includes/theme.php.</p>
<p>Now you can create a <strong>author-michael.php</strong> or <strong>author-123.php</strong>, which will be called via the WordPress Template Hierarchy in connection to the author with <strong>user_nicename</strong> michael or ID 123. Basically the same funtionality as we known for <a href="http://wpengineer.com/new-category-templates-in-wordpress-2-9/" class="liinternal">categories</a>.<br />
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/list-all-users-in-wordpress/" rel="bookmark" title="Permanent Link: List All Users in WordPress" class="liinternal">List All Users in WordPress</a></li>
<li><a href="http://wpengineer.com/wordpress-mu-embed-language-dependent-templates/" rel="bookmark" title="Permanent Link: WordPress MU &#8211; embed language-dependent templates" class="liinternal">WordPress MU &#8211; embed language-dependent templates</a></li>
<li><a href="http://wpengineer.com/new-category-templates-in-wordpress-2-9/" rel="bookmark" title="Permanent Link: New Category Templates in WordPress 2.9" class="liinternal">New Category Templates in WordPress 2.9</a></li>
<li><a href="http://wpengineer.com/perfect-wordpress-theme/" rel="bookmark" title="Permanent Link: 10 Checks to the Perfect WordPress theme" class="liinternal">10 Checks to the Perfect WordPress theme</a></li>
<li><a href="http://wpengineer.com/identify-authors-gravatars/" rel="bookmark" title="Permanent Link: Identify Authors With Gravatars" class="liinternal">Identify Authors With Gravatars</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/wordpress-3-0-specific-author-templates/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Load A Stylesheet Only If Use Gallery</title>
		<link>http://wpengineer.com/load-a-stylesheet-only-if-use-gallery/</link>
		<comments>http://wpengineer.com/load-a-stylesheet-only-if-use-gallery/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 13:43:34 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1949</guid>
		<description><![CDATA[
In relation to the better Gallery  it is actually not necessary to load the stylesheet if there is no gallery, so it is worth it to check in advance whether the gallery will be used in the post or not. For this you have to parse the post which can be done in two [...]]]></description>
			<content:encoded><![CDATA[
<p>In relation to the <a href="http://wpengineer.com/a-solution-for-the-wordpress-gallery/" better class="liinternal">better Gallery </a> it is actually not necessary to load the stylesheet if there is no gallery, so it is worth it to check in advance whether the gallery will be used in the post or not. For this you have to parse the post which can be done in two ways.<br />
<span id="more-1949"></span><br />
The classic solution is to parse the content and seek the short code, classic PHP <a href="http://php.net/manual/en/function.strstr.php" class="liexternal"><code>strstr</code></a>. Depending on the result it loads the stylesheet.<br />
<code>if ( strstr($post->post_content, '[gallery') )</code>.<br />
This obviously takes time and performance, what you really like to avoid. Thus, it is better if you can parse the post in advance. In this context, there is a <a href="http://wordpress.org/support/topic/350167#post-1344676" class="liwp">tread in the forum of WordPress</a>, which contains a very nice solution by <a href="http://w-shadow.com/" class="liexternal">WhiteShadow</a> which you can use to load the stylesheet.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// onyl css, when post has a gallery</span>
<span style="color: #000000; font-weight: bold;">function</span> gallery_stylesheet<span style="color: #009900;">&#40;</span><span style="color: #000088;">$posts</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$posts</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$posts</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$found</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$posts</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">stripos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_content</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'[gallery'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
			<span style="color: #000088;">$found</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$found</span><span style="color: #009900;">&#41;</span>
		wp_enqueue_style<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'gallery-stylesheet'</span><span style="color: #339933;">,</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'stylesheet_directory'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/gallery.css'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'screen'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$posts</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_posts'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'gallery_stylesheet'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>You can also use this to load scripts,</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// onyl js, when post has a gallery</span>
<span style="color: #000000; font-weight: bold;">function</span> my_script<span style="color: #009900;">&#40;</span><span style="color: #000088;">$posts</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$posts</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$posts</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$found</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$posts</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">stripos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_content</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'[my-script) )
			$found = true;
			break;
		}
&nbsp;
	if ($found)
		wp_enqueue_script( '</span>my<span style="color: #339933;">-</span>script<span style="color: #0000ff;">', get_bloginfo('</span>template_directory<span style="color: #0000ff;">') . '</span><span style="color: #339933;">/</span>js<span style="color: #339933;">/</span>my_script<span style="color: #339933;">.</span>js<span style="color: #0000ff;">', false, false, true );
&nbsp;
	return $posts;
}
add_action('</span>the_posts<span style="color: #0000ff;">', '</span>my_script<span style="color: #0000ff;">');</span></pre></div></div>

<p>For more information, to include JavaScript and CSS files, there is <a href="http://wpengineer.com/use-javascript-libraries-in-and-of-wordpress/">another post</a> about this topic.<br />
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/removing-wordpress-login-design/" rel="bookmark" title="Permanent Link: Removing WordPress Login Design" class="liinternal">Removing WordPress Login Design</a></li>
<li><a href="http://wpengineer.com/a-solution-for-the-wordpress-gallery/" rel="bookmark" title="Permanent Link: A Solution For The WordPress Gallery" class="liinternal">A Solution For The WordPress Gallery</a></li>
<li><a href="http://wpengineer.com/create-your-own-wordpress-login-design/" rel="bookmark" title="Permanent Link: Create Your Own WordPress Login Design" class="liinternal">Create Your Own WordPress Login Design</a></li>
<li><a href="http://wpengineer.com/use-constants-integrate-wordpress/" rel="bookmark" title="Permanent Link: Use Constants To Integrate WordPress In Other CMS" class="liinternal">Use Constants To Integrate WordPress In Other CMS</a></li>
<li><a href="http://wpengineer.com/pages-subpages-is-parent/" rel="bookmark" title="Permanent Link: Pages &#038; Subpages &#8211; Is Parent?" class="liinternal">Pages &#038; Subpages &#8211; Is Parent?</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/load-a-stylesheet-only-if-use-gallery/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Redirects To Another Page In WordPress Backend</title>
		<link>http://wpengineer.com/redirects-to-another-page-in-wordpress-backend/</link>
		<comments>http://wpengineer.com/redirects-to-another-page-in-wordpress-backend/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 10:52:55 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1945</guid>
		<description><![CDATA[
WordPress allows using a function, to simple redirect to a URL, the function wp_redirect() enables to specify an address and a status.
This makes it easy to realize a forward even in the backend of WordPress. Two different examples will illustrate this. The difference lies in the query of the URL, which will be checked.


/**
 * [...]]]></description>
			<content:encoded><![CDATA[
<p>WordPress allows using a function, to simple redirect to a URL, the <a href="http://codex.wordpress.org/Function_Reference/wp_redirect" class="liwp">function <code>wp_redirect()</code></a> enables to specify an address and a status.</p>
<p>This makes it easy to realize a forward even in the backend of WordPress. Two different examples will illustrate this. The difference lies in the query of the URL, which will be checked.<br />
<span id="more-1945"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * Redirects to another page, with a workaround for the IIS Set-Cookie bug.
 *
 * @link http://support.microsoft.com/kb/q176113/
 * @since 1.5.1
 * @uses apply_filters() Calls 'wp_redirect' hook on $location and $status.
 *
 * @param string $location The path to redirect to
 * @param int $status Status code to use
 * @return bool False if $location is not set
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> wp_redirect<span style="color: #009900;">&#40;</span><span style="color: #000088;">$location</span><span style="color: #339933;">,</span> <span style="color: #000088;">$status</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">302</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>In our first example, we use the content of the variable <code>$pagenow</code>, which always contains the page name and so allows a clean check. In both functions, the function <code>admin_url()</code> is queried, because that is only since version 2.6 in the core of WordPress. Depending on the version, you can save this query and also there are other functions of this kind, which facilitate the setting of the address, see <a href="http://wpengineer.com/wordpress-return-url/" class="liinternal">this Post</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> fb_redirect_1<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$pagenow</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'plugins.php'</span> <span style="color: #339933;">===</span> <span style="color: #000088;">$pagenow</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_url'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			wp_redirect<span style="color: #009900;">&#40;</span> admin_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'edit-comments.php'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
			wp_redirect<span style="color: #009900;">&#40;</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/wp-admin/'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'edit-comments.php'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
	add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'admin_menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'fb_redirect_1'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The second option is a little different and checks on the URL to the global variable <code>$ _SERVER</code> and thereby the key <code>REQUEST_URI</code>. This is useful for example when querying the dashboard in the admin area, because this is not always given back with a value of <code>$pagenow</code>, means you reach the Dashbaord partly via <code>index.php</code>, or directly via <code>wp-admin/</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> fb_redirect_2<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#wp-admin/?(index.php)?$#'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_url'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			wp_redirect<span style="color: #009900;">&#40;</span> admin_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'edit-comments.php'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
			wp_redirect<span style="color: #009900;">&#40;</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/wp-admin/'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'edit-comments.php'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
	add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'admin_menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'fb_redirect_2'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/wordpress-28-widgets-options-page/" rel="bookmark" title="Permanent Link: WordPress 2.8 Widgets Options Page &#8211; First Screenshot!" class="liinternal">WordPress 2.8 Widgets Options Page &#8211; First Screenshot!</a></li>
<li><a href="http://wpengineer.com/correct-pagination-with-get_posts/" rel="bookmark" title="Permanent Link: Correct Pagination with get_posts" class="liinternal">Correct Pagination with get_posts</a></li>
<li><a href="http://wpengineer.com/wordpress-28-insights-favorite-actions/" rel="bookmark" title="Permanent Link: WordPress 2.8 Insights, The Favorite Actions" class="liinternal">WordPress 2.8 Insights, The Favorite Actions</a></li>
<li><a href="http://wpengineer.com/wordpress-27-optimize-the-management/" rel="bookmark" title="Permanent Link: WordPress 2.7 Optimize The Management" class="liinternal">WordPress 2.7 Optimize The Management</a></li>
<li><a href="http://wpengineer.com/wordpress-28-body_class-automatic_feed_links/" rel="bookmark" title="Permanent Link: WordPress 2.8 body_class, automatic_feed_links" class="liinternal">WordPress 2.8 body_class, automatic_feed_links</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/redirects-to-another-page-in-wordpress-backend/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress 3.0 Multisite Settings</title>
		<link>http://wpengineer.com/wordpress-3-multisite-settings/</link>
		<comments>http://wpengineer.com/wordpress-3-multisite-settings/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 18:51:17 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[WordPress News]]></category>
		<category><![CDATA[Multisite]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP3.0]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1953</guid>
		<description><![CDATA[
Exclusively 2 Screenshots  of the new WordPress 3.0 Multisite Settings. You can find them under Options-&#62;Network:

After you set the settings, you receive in a second step the content for wp-config.php and .htaccess. Additionally you have to create the subfolder blogs.dir in wp-content , where you put the media-files for each blog.

Since WordPress 3.0 is [...]]]></description>
			<content:encoded><![CDATA[
<p>Exclusively 2 Screenshots  of the new WordPress 3.0 Multisite Settings. You can find them under Options-&gt;Network:<br />
<img class="aligncenter size-full wp-image-1955" title="WordPress 3.0 Network settings step 1" src="http://wpengineer.com/blog/wp-content/uploads/wordpress-3.0-network-settings.jpg" alt="WordPress 3.0 Network settings step 1" width="600" height="476" /><br />
After you set the settings, you receive in a second step the content for wp-config.php and .htaccess. Additionally you have to create the subfolder blogs.dir in wp-content , where you put the media-files for each blog.</p>
<p><img class="aligncenter size-full wp-image-1956" title="WordPress 3.0 Network settings step 2" src="http://wpengineer.com/blog/wp-content/uploads/wordpress-3.0-network-settings-1.jpg" alt="WordPress 3.0 Network settings step 2" width="600" height="596" /></p>
<p>Since WordPress 3.0 is still in development, there might be many changes until the final release.<br />
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/quick-view-on-wordpress-settings/" rel="bookmark" title="Permanent Link: Quick View on WordPress Settings" class="liinternal">Quick View on WordPress Settings</a></li>
<li><a href="http://wpengineer.com/wordpress-useful-default-configuration-settings-via-plugin/" rel="bookmark" title="Permanent Link: WordPress: Useful Default Configuration Settings Via Plugin" class="liinternal">WordPress: Useful Default Configuration Settings Via Plugin</a></li>
<li><a href="http://wpengineer.com/new-screenshots-of-wordpress-3-0/" rel="bookmark" title="Permanent Link: New Screenshots Of WordPress 3.0" class="liinternal">New Screenshots Of WordPress 3.0</a></li>
<li><a href="http://wpengineer.com/wordpress-updates-via-ftp-on-windows-xampp-installations/" rel="bookmark" title="Permanent Link: WordPress Updates via FTP on Windows XAMPP installations" class="liinternal">WordPress Updates via FTP on Windows XAMPP installations</a></li>
<li><a href="http://wpengineer.com/comment-pagination-and-reply-depth-in-wordpress-27/" rel="bookmark" title="Permanent Link: Comment Pagination And Reply Depth In WordPress 2.7" class="liinternal">Comment Pagination And Reply Depth In WordPress 2.7</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/wordpress-3-multisite-settings/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Disable HTML Editor In WordPress</title>
		<link>http://wpengineer.com/disable-html-editor-wordpress/</link>
		<comments>http://wpengineer.com/disable-html-editor-wordpress/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 10:29:48 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[disable]]></category>
		<category><![CDATA[HTML Editor]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1946</guid>
		<description><![CDATA[
In contrast to the visual editor in WordPress, you can not disable the HTML editor. WordPress does not provide a user setting or a global option. Also, there is no hook, to disable the HTML tab above the editor when writing posts or pages.

But there are users who do not need this tab and like [...]]]></description>
			<content:encoded><![CDATA[
<p>In contrast to the visual editor in WordPress, you can not disable the HTML editor. WordPress does not provide a user setting or a global option. Also, there is no hook, to disable the HTML tab above the editor when writing posts or pages.</p>
<p><img src="http://wpengineer.com/blog/wp-content/uploads/wp-only-visual.png" alt="" title="wp-only-visual" width="392" height="83" class="aligncenter size-full wp-image-1947" /></p>
<p>But there are users who do not need this tab and like to deactivate it globally. Therefore, I have a solution, how you can disable it in your editor.<br />
Alternatively, you can use the Plugin <a href="http://bueltge.de/wordpress-admin-theme-adminimize/674/" class="liexternal">Adminimize</a>, which offers such a possibility per role, just put it in the settings.<br />
<span id="more-1946"></span><br />
Since there is no hook or an option, you have to hide the area via CSS. This has the disadvantage that, while the tab is no longer visible, but if the cookie or a Plugin says to enable HTML, the editor has a problem showing us either the two editor tabs simultaneously, or no buttons. You need to explicitly set the editor.</p>
<p>In our first step we hide via CSS the tab and the buttons of the HTML editor. This stylesheet must be loaded in the admin, while you can go several ways: either you write it in the header (Hook <code>admin_head</code>) or load an external css via function <code>wp_enqueue_style()</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#editor-toolbar</span> <span style="color: #cc00cc;">#edButtonHTML</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#quicktags</span> <span style="color: #00AA00;">&#123;</span>
       <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The better way is you hide the tab via JavaScript and load this on the Hook <code>admin_footer</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
       $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#edButtonHTML&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>In a further step you must set the default editor, therefore you can use a hook and function, which sets the default to the value <code>tinymce</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> my_default_editor<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$r</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'tinymce'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// html or tinymce</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$r</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_default_editor'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'my_default_editor'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Alternatively, a snippet for the implementation in Plugins or Themes.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_default_editor'</span><span style="color: #339933;">,</span> <span style="color: #990000;">create_function</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'return &quot;tinymce&quot;;'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/customize-wordpress-wysiwyg-editor/" rel="bookmark" title="Permanent Link: Customize WordPress WYSIWYG Editor" class="liinternal">Customize WordPress WYSIWYG Editor</a></li>
<li><a href="http://wpengineer.com/support-in-wordpress-for-relcanonical/" rel="bookmark" title="Permanent Link: 2nd Door Of Our Advent Calendar &#8211; Support in WordPress for rel=&#8221;canonical&#8221;" class="liinternal">2nd Door Of Our Advent Calendar &#8211; Support in WordPress for rel=&#8221;canonical&#8221;</a></li>
<li><a href="http://wpengineer.com/disable-wordpress-feed/" rel="bookmark" title="Permanent Link: Disable WordPress Feed" class="liinternal">Disable WordPress Feed</a></li>
<li><a href="http://wpengineer.com/use-metaboxes-in-your-theme-or-plugin/" rel="bookmark" title="Permanent Link: Use Metaboxes In Your Theme Or Plugin" class="liinternal">Use Metaboxes In Your Theme Or Plugin</a></li>
<li><a href="http://wpengineer.com/disable-flash-uploader/" rel="bookmark" title="Permanent Link: Disable Flash Uploader" class="liinternal">Disable Flash Uploader</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/disable-html-editor-wordpress/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Help To Raise Money For Haiti!</title>
		<link>http://wpengineer.com/help-to-raise-money-for-haiti/</link>
		<comments>http://wpengineer.com/help-to-raise-money-for-haiti/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 17:25:40 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[WPengineer Misc]]></category>
		<category><![CDATA[Donation]]></category>
		<category><![CDATA[Earthquake]]></category>
		<category><![CDATA[Haiti]]></category>
		<category><![CDATA[Spend]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1950</guid>
		<description><![CDATA[
Let's Do Something!
You all probably know what happened in Haiti, we just don't want to stand on the sidelines without doing anything. We want HELP! 
Micha, Frank and I will spend 50 Euros each. Also Frank added his complete donations in 2009 (almost 150 Euros), he got from users for his Plugins plus he adds [...]]]></description>
			<content:encoded><![CDATA[
<h3>Let's Do Something!</h3>
<p>You all probably know what happened in Haiti, we just don't want to stand on the sidelines without doing anything. We want HELP! </p>
<p>Micha, Frank and I will spend 50 Euros each. Also Frank added his complete donations in 2009 (almost 150 Euros), he got from users for his Plugins plus he adds the same amount from his private account. And he started a fund-raising campaign on his German blog today, which brought in 200 Euros so far. So we have 650 Euros in total. We know, it's not much, but maybe with your help, we can get even more for our donation account. We would greatly appreciate your donation to help the people in Haiti. </p>
<p>Just transfer, whatever amount you like, to the account below and we will make sure it will go to the people in need!</p>
<p>The victims will be very thankful for every penny and <strong>we will show our appreciation with a list of the ten highest private donations and 10 highest donations from our sponsors or other businesses in a coming post</strong>. If you are a private person or a company, we will mention your name or company on a coming post next week! Of course, only if you want to.</p>
<div xmlns:cc="http://creativecommons.org/ns#" about="http://www.flickr.com/photos/giladlotan/4272423482/"><a href="http://www.flickr.com/photos/giladlotan/" rel="cc:attributionURL" class="liexternal">http://www.flickr.com/photos/giladlotan/</a> / <a href="http://creativecommons.org/licenses/by-nc/2.0/" rel="license" class="liexternal">CC BY-NC 2.0</a></div>
<p><a href="http://wpengineer.com/blog/wp-content/uploads/Haiti-Earthquake.jpg" class="liimagelink"><img src="http://wpengineer.com/blog/wp-content/uploads/Haiti-Earthquake-600x422.jpg" alt="" title="Haiti-Earthquake" width="600" height="422" class="aligncenter size-large wp-image-1951" /></a></p>
<div class="aligncenter">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="11169188">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/de_DE/i/scr/pixel.gif" width="1" height="1"><br />
</form>
</div>
<p>Please let us be proud of the WordPress community and join us to help!<br />
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/how-to-start-blogging/" rel="bookmark" title="Permanent Link: How To Start Blogging?" class="liinternal">How To Start Blogging?</a></li>
<li><a href="http://wpengineer.com/wordpress-useful-default-configuration-settings-via-plugin/" rel="bookmark" title="Permanent Link: WordPress: Useful Default Configuration Settings Via Plugin" class="liinternal">WordPress: Useful Default Configuration Settings Via Plugin</a></li>
<li><a href="http://wpengineer.com/blog-action-day-poverty-parallels-between-webdesign-and-real-world/" rel="bookmark" title="Permanent Link: Blog Action Day: Poverty &#8211; Parallels Between Webdesign And Real World!" class="liinternal">Blog Action Day: Poverty &#8211; Parallels Between Webdesign And Real World!</a></li>
<li><a href="http://wpengineer.com/amazed-by-such-a-great-support-and-feedback/" rel="bookmark" title="Permanent Link: Amazed By Such A Great Support And Feedback!" class="liinternal">Amazed By Such A Great Support And Feedback!</a></li>
<li><a href="http://wpengineer.com/improve-seo-in-wordpress-with-the-wpseo-wordpress-plugin/" rel="bookmark" title="Permanent Link: Improve SEO In WordPress With The wpSEO WordPress Plugin" class="liinternal">Improve SEO In WordPress With The wpSEO WordPress Plugin</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/help-to-raise-money-for-haiti/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Contactable &#8211; Contact Form Easy with WordPress</title>
		<link>http://wpengineer.com/contactable-contaktform-easy-with-wordpress/</link>
		<comments>http://wpengineer.com/contactable-contaktform-easy-with-wordpress/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 11:07:45 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Contact Form]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1936</guid>
		<description><![CDATA[
The integration of a contact form in WordPress usually begins with a search of a Plugin and often ends with a great effort too. Since scripts are loaded on all pages and posts - only to be integrated on one side of a form. The blog is only as good as his technician and I [...]]]></description>
			<content:encoded><![CDATA[
<p>The integration of a contact form in WordPress usually begins with a search of a Plugin and often ends with a great effort too. Since scripts are loaded on all pages and posts - only to be integrated on one side of a form. The blog is only as good as his technician and I would like to show a very simple way how to integrate a contact form into your own blog without much knowledge.<br />
<span id="more-1936"></span><br />
The solution is not the holy grail, but it shows how easy and resource friendly it is to integrate a contact form in WordPress.<br />
So that we can devote ourselves fully to the integration, and we do not have to deal with PHP and JavaScript, I'll use for the example the great form Plugin <a href="http://theodin.co.uk/blog/ajax/contactable-jquery-plugin.html" class="liexternal"><strong>contactable</strong></a> for jQuery by Philip Beel. This Plugin brings all the necessary files and only needs to be integrated - very easy to use and you can adapt to your own needs. Documentation can be found on the <a href="http://theodin.co.uk/blog/ajax/contactable-jquery-plugin.html" class="liexternal">Plugin site</a>. For the integration of the form I use the standard Kubrick theme on WordPress, but you can use it in any other theme.</p>
<p><img src="http://wpengineer.com/blog/wp-content/uploads/contactable.png" alt="" title="contactable" width="450" height="316" class="aligncenter size-full wp-image-1937" /></p>
<p>WordPress provides the jQuery library. The calling of all the necessary files and scripts will take place within the template, which takes care to output the contact form. This call we'll do with the functions of WordPress - so we make sure that the files really are loaded only once. WordPress takes care of the correct order and of the dependencies.</p>
<p>First we create a template, I call it <code>contact-page.php</code> and it must be stored in the folder of your themes. This includes calling the necessary scripts and the associated stylesheets. Basically, you only need these four calls to store in the <code>page.php</code> of your theme, assign a new name for the file and put a comment to get recognized by WordPress (at the beginning the file). The following describes the syntax of the example of <code>page.php</code> in the default theme Kubrick.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
 * Template Name: Contact Page
 *
 * @package WordPress
 * @subpackage Default_Theme
 */</span>
&nbsp;
wp_enqueue_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'jquery.contactable'</span><span style="color: #339933;">,</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/contactable/jquery.contactable.js'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">,</span> <span style="color:#800080;">3.1</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
wp_enqueue_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'jquery.validate'</span><span style="color: #339933;">,</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/contactable/jquery.validate.pack.js'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">,</span> <span style="color:#800080;">3.1</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
wp_enqueue_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'my_contactable'</span><span style="color: #339933;">,</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/contactable/my_contactable.js'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">,</span> <span style="color:#800080;">3.1</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
wp_enqueue_style<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'contactable'</span><span style="color: #339933;">,</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/contactable/contactable.css'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
    &lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot; role=&quot;main&quot;&gt;
&nbsp;
        &lt;div class=&quot;post&quot; id=&quot;post-<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
        &lt;h2&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h2&gt;
&nbsp;
            &lt;div class=&quot;entry&quot;&gt;
                <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_content<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;p class=&quot;serif&quot;&gt;Read the rest of this page &amp;raquo;&lt;/p&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
                &lt;div id=&quot;mycontactform&quot;&gt; &lt;/div&gt;
&nbsp;
            &lt;/div&gt;
        &lt;/div&gt;
&nbsp;
    &lt;/div&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> get_sidebar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> get_footer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>As you can see in the syntax, I have saved all files of the jQuery Form Plugnis in the folder <code>contactable</code> in the folder of the theme. Therefore, your paths may have to be adjusted. Right now it looks like this in my theme:</p>
<ul>
<li>
default
<ul>
<li>contactable
<ul>
<li>jquery.contactable.js</li>
<li>jquery.validate.pack.jss</li>
<li>my.contactable.js</li>
<li>contactable.css</li>
</ul>
</li>
<li>style.css</li>
<li>contact-page.php</li>
<li>...</li>
</ul>
</li>
</ul>
<p>I only added the file <code>my.contactable.js</code>; this takes care to call the form and can be filled with parameters. Their content is as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>ready<span style="color: #009900;">&#40;</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#mycontactform'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>contactable<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
        name<span style="color: #339933;">:</span> <span style="color: #0000ff;">'Name'</span><span style="color: #339933;">,</span>
        email<span style="color: #339933;">:</span> <span style="color: #0000ff;">'E-Mail'</span><span style="color: #339933;">,</span>
        message <span style="color: #339933;">:</span> <span style="color: #0000ff;">'Message'</span><span style="color: #339933;">,</span>
        recipient<span style="color: #339933;">:</span> <span style="color: #0000ff;">'example@domain.com'</span><span style="color: #339933;">,</span>
        subject<span style="color: #339933;">:</span> <span style="color: #0000ff;">'Contact Form'</span><span style="color: #339933;">,</span>
        recievedMsg <span style="color: #339933;">:</span> <span style="color: #0000ff;">'Thanks for your message.'</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>If all files are stored and are adapted to your needs, then you only need to create a page in the admin area of WordPress. Give the page a name, if you want fill it with content and select a template - in our case the <strong>Contact Page</strong>. After saving the page, you should view it in the front end and click on the small label and the form will appear and can be filled out.</p>
<p>Through the call with the help of WordPress functions and the right parameters, the scripts are now integrated  in the footer of the site. The jQuery library will not be called, it will be added by WordPress if it is not there yet, by the dependence of the parameters for the key <code>jquery</code>. By using a template with all calls, all the scripts and stylesheets are only involved if the page is called by WordPress. If you want the form snippets on all sides, you can insert the call in the <code>header.php</code> or <code>functions.php</code>.</p>
<p><img src="http://wpengineer.com/blog/wp-content/uploads/contactable-ocss.png" alt="" title="contactable-ocss" width="450" height="533" class="aligncenter size-full wp-image-1938" /></p>
<p>You do not want to use this feature, then either don't use that CSS, or add your own design or you can fit the JS to your own needs. The same applies for additional fields in the form, this must be adapted to the content of the files.<br />
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/easy-way-for-advertisement-in-wordpress/" rel="bookmark" title="Permanent Link: Easy Way For Advertisement In WordPress" class="liinternal">Easy Way For Advertisement In WordPress</a></li>
<li><a href="http://wpengineer.com/identify-authors-gravatars/" rel="bookmark" title="Permanent Link: Identify Authors With Gravatars" class="liinternal">Identify Authors With Gravatars</a></li>
<li><a href="http://wpengineer.com/customize-your-wordpress-feeds/" rel="bookmark" title="Permanent Link: Customize Your WordPress-Feeds" class="liinternal">Customize Your WordPress-Feeds</a></li>
<li><a href="http://wpengineer.com/change-the-wordpress-message/" rel="bookmark" title="Permanent Link: Change the WordPress Message" class="liinternal">Change the WordPress Message</a></li>
<li><a href="http://wpengineer.com/disable-wordpress-feed/" rel="bookmark" title="Permanent Link: Disable WordPress Feed" class="liinternal">Disable WordPress Feed</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/contactable-contaktform-easy-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Exclude A Category From Turn Off Comments Automatically</title>
		<link>http://wpengineer.com/exclude-category-from-turnoff-comments-automatically/</link>
		<comments>http://wpengineer.com/exclude-category-from-turnoff-comments-automatically/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 06:43:27 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[turn off]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1944</guid>
		<description><![CDATA[
Thanks to our post New Ideas For 2010? Now It’s Your Turn! we got an email form one of our loyal sponsors Chris Coyier.

Hey WP Engineer folks!
I have a little issue I'm trying to resolve on CSS-Tricks, regarding comments. In my discussion settings, I have it set to automatically turn off comments on everything after [...]]]></description>
			<content:encoded><![CDATA[
<p>Thanks to our post <a href="http://wpengineer.com/new-ideas-for-2010-now-its-your-turn/" class="liinternal">New Ideas For 2010? Now It’s Your Turn!</a> we got an email form one of our loyal sponsors <a href="http://css-tricks.com/" class="liexternal">Chris Coyier</a>.<br />
<span id="more-1944"></span></p>
<blockquote><p>Hey WP Engineer folks!</p>
<p>I have a little issue I'm trying to resolve on <a href="http://css-tricks.com" class="liexternal">CSS-Tricks</a>, regarding comments. In my discussion settings, I have it set to automatically turn off comments on everything after one-month. However, on certain things, specifically the snippets pages which all share a common page template, I want the comments to be left on forever.<br />
This seems like the job for some fancy functions.php work that you guys are the masters at <img src='http://wpengineer.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></blockquote>
<p>Ok Chris, here is our solution (copy the code in your functions.php and change the $cat values):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * Close comments on an old post.  Hooked to comments_open and pings_open.
 * small modifications on the default functions of WordPress
 *
 * @param bool $open Comments open or closed
 * @param int $post_id Post ID
 * @param int $cat Category ID (cat_ID), set '' or empty for all categories
 * @param int $days_old Days to close comments, set '' for use value from settings
 * @return bool $open
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> wpe_close_comments_for_old_post<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$open</span><span style="color: #339933;">,</span> <span style="color: #000088;">$post_id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$cat</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$days_old</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$open</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$open</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> in_category<span style="color: #009900;">&#40;</span><span style="color: #000088;">$cat</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$open</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">''</span> <span style="color: #339933;">===</span> <span style="color: #000088;">$days_old</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$days_old</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'close_comments_days_old'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$days_old</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$open</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$post</span> <span style="color: #339933;">=</span> get_post<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post_id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_date_gmt</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$days_old</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">24</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">60</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">60</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$open</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'comments_open'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wpe_close_comments_for_old_post'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'pings_open'</span><span style="color: #339933;">,</span>    <span style="color: #0000ff;">'wpe_close_comments_for_old_post'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Thanks Chris for your idea and please send us an email if you also have a nice idea how we could make WordPress even better.<br />
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/exclude-subcategories-in-a-loop/" rel="bookmark" title="Permanent Link: Exclude Subcategories in a Loop" class="liinternal">Exclude Subcategories in a Loop</a></li>
<li><a href="http://wpengineer.com/customize-your-wordpress-feeds/" rel="bookmark" title="Permanent Link: Customize Your WordPress-Feeds" class="liinternal">Customize Your WordPress-Feeds</a></li>
<li><a href="http://wpengineer.com/quick-tipps-for-wordpress-query/" rel="bookmark" title="Permanent Link: Quick Tipps For WordPress Query" class="liinternal">Quick Tipps For WordPress Query</a></li>
<li><a href="http://wpengineer.com/related-posts-on-category/" rel="bookmark" title="Permanent Link: Related Posts on Category" class="liinternal">Related Posts on Category</a></li>
<li><a href="http://wpengineer.com/new-category-templates-in-wordpress-2-9/" rel="bookmark" title="Permanent Link: New Category Templates in WordPress 2.9" class="liinternal">New Category Templates in WordPress 2.9</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/exclude-category-from-turnoff-comments-automatically/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Display Always All Subpages in Sidebar</title>
		<link>http://wpengineer.com/display-always-subpages-in-sidebar/</link>
		<comments>http://wpengineer.com/display-always-subpages-in-sidebar/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 07:09:01 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[sidebar]]></category>
		<category><![CDATA[subpages]]></category>
		<category><![CDATA[template tag]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1942</guid>
		<description><![CDATA[

We hope you had a great start in 2010 and some relaxing holidays the last couple days. Our first post in 2010 is about displaying subpages in a sidebar. Anyone who uses WordPress for company websites, has mostly to do with static pages that are in an hierarchical tree. To access these pages for the [...]]]></description>
			<content:encoded><![CDATA[
<p>
We hope you had a great start in 2010 and some relaxing holidays the last couple days. Our first post in 2010 is about displaying subpages in a sidebar. Anyone who uses WordPress for company websites, has mostly to do with static pages that are in an hierarchical tree. To access these pages for the user, there are many possibilities.</p>
<p>In this article I want to show an example in which are the main pages in a horizontal navigation. The related sub-pages are displayed in the sidebar when you click on the main page.</p>
<p><span id="more-1942"></span></p>
<p>For better understanding we take the following page structure:</p>
<ul>
<li>Home</li>
<li>Software
<ul>
<li>Image Editor
<ul>
<li>Adobe Photoshop</li>
<li>Gimp</li>
</ul>
</li>
<li>Content Managment Systems
<ul>
<li>WordPress</li>
<li>Drupal</li>
<li>Joomla</li>
</ul>
</li>
</ul>
</li>
<li>Hardware</li>
<li>About us</li>
</ul>
<p>The pages Home, Software, Hardware and About us are in the horizontal navigation. When the user clicks on Software, for example, all the subpages of Software should be shown in the sidebar.</p>
<p>WordPress provides for such a task the template tag <strong>wp_list_pages()</strong> with several parameters. Since we don't want to display all pages, only the parameter <strong>child_of</strong> is interesting for our purpose. The parameter <strong>child_of</strong> followed by an ID lists all subpages of the current page, if there exist subpages.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'child_of='</span><span style="color: #339933;">.</span>get_the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;title_li=&lt;h5&gt;'</span><span style="color: #339933;">.</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Pages'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/h5&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Now we come to the real problem. If you click on Content Management Systems in the sidebar, only the pages WordPress, Drupal and Joomla will be displayed. The Parent Pages are gone. Logically, since it displays only the children of the current page, which is Content Management Systems. But we always like to have to top page displayed too. Fortunately there is a function <strong>get_post_ancestors</strong>, which returns all parent pages in an array. Try the following:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$my_page</span> <span style="color: #339933;">=</span> get_the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$anchestors</span> <span style="color: #339933;">=</span> get_post_ancestors<span style="color: #009900;">&#40;</span><span style="color: #000088;">$my_page</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$anchestors</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// click on Software</span>
<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// click on Content Management Systems</span>
<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=&gt;</span>  string<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #0000ff;">&quot;63&quot;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">// 63 is the ID of Software</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// click on WordPress</span>
<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=&gt;</span>  string<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #0000ff;">&quot;65&quot;</span> <span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=&gt;</span>  string<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #0000ff;">&quot;63&quot;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">// 65 iis the ID of WordPress</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>This would go on forever, even in more deeply nested hierarchy. Important for us are 2 things: the top page is always at the end of the array and it can return an empty array. So we just go to the end of the array and for the case that there is no parent page, we display all the subpages of this page. We write a function in our <code>functions.php</code> because it is easier to maintain, and may also be used in several sidebars:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> wpe_highest_ancestor<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$ancestors</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ancestors</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$page_ancestors</span> <span style="color: #339933;">=</span> <span style="color: #990000;">end</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$ancestors</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$page_ancestors</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$child_of</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$page_ancestors</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$child_of</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$child_of</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Now we use this function in our sidebar:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;ul class=&quot;sidebar&quot;&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'child_of='</span> <span style="color: #339933;">.</span> wpe_highest_ancestor<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;</pre></div></div>

<p>If you want to have the name of the top-level page in the sidebar, you can use the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;ul class=&quot;sidebar&quot;&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #000088;">$child_of</span> <span style="color: #339933;">=</span> wpe_highest_ancestor<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'child_of='</span><span style="color: #339933;">.</span><span style="color: #000088;">$child_of</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;title_li=&lt;h5&gt;'</span><span style="color: #339933;">.</span>esc_attr<span style="color: #009900;">&#40;</span>get_the_title<span style="color: #009900;">&#40;</span><span style="color: #000088;">$child_of</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/h5&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;</pre></div></div>

<p>As you can see, it is relatively easy to achieve appropriate solutions with WordPress.</p>
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/wordpress-and-register_sidebar/" rel="bookmark" title="Permanent Link: WordPress and register_sidebar" class="liinternal">WordPress and register_sidebar</a></li>
<li><a href="http://wpengineer.com/check-for-widgets-in-widget-areas/" rel="bookmark" title="Permanent Link: Check for Widgets in Widget-Areas" class="liinternal">Check for Widgets in Widget-Areas</a></li>
<li><a href="http://wpengineer.com/support-wpengineer/" rel="bookmark" title="Permanent Link: Support WPEngineer!" class="liinternal">Support WPEngineer!</a></li>
<li><a href="http://wpengineer.com/wordpress-widget-areas-with-description/" rel="bookmark" title="Permanent Link: WordPress Widget-Areas with Description" class="liinternal">WordPress Widget-Areas with Description</a></li>
<li><a href="http://wpengineer.com/quick-tipps-for-wordpress-query/" rel="bookmark" title="Permanent Link: Quick Tipps For WordPress Query" class="liinternal">Quick Tipps For WordPress Query</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/display-always-subpages-in-sidebar/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>New Ideas For 2010? Now It&#8217;s Your Turn!</title>
		<link>http://wpengineer.com/new-ideas-for-2010-now-its-your-turn/</link>
		<comments>http://wpengineer.com/new-ideas-for-2010-now-its-your-turn/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 15:33:35 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[WPengineer Misc]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[Happy New Year]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1941</guid>
		<description><![CDATA[
We wish all our readers a Happy, Successful and Healthy New Year! We hope you enjoyed WP Engineer 2009 and you will keep reading our blog in the common years! To make WP Engineer more interesting for you, we would like to hear from you, what you like to read on our blog!

2009 past by [...]]]></description>
			<content:encoded><![CDATA[
<p>We wish all our readers a Happy, Successful and Healthy New Year! We hope you enjoyed WP Engineer 2009 and you will keep reading our blog in the common years! To make WP Engineer more interesting for you, we would like to hear from you, what you like to read on our blog!<br />
<span id="more-1941"></span><br />
2009 past by very fast and the number of our daily visitors grew very fast too, thanks to everyone! For all your comments, ideas, suggestions, criticism and compliments. We greatly enjoyed providing you tips and tricks about WordPress. And we would greatly appreciate if you can provide us with new ideas and suggestions what we could write about in 2010. We like to have a user driven content - unique, new, interesting, helpful and informative posts, which the vast majority of our readers find useful and worth reading. So leave your ideas in our comment area and we will try to accomplish your wishes.</p>
<p>We also like to thank our sponsors and guest authors, if you like to be one of them, please <a href="mailto:info@wpengineer.com" class="limailto">contact us</a> and we will get in touch with you. Also thanks to everyone that our Advent Calendar was a huge success! Without the help of our readers, guest authors and sponsors we wouldn 't have had such a success with it!</p>
<p>We wish everyone a Happy New Year!</p>
<p>Alex - Frank - Micha</p>
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/exclude-category-from-turnoff-comments-automatically/" rel="bookmark" title="Permanent Link: Exclude A Category From Turn Off Comments Automatically" class="liinternal">Exclude A Category From Turn Off Comments Automatically</a></li>
<li><a href="http://wpengineer.com/display-always-subpages-in-sidebar/" rel="bookmark" title="Permanent Link: Display Always All Subpages in Sidebar" class="liinternal">Display Always All Subpages in Sidebar</a></li>
<li><a href="http://wpengineer.com/wordpress-useful-default-configuration-settings-via-plugin/" rel="bookmark" title="Permanent Link: WordPress: Useful Default Configuration Settings Via Plugin" class="liinternal">WordPress: Useful Default Configuration Settings Via Plugin</a></li>
<li><a href="http://wpengineer.com/wordpress-admin-ui-ideas/" rel="bookmark" title="Permanent Link: WordPress Admin UI Ideas" class="liinternal">WordPress Admin UI Ideas</a></li>
<li><a href="http://wpengineer.com/use-wordpress-27-offline/" rel="bookmark" title="Permanent Link: Use WordPress 2.7 Offline" class="liinternal">Use WordPress 2.7 Offline</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/new-ideas-for-2010-now-its-your-turn/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>24th Door &#8211; The WPE Quit Smoking Widget</title>
		<link>http://wpengineer.com/24th-door-the-wpe-quit-smoking-widget/</link>
		<comments>http://wpengineer.com/24th-door-the-wpe-quit-smoking-widget/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 07:12:19 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[Widget]]></category>
		<category><![CDATA[Widget API]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1918</guid>
		<description><![CDATA[
For the last door in our Advent Calendar I had something special in mind. This year is coming to an end and I'm sure some of our readers want to quit smoking next year. To support their goal, I created a WP Engineer Quit Smoking Widget.  

Here a screenshot of all setting possibilities:

And this [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://wpengineer.com/blog/wp-content/uploads/WordPress-Christmas-24.jpg" alt="" title="WordPress-Christmas-24" width="600" height="400" class="aligncenter size-full wp-image-1902" />For the last door in our Advent Calendar I had something special in mind. This year is coming to an end and I'm sure some of our readers want to quit smoking next year. To support their goal, I created a WP Engineer Quit Smoking Widget. <img src='http://wpengineer.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><span id="more-1918"></span><br />
Here a screenshot of all setting possibilities:</p>
<p><img src="http://wpengineer.com/blog/wp-content/uploads/quit-smoking-widget.png" alt="WP Engineer Quit Smoking Widget" title="WPengineer Quit Smoking Widget" width="510" height="432" class="aligncenter size-full wp-image-1919" /></p>
<p>And this is how it would look like on your blog:</p>
<p><img src="http://wpengineer.com/blog/wp-content/uploads/widget-output.png" alt="WP Enigineer Quit Smoking Widget Output" title="WP Enigineer Quit Smoking Widget Output" width="290" height="97" class="aligncenter size-full wp-image-1920" /></p>
<p>Even though, this idea seemed to be easy to realize. It was a piece of work. I don't want you to be bored, so I'm not explaining the whole code, but I just want go in detail on some details, what I had to consider to make this Widget workable.</p>
<p>I check the date if it's valid ( 2009/02/30 doesn't exist). Then I had to avoid division by zero, if the Widget is active but doesn't include any values yet. For the correct formatting of the saved money depending on the language I used the Wordpress function <strong>number_format_i18n</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$saved</span> <span style="color: #339933;">=</span> number_format_i18n<span style="color: #009900;">&#40;</span><span style="color: #000088;">$packs</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$price</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Unfortunately, there is no feature in WordPress, which displays the currencies correctly (but I guess, this is probably not necessary). Therefore, I added a field "Currency position" with the values "before" and "after", so that the currency will be displayed properly, depending on the country. The year field automatically displays the current year minus 5 years, so that the widget is also current in 100 years. <img src='http://wpengineer.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
The rest are fields for entering the text output before and after values.</p>
<h3>Installation</h3>
<p>Unzip file wpe_quit_smoking_widget.zip and copy it to wp-content/plugins/ , then activate it in your backend. After that the Widget will be available in your Widgets area.</p>
<p>Please Note: The Widget needs <strong>WordPress Version 2.8</strong> or higher, otherwise it won't be displayed.</p>
<h3>Download</h3>
<p>Download <a href="http://wpengineer.com/?download=WP%20Engineer%20Quit%20Smoking%20Widget" class="liinternal">WPEngineer Quit Smoking Widget</a></p>
<p>Have fun with the Widget and good luck with your goal to stop smoking! The team of WP Engineer wish you all Happy Holidays!</p>
<p><img src="http://wpengineer.com/blog/wp-content/uploads/merry-christmas-wpengineer.jpg" alt="" title="merry-christmas-wpengineer" width="368" height="280" class="aligncenter size-full wp-image-1935" /><br />
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/advent-calendar-24-days-tips-and-tricks-each-day-today-wordpress-comment-form-widget/" rel="bookmark" title="Permanent Link: Advent Calendar &#8211; 24 Days Tips And Tricks Each Day! Today: WordPress Comment Form Widget" class="liinternal">Advent Calendar &#8211; 24 Days Tips And Tricks Each Day! Today: WordPress Comment Form Widget</a></li>
<li><a href="http://wpengineer.com/check-for-widgets-in-widget-areas/" rel="bookmark" title="Permanent Link: Check for Widgets in Widget-Areas" class="liinternal">Check for Widgets in Widget-Areas</a></li>
<li><a href="http://wpengineer.com/wordpress-28-widgets-options-page/" rel="bookmark" title="Permanent Link: WordPress 2.8 Widgets Options Page &#8211; First Screenshot!" class="liinternal">WordPress 2.8 Widgets Options Page &#8211; First Screenshot!</a></li>
<li><a href="http://wpengineer.com/add-wordpress-dashboard-widgets/" rel="bookmark" title="Permanent Link: Add WordPress Dashboard Widgets" class="liinternal">Add WordPress Dashboard Widgets</a></li>
<li><a href="http://wpengineer.com/deactivate-wordpress-default-widgets/" rel="bookmark" title="Permanent Link: Deactivate WordPress Default Widgets" class="liinternal">Deactivate WordPress Default Widgets</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/24th-door-the-wpe-quit-smoking-widget/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>WordPress Widget-Areas with Description</title>
		<link>http://wpengineer.com/wordpress-widget-areas-with-description/</link>
		<comments>http://wpengineer.com/wordpress-widget-areas-with-description/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 07:12:09 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[wp2.9]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1871</guid>
		<description><![CDATA[
Using WordPress version 2.9, there is now a possibility that we can write more detailed description for the widget areas. This is especially interesting when you define different widget areas, depending of categories or because the theme author defines various widget areas, that allows adjustments in more areas than just the sidebar. I do this [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://wpengineer.com/blog/wp-content/uploads/WordPress-Christmas-23.jpg" alt="" title="WordPress-Christmas-23" width="600" height="400" class="aligncenter size-full wp-image-1901" />Using WordPress version 2.9, there is now a possibility that we can write more detailed description for the widget areas. This is especially interesting when you define different widget areas, depending of categories or because the theme author defines various widget areas, that allows adjustments in more areas than just the sidebar. I do this for example in the theme Greyfoto, where the footer area is also equipped with widgets.<br />
<span id="more-1871"></span><br />
In the following example code we define a widget area, called <em>My Lorem Ipsum Sidebar</em>, which contains &#8222;detailed&#8220; information.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'register_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'My Lorem Ipsum Sidebar'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'description'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'your_textdomain'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;widgettitle&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/h2&gt;'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><img src="http://wpengineer.com/blog/wp-content/uploads/wp-widgets.png" alt="wp-widgets" title="wp-widgets" width="450" height="335" class="aligncenter size-full wp-image-1872" /></p>
<p>A more comprehensive example with two widget areas, one area for the sidebar and an area for the footer.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'register_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'sidebar'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'My Lorem Ipsum Sidebar'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'description'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'your_textdomain'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;widgettitle&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/h2&gt;'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'footer'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'My Lorem Ipsum Footer'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'description'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'your_textdomain'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;h2 class=&quot;widgettitle&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/h2&gt;'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This may be used as follows in the templates, it's being used in the <code>footer.php</code> of the widget area <em>My Lorem Ipsum Footer</em>.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;footer&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
        <span style="color: #009900;">&lt;?php dynamic_sidebar<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'footer'</span><span style="color: #66cc66;">&#41;</span>; ?&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/check-for-widgets-in-widget-areas/" rel="bookmark" title="Permanent Link: Check for Widgets in Widget-Areas" class="liinternal">Check for Widgets in Widget-Areas</a></li>
<li><a href="http://wpengineer.com/advent-calendar-24-days-tips-and-tricks-each-day-today-wordpress-comment-form-widget/" rel="bookmark" title="Permanent Link: Advent Calendar &#8211; 24 Days Tips And Tricks Each Day! Today: WordPress Comment Form Widget" class="liinternal">Advent Calendar &#8211; 24 Days Tips And Tricks Each Day! Today: WordPress Comment Form Widget</a></li>
<li><a href="http://wpengineer.com/wordpress-built-a-widget/" rel="bookmark" title="Permanent Link: Build A WordPress 2.8 Widget With The New Widget API" class="liinternal">Build A WordPress 2.8 Widget With The New Widget API</a></li>
<li><a href="http://wpengineer.com/wordpress-28-widgets-options-page/" rel="bookmark" title="Permanent Link: WordPress 2.8 Widgets Options Page &#8211; First Screenshot!" class="liinternal">WordPress 2.8 Widgets Options Page &#8211; First Screenshot!</a></li>
<li><a href="http://wpengineer.com/add-wordpress-dashboard-widgets/" rel="bookmark" title="Permanent Link: Add WordPress Dashboard Widgets" class="liinternal">Add WordPress Dashboard Widgets</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/wordpress-widget-areas-with-description/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>About WordPress Post Thumbnail</title>
		<link>http://wpengineer.com/about-wordpress-post-thumbnail/</link>
		<comments>http://wpengineer.com/about-wordpress-post-thumbnail/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 07:03:45 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Post Thumbnail]]></category>
		<category><![CDATA[template tag]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1925</guid>
		<description><![CDATA[
This is a complement to our previous post The Ultimative Guide For the_post_thumbnail In WordPress 2.9. In WordPress Version 2.9 probably the most discussed feature is the post thumbnail. Important for this function, it is only working when it is explicitly enabled in the theme. This can be done with the following little snippet in [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://wpengineer.com/blog/wp-content/uploads/WordPress-Christmas-22.jpg" alt="" title="WordPress-Christmas-22" width="600" height="400" class="aligncenter size-full wp-image-1900" />This is a complement to our previous post <a href="http://wpengineer.com/the-ultimative-guide-for-the_post_thumbnail-in-wordpress-2-9/" class="liinternal">The Ultimative Guide For the_post_thumbnail In WordPress 2.9</a>. In WordPress <a href="http://codex.wordpress.org/Version_2.9" class="liwp">Version 2.9</a> probably the most discussed feature is the post thumbnail. Important for this function, it is only working when it is explicitly enabled in the theme. This can be done with the following little snippet in the functions.php of the theme: <code>add_theme_support('post-thumbnails');</code>.</p>
<p>But even with this feature you should check for the existence of the function and offer an alternative. Only then you can leave the user the freedom to choose which WordPress version he wants to use. The functions of extensions, plugins and themes should be checked for their existence, then the functionality of the theme is secured, even if a function is not available. Similarly should it be handled with post thumbnail.</p>
<p>I would like to show two suggestions for alternatives below, and I refer to the detailed article about the topic images in <a href="http://wpengineer.com/easier-better-solutions-to-get-pictures-on-your-posts/" class="liinternal">Easier And Better Solutions To Get Pictures On Your Posts</a>.</p>
<p><span id="more-1925"></span></p>
<p>After adding the following syntax in the <code>functions.php</code> of the themes, you have a Metabox in the posting or page area ready and can easily be used.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'add_theme_support'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
  add_theme_support<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post-thumbnails'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The output of the image is in the theme at the spot where it should appear, simply use the template tag: <code>the_post_thumbnail()</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> current_theme_supports<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post-thumbnails'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
  the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">300</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">200</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Important, if you work with additional markup, then you need a query, which checks, whether there is a thumbnail for the post. Otherwise, you have unnecessary markup, which has no content.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> has_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;span class=&quot;my_image&quot;&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">600</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">400</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;/span&gt;
} ?&gt;</pre></div></div>

<p>To have an alternative for installations prior to WP 2.9, you can take different approaches. The two following examples are providing just ideas: either using the custom fields, field name is <code>post-image</code> ...</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'has_post_thumbnail'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> has_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// @param: array(height, width)</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$myimage</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post-image'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// via custom field</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$myimage</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;img class=&quot;wp-post-image&quot; src=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$postimage</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; alt=&quot;Post Iage&quot; /&gt;'</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>... or in the example below, the first image from the photo library. You can find more about it <a href="http://wpengineer.com/easier-better-solutions-to-get-pictures-on-your-posts/" class="liinternal">in a separate post</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'has_post_thumbnail'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> has_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// @param: array(height, width)</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">// via mediathek</span>
  <span style="color: #000088;">$attachments</span> <span style="color: #339933;">=</span> get_children<span style="color: #009900;">&#40;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                  <span style="color: #0000ff;">'post_parent'</span>    <span style="color: #339933;">=&gt;</span> get_the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
                  <span style="color: #0000ff;">'post_type'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'attachment'</span><span style="color: #339933;">,</span>
                  <span style="color: #0000ff;">'numberposts'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// show all -1</span>
                  <span style="color: #0000ff;">'post_status'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'inherit'</span><span style="color: #339933;">,</span>
                  <span style="color: #0000ff;">'post_mime_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'image'</span><span style="color: #339933;">,</span>
                  <span style="color: #0000ff;">'order'</span>          <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'ASC'</span><span style="color: #339933;">,</span>
                  <span style="color: #0000ff;">'orderby'</span>        <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'menu_order ASC'</span>
                  <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$attachments</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$attachment_id</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$attachment</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> wp_get_attachment_image<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$attachment_id</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>Check</strong> if the theme support the function:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> current_theme_supports<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post-thumbnails'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #339933;">...</span></pre></div></div>

<p>In addition, you can check whether the theme supports the function and explicit use for posts (post) or pages (page). Very interesting, if you want to bring additional features in the post edit section of the back end, which is dependent on this feature within the theme:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> current_theme_supports<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post-thumbnails'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'page'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  add_meta_box<span style="color: #009900;">&#40;</span> <span style="color: #339933;">...</span></pre></div></div>

<p>In this context, you can also integrate external files with new features.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">require_if_theme_supports<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post-thumbnails'</span><span style="color: #339933;">,</span> ABSPATH <span style="color: #339933;">.</span> WPINC <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/my-post-thumbnail-function.php'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/new-feature-in-wordpress-2-9-the_post_image/" rel="bookmark" title="Permanent Link: New feature in WordPress 2.9 &#8211; the_post_image()" class="liinternal">New feature in WordPress 2.9 &#8211; the_post_image()</a></li>
<li><a href="http://wpengineer.com/display-post-thumbnail-post-page-overview/" rel="bookmark" title="Permanent Link: Display Post Thumbnail Also In Edit Post and Page Overview" class="liinternal">Display Post Thumbnail Also In Edit Post and Page Overview</a></li>
<li><a href="http://wpengineer.com/the-ultimative-guide-for-the_post_thumbnail-in-wordpress-2-9/" rel="bookmark" title="Permanent Link: The Ultimative Guide For the_post_thumbnail In WordPress 2.9" class="liinternal">The Ultimative Guide For the_post_thumbnail In WordPress 2.9</a></li>
<li><a href="http://wpengineer.com/wordpress-2-9-add_theme_support-and-has_post_image/" rel="bookmark" title="Permanent Link: WordPress 2.9 add_theme_support and has_post_image" class="liinternal">WordPress 2.9 add_theme_support and has_post_image</a></li>
<li><a href="http://wpengineer.com/sticky-function-in-wordpress-27/" rel="bookmark" title="Permanent Link: Sticky Function in WordPress 2.7" class="liinternal">Sticky Function in WordPress 2.7</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/about-wordpress-post-thumbnail/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Quick View on WordPress Settings</title>
		<link>http://wpengineer.com/quick-view-on-wordpress-settings/</link>
		<comments>http://wpengineer.com/quick-view-on-wordpress-settings/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 06:50:56 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[options]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1867</guid>
		<description><![CDATA[
In all versions of WordPress, there is the possibility to view all settings within the admin area of WordPress, but a menu link doesn't exist. The page options.php enables to have a quick look at various options and also allows you to save settings.
However, it must be said, WordPress stores more data in serialized form, [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://wpengineer.com/blog/wp-content/uploads/WordPress-Christmas-21.jpg" alt="WordPress-Christmas-18" title="WordPress-Christmas-18" width="600" height="400" class="aligncenter size-full wp-image-1896" />In all versions of WordPress, there is the possibility to view all settings within the admin area of WordPress, but a menu link doesn't exist. The page <code>options.php</code> enables to have a quick look at various options and also allows you to save settings.<br />
However, it must be said, WordPress stores more data in serialized form, which also is a good thing, but those you can no longer edit on this page.</p>
<p><img src="http://wpengineer.com/blog/wp-content/uploads/wp-options.png" alt="wp-options" title="wp-admin/options.php" width="450" height="365" class="aligncenter size-full wp-image-1868" /></p>
<p>Nonetheless, certainly worth a look and now and then a help to quickly look into the settings of the blog. Alternatively, the plugin <a href="http://wordpress.org/extend/plugins/wp-developer-assistant/" class="liwp">WP Developer Assistant</a> can help here, because it also allows a glimpse into the serialized data.</p>
<p>Example-URL: http://example.com/wp-admin/options.php</p>
<p>Alternatively you can also add a menu link. Add the following snippet in to the <code>functions.php</code> of your theme or create a Plugin.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> all_settings_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	add_options_page<span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'All Settings'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> __<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'All Settings'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'administrator'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'options.php'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'admin_menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'all_settings_page'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/some-more-details-about-the-wp-sytem-health-plugin/" rel="bookmark" title="Permanent Link: Some More Details About The WP System Health Plugin" class="liinternal">Some More Details About The WP System Health Plugin</a></li>
<li><a href="http://wpengineer.com/more-memory-for-wordpress-more-information-about-wordpress/" rel="bookmark" title="Permanent Link: More Memory For WordPress &#8211; More Information About WordPress" class="liinternal">More Memory For WordPress &#8211; More Information About WordPress</a></li>
<li><a href="http://wpengineer.com/wordpress-3-multisite-settings/" rel="bookmark" title="Permanent Link: WordPress 3.0 Multisite Settings" class="liinternal">WordPress 3.0 Multisite Settings</a></li>
<li><a href="http://wpengineer.com/wordpress-useful-default-configuration-settings-via-plugin/" rel="bookmark" title="Permanent Link: WordPress: Useful Default Configuration Settings Via Plugin" class="liinternal">WordPress: Useful Default Configuration Settings Via Plugin</a></li>
<li><a href="http://wpengineer.com/new-screenshots-of-wordpress-3-0/" rel="bookmark" title="Permanent Link: New Screenshots Of WordPress 3.0" class="liinternal">New Screenshots Of WordPress 3.0</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/quick-view-on-wordpress-settings/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Optimize Syndication Frequenzy</title>
		<link>http://wpengineer.com/optimize-syndication-frequenzy/</link>
		<comments>http://wpengineer.com/optimize-syndication-frequenzy/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 06:42:04 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[Feed]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1905</guid>
		<description><![CDATA[
Today a standard becomes 9 years old. But hardly ever noticed: The Syndication-Module 1.4.1 of RDF Site Summary 1.0.
What is it good for?
Apparently some of you publishing posts less than 10 times per day. Shame on you ... not!
WordPress, however, assumes that you can not even stop, so write it in the RSS feed:

&#60;sy:updatePeriod&#62;hourly&#60;/sy:updatePeriod&#62;
&#60;sy:updateFrequency&#62;1&#60;/sy:updateFrequency&#62;

In plain [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://wpengineer.com/blog/wp-content/uploads/WordPress-Christmas-20.jpg" alt="WordPress-Christmas-20" title="WordPress-Christmas-20" width="600" height="400" class="aligncenter size-full wp-image-1898" />Today a standard becomes 9 years old. But hardly ever noticed: The <a href="http://purl.org/rss/1.0/modules/syndication/" hreflang="en" class="liexternal">Syndication-Module 1.4.1 of RDF Site Summary 1.0</a>.</p>
<h4>What is it good for?</h4>
<p>Apparently some of you publishing posts less than 10 times per day. Shame on you ... not!<br />
WordPress, however, assumes that you can not even stop, so write it in the RSS feed:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sy:updatePeriod<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>hourly<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sy:updatePeriod<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sy:updateFrequency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sy:updateFrequency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>In plain English: Every feed reader should check once an hour, if you finally wrote something again.</p>
<p>Anyone who wants to relieve his server from such a thing, can change that. In the <code>functions.php</code> you write this two lines:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'rss_update_period'</span><span style="color: #339933;">,</span>    <span style="color: #990000;">create_function</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'return &quot;daily&quot;;'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'rss_update_frequency'</span><span style="color: #339933;">,</span> <span style="color: #990000;">create_function</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'return 4;'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>A few feed reader keep it by that but other don't. But even if there is only one: You've saved a few resources that you can use somewhere else.</p>
<div class="incontent">
<h4>Guest Post</h4>
<p>This post is written by Thomas Scholz - <a href="http://toscho.de/" class="liexternal">toscho.de</a> and is a post in our Advent Calendar on WP Engineer about WordPress.<br />
Thank you very much from my part to <a href="http://toscho.de/" class="liexternal">Thomas</a>.<br />
If you also like to have your interesting post published on our website, please let us know on our contact page. Of course we will appreciate your contribution!
</div>
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/wordpress-database-repair-script-in-2-9/" rel="bookmark" title="Permanent Link: WordPress Database Repair Script In 2.9" class="liinternal">WordPress Database Repair Script In 2.9</a></li>
<li><a href="http://wpengineer.com/wordpress-27-optimize-the-management/" rel="bookmark" title="Permanent Link: WordPress 2.7 Optimize The Management" class="liinternal">WordPress 2.7 Optimize The Management</a></li>
<li><a href="http://wpengineer.com/feed-for-drafts-plugin/" rel="bookmark" title="Permanent Link: Feed for Drafts (Plugin)" class="liinternal">Feed for Drafts (Plugin)</a></li>
<li><a href="http://wpengineer.com/meta-links-for-wordpress-plugins/" rel="bookmark" title="Permanent Link: Set Meta Links For WordPress Plugins" class="liinternal">Set Meta Links For WordPress Plugins</a></li>
<li><a href="http://wpengineer.com/amazed-by-such-a-great-support-and-feedback/" rel="bookmark" title="Permanent Link: Amazed By Such A Great Support And Feedback!" class="liinternal">Amazed By Such A Great Support And Feedback!</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/optimize-syndication-frequenzy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Amazed By Such A Great Support And Feedback!</title>
		<link>http://wpengineer.com/amazed-by-such-a-great-support-and-feedback/</link>
		<comments>http://wpengineer.com/amazed-by-such-a-great-support-and-feedback/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 07:12:36 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[WPengineer Misc]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[SEO Plugin for WordPress]]></category>
		<category><![CDATA[Sponsor]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1926</guid>
		<description><![CDATA[
Today is our 19th day of our Advent Calendar and we just want to say thank you to our readers, who have given a great feedback to our tips on our Advent Calendar and we have quite a lot more people reading our blog since the start of our calendar, about 30% raise. We also [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://wpengineer.com/blog/wp-content/uploads/WordPress-Christmas-19.jpg" alt="WordPress-Christmas-19" title="WordPress-Christmas-19" width="600" height="400" class="aligncenter size-full wp-image-1897" />Today is our 19th day of our Advent Calendar and we just want to say thank you to our readers, who have given a great feedback to our tips on our Advent Calendar and we have quite a lot more people reading our blog since the start of our calendar, about 30% raise. We also like to thank for the big support of our sponsors, we are especially happy that our spots for ads are sold out for this month! </p>
<p>We are glad that our readers like our posts on WP Engineer and our sponsors recognizing the value of being displayed on WP Engineer. Just to get to know our sponsors a little bit better, we will introduce them shortly. We hope that you find the services and offers of our sponsors interesting and useful. All of them are WordPress or Design related, I guess a good fit for our readers:</p>
<p><img src="http://wpengineer.com/blog/wp-content/uploads/wishlistmember.jpg" alt="wishlistmember" title="wishlistmember" width="450" height="258" class="aligncenter size-full wp-image-1356" /><br />
<a href="http://member.wishlistproducts.com/" class="liexternal">WishList Member</a> is a powerful membership script that can turn any WordPress blog into a full blown membership site. Very interesting, you have to check it out. WishList Member belongs to our loyal sponsors, we are very glad to have them and to provide our readers a great membership plugin.</p>
<hr />
<p><img src="http://wpengineer.com/blog/wp-content/uploads/wpseo.jpg" alt="wpseo" title="wpseo" width="450" height="258" class="aligncenter size-full wp-image-1358" /><br />
<a href="http://wpseo.org" class="liexternal"> wpSEO</a> is a great Plugin for better SEO on your WordPress installation. Check it out and you will love it as Google will love your blog from now on. <img src='http://wpengineer.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Of course we are using it on WP Engineer too. WP 2.9 ready and with over 70 setting to optimize your blog.</p>
<hr />
<p><img src="http://wpengineer.com/blog/wp-content/uploads/make-better-websites.jpg" alt="make-better-websites" title="make-better-websites" width="450" height="258" class="aligncenter size-full wp-image-1355" /><br />
<a href="http://www.makebetterwebsites.com/" class="liexternal">MakeBetterWebsites</a> is a great gallery with a fine selection of high quality websites. All websites are handpicked and most of them I have first seen on this website instead of the usual suspects, seen on many other websites over and over again. Only high quality websites are seen on this website.</p>
<hr />
<p><img src="http://wpengineer.com/blog/wp-content/uploads/Pagelines-Themes.jpg" alt="Pagelines-Themes" title="Pagelines-Themes" width="449" height="335" class="aligncenter size-full wp-image-1929" />If you also want to have a great design for your website, just get a <a href="http://www.pagelines.com/" class="liexternal">PageLines Theme</a>. They have superior themes for WordPress that make it simple for you to have an awesome, fully-featured website that is easy to set up and manage.</p>
<hr />
<p><img src="http://wpengineer.com/blog/wp-content/uploads/wpseek-search.jpg" alt="wpseek-search" title="wpseek-search" width="450" height="391" class="aligncenter size-full wp-image-1928" />Originally <a href="http://wpseek.com/" class="liexternal">wpseek.com</a> was built as some kind of gateway for the little Firefox plugin "<a href="http://www.schloebe.de/firefox-extensions/wordpress-helper/#english" class="liexternal">WordPress Helper</a>" to handle all kinds of search requests.</p>
<p>You can add <a href="http://wpseek.com" class="liexternal">wpseek.com</a> as a search engine in your favorite browser. Look at the upper right of your browser.</p>
<hr />
<p><img src="http://wpengineer.com/blog/wp-content/uploads/wordpress-book.jpg" alt="wordpress-book" title="wordpress-book" width="450" height="471" class="aligncenter size-full wp-image-1927" />Do you still need something for Christmas or it's too late for shipping or you even want to make yourself a great gift? <a href="http://digwp.com/book/" class="liexternal">Download this book</a>, a great handbook to become a Pro in WordPress! 400 Pages of Practical Information. A Lifetime Subscription, when you buy this <a href="http://digwp.com/book/" class="liexternal">book</a>, you will instantly get the most current version. But also, you are getting a lifetime subscription to all updated (PDF) copies of the book. And lots of Code Samples!</p>
<hr />
<p><img src="http://wpengineer.com/blog/wp-content/uploads/buckmaker-theme.jpg" alt="buckmaker-theme" title="buckmaker-theme" width="450" height="405" class="aligncenter size-full wp-image-1932" /><a href="http://thebuckmaker.com/" class="liexternal">Here </a>you'll find some of the most beautiful, powerful and state of the art WordPress Themes available these days. <a href="http://thebuckmaker.com/" class="liexternal">Their premium themes</a> are very easy to install, edit and customize. <a href="http://thebuckmaker.com/" class="liexternal">They</a> assist you in their support forums and provide several tutorials to get you started.</p>
<h3>If you also interested to support our website, please go to <a href="http://buysellads.com/buy/detail/3646" class="liexternal">BuySellAds.com</a> and promote your service or product on WP Engineer. Maybe not this month, but maybe next month we have a spot just for you available. <img src='http://wpengineer.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </h3>
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/last-day-to-vote-for-us-to-be-the-coolest-blog-powered-by-wordpress/" rel="bookmark" title="Permanent Link: Last Day To Vote For Us To Be The Coolest Blog Powered By WordPress" class="liinternal">Last Day To Vote For Us To Be The Coolest Blog Powered By WordPress</a></li>
<li><a href="http://wpengineer.com/your-support-is-much-appreciated/" rel="bookmark" title="Permanent Link: Your Support Is Much Appreciated !" class="liinternal">Your Support Is Much Appreciated !</a></li>
<li><a href="http://wpengineer.com/a-chance-wordpress-plugin-competition/" rel="bookmark" title="Permanent Link: A Chance: WordPress Plugin Competition" class="liinternal">A Chance: WordPress Plugin Competition</a></li>
<li><a href="http://wpengineer.com/wordpress-27-update-core/" rel="bookmark" title="Permanent Link: WordPress 2.7 Update Core" class="liinternal">WordPress 2.7 Update Core</a></li>
<li><a href="http://wpengineer.com/we-made-it-on-the-list-of-the-coolest-blog-powered-by-wordpress/" rel="bookmark" title="Permanent Link: We Made It On The List Of The Coolest Blog Powered By WordPress" class="liinternal">We Made It On The List Of The Coolest Blog Powered By WordPress</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/amazed-by-such-a-great-support-and-feedback/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Ultimative Guide For the_post_thumbnail In WordPress 2.9</title>
		<link>http://wpengineer.com/the-ultimative-guide-for-the_post_thumbnail-in-wordpress-2-9/</link>
		<comments>http://wpengineer.com/the-ultimative-guide-for-the_post_thumbnail-in-wordpress-2-9/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 06:50:48 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[template tag]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wp2.9]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1930</guid>
		<description><![CDATA[
WordPress 2.9 RC1 is released and the new post thumbnail function will not change until the final version hopefully.
I was chatting a little bit with Sergej Müller last night and we were trying some things out. We found out the following things:

Edit: Some little changes, see Matt's comment.
You can provide 4 picture formats to the [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://wpengineer.com/blog/wp-content/uploads/WordPress-Christmas-18.jpg" alt="WordPress-Christmas-18" title="WordPress-Christmas-18" width="600" height="400" class="aligncenter size-full wp-image-1896" />WordPress 2.9 RC1 is released and the new post thumbnail function will not change until the final version hopefully.<br />
I was chatting a little bit with <a href="http://wpseo.org" title="wpSEO WordPress SEO Plugin" class="liexternal">Sergej Müller</a> last night and we were trying some things out. We found out the following things:<br />
<span id="more-1930"></span><br />
<strong>Edit:</strong> Some little changes, see <a href="http://wpengineer.com/the-ultimative-guide-for-the_post_thumbnail-in-wordpress-2-9/#comment-3053" class="liinternal">Matt's comment</a>.</p>
<p>You can provide 4 picture formats to the function (change the width and height values to your need):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// the thumbnail </span>
the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">// medium resolution</span>
the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">300</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">200</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// large resolution</span>
the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">600</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">400</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// original</span>
the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>You can set how the images should align. It is also possible to assign an own class:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//  left align</span>
the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'alignleft'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//  right align</span>
the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'alignright'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//  center</span>
the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'aligncenter'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// align right and the class  'my_own_class'</span>
the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'alignright my_own_class'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The 3rd possibility is the control of the images size with an array of height and width:<br />
For this purpose we suppose that the settings for thumbnail is 150x150, for medium 300x200 and for large 600x400.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// thumbnail scaled to 60x60 pixel</span>
the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'alignleft'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">// original thumbnail</span>
the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">150</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">150</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'alignleft'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// medium resolution scaled to 200x133 pixel</span>
the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">200</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'alignleft'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// large resolution scaled to 400x266 Pixel</span>
the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">400</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">345</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'alignleft'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>We see that the image proportions are always maintained, even if one specifies crooked values.</p>
<p>For the Theme Designers is this not necessarily easier, because no one knows what the user will put in his settings o his library. One way to approach this problem, to query the options for the various sizes:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// width of the thumbnails</span>
get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thumbnail_size_w'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//  height of the thumbnails</span>
get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thumbnail_size_h'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//  height of the medium resolution</span>
get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'medium_size_h'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//  width of the large resolution</span>
get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'large_size_w'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//  1 = Crop thumbnail to exact dimensions, 0 = Crop off</span>
get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thumbnail_crop'</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>You can change these values in your theme.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$w</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thumbnail_size_w'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$h</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thumbnail_size_h'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
&nbsp;
the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$w</span><span style="color: #339933;">,</span> <span style="color: #000088;">$h</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'alignleft'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Here another example: If the size of a thumbnail is bigger than 100x100 and crop is activated, then the thumbnail should be resized to 100x100, otherwise use the original thumbnail.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thumbnail_size_w'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">100</span> <span style="color: #339933;">&amp;&amp;</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thumbnail_crop'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
    the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thumbnail'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Have fun with post thumbnails! But be aware, that each post thumbnail requires 2 data base queries. On a page with 10 posts that would be 20 more queries.<br />
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/about-wordpress-post-thumbnail/" rel="bookmark" title="Permanent Link: About WordPress Post Thumbnail" class="liinternal">About WordPress Post Thumbnail</a></li>
<li><a href="http://wpengineer.com/how-to-start-blogging/" rel="bookmark" title="Permanent Link: How To Start Blogging?" class="liinternal">How To Start Blogging?</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/the-ultimative-guide-for-the_post_thumbnail-in-wordpress-2-9/feed/</wfw:commentRss>
		<slash:comments>70</slash:comments>
		</item>
		<item>
		<title>Sort Posts With The Help Of Custom Fields</title>
		<link>http://wpengineer.com/sort-posts-custom-fields/</link>
		<comments>http://wpengineer.com/sort-posts-custom-fields/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 06:43:33 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[Advent Calendar]]></category>
		<category><![CDATA[Custom Fields]]></category>
		<category><![CDATA[Sort]]></category>

		<guid isPermaLink="false">http://wpengineer.com/?p=1915</guid>
		<description><![CDATA[
Quite often, a WordPress developer likes to have posts sorted according to a custom field. If you would write a SQL-statement, it would be quite complex, since you need to JOIN two database tables (wp_posts und wp_postmeta).
But there is a much easier way, if you use the template tags provided by WordPress - in our [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://wpengineer.com/blog/wp-content/uploads/WordPress-Christmas-17.jpg" alt="WordPress-Christmas-17" title="WordPress-Christmas-17" width="600" height="400" class="aligncenter size-full wp-image-1895" />Quite often, a WordPress developer likes to have posts sorted according to a custom field. If you would write a SQL-statement, it would be quite complex, since you need to JOIN two database tables (wp_posts und wp_postmeta).</p>
<p>But there is a much easier way, if you use the template tags provided by WordPress - in our case we use the function query_posts. Below you can see an example, which includes a custom field in the query, and also sort the posts with the help of this custom field. A short, easy to understand code with effective result:</p>
<p><img src="http://wpengineer.com/blog/wp-content/uploads/Bildschirmfoto-2009-12-04-um-21.49.05.png" alt="Bildschirmfoto 2009-12-04 um 21.49.05" title="Bildschirmfoto 2009-12-04 um 21.49.05" width="577" height="271" class="aligncenter size-full wp-image-1916" /></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">query_posts<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'meta_key=my_day&amp;meta_compare=&lt;=&amp;meta_value=20&amp;orderby=meta_value&amp;order=DESC'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<div class="incontent">
<h4>Guest Post</h4>
<p>This post is written by Sergej Müller <a href="http://www.wpseo.org" class="liexternal">wpseo.org</a> and is a post in our Advent Calendar on WP Engineer about WordPress.<br />
Thank you very much from my part to <a href="http://www.wpseo.org" class="liexternal">Sergej</a>.<br />
If you also like to have your interesting post published on our website, please let us know on our contact page. Of course we will appreciate your contribution!
</div>
<hr />
<h3>Related posts:</h3>
<ul>
<li><a href="http://wpengineer.com/custom-fields-in-your-feed/" rel="bookmark" title="Permanent Link: Custom Fields in your Feed" class="liinternal">Custom Fields in your Feed</a></li>
<li><a href="http://wpengineer.com/display-private-posts-to-logged-in-users/" rel="bookmark" title="Permanent Link: Display Private Posts to Logged in Users" class="liinternal">Display Private Posts to Logged in Users</a></li>
<li><a href="http://wpengineer.com/strange-things-with-sticky-posts/" rel="bookmark" title="Permanent Link: Strange Things With Sticky Posts" class="liinternal">Strange Things With Sticky Posts</a></li>
<li><a href="http://wpengineer.com/wordpress-3-0-custom-background-support/" rel="bookmark" title="Permanent Link: WordPress 3.0 Custom Background Support" class="liinternal">WordPress 3.0 Custom Background Support</a></li>
<li><a href="http://wpengineer.com/easy-way-for-advertisement-in-wordpress/" rel="bookmark" title="Permanent Link: Easy Way For Advertisement In WordPress" class="liinternal">Easy Way For Advertisement In WordPress</a></li>
</ul>
<hr />
<p><img style="float:left;" src="http://wpengineer.com/favicon.ico" alt="WP Engineer Favicon"/> Thanks for subscribing our feed! <a href="http://buysellads.com/buy/detail/3646/" class="liexternal">Sponsor the WP Engineer Blog</a> and get your brand in front of several hundred users per day!<br />
&copy; <a href="http://wpengineer.com/" class="liinternal">WP Engineer Team</a>, All rights reserved <small>(Digital Fingerprint: WPEngineer-be0254ce2b4972feb4b9cb72034a092d)</small></p>

]]></content:encoded>
			<wfw:commentRss>http://wpengineer.com/sort-posts-custom-fields/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
