<?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>Valen Designs &#187; Wordpress</title>
	<atom:link href="http://valendesigns.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://valendesigns.com</link>
	<description>Build Market Empower</description>
	<lastBuildDate>Mon, 26 Jul 2010 12:07:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Envato Marketplace Items</title>
		<link>http://valendesigns.com/wordpress/envato-marketplace-items/</link>
		<comments>http://valendesigns.com/wordpress/envato-marketplace-items/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 11:55:25 +0000</pubDate>
		<dc:creator>Derek Herman</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Envato]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://valendesigns.com/?p=606</guid>
		<description><![CDATA[The Envato Marketplace Items plugin retrieves items from an Envato Marketplace and API set of your choice, then caches those results in your WordPress database before finally displaying the results as an image gallery of 80px square thumbnails. 
You can view examples of what the plugin does by checking out the sidebar of any Envato [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://valendesigns.com/wp-content/uploads/2009/10/marketplace.jpg" alt="marketplace" title="marketplace" width="460" height="120" class="alignnone size-full wp-image-607" />The <a href="http://wordpress.org/extend/plugins/envato-marketplace-items/" rel="external">Envato Marketplace Items</a> plugin retrieves items from an Envato Marketplace and API set of your choice, then caches those results in your WordPress database before finally displaying the results as an image gallery of 80px square thumbnails. </p>
<p>You can view examples of what the plugin does by checking out the sidebar of any Envato Marketplace blog and look at the <strong>Popular Files</strong> section. A quick note, the code for those sections is in the functions.php and it is not currently using this new plugin, but they are basically the same code just less option oriented since we only need them to use one API set and not pull from multiple ones.</p>
<p>EDIT: I added it to my sidebar so you can see it right here in action.</p>
<h3>Installation</h3>
<ul class="notebook-ul">
<li>Upload the envato-marketplace-itmes folder to the /wp-content/plugins/ directory</li>
<li>Activate the plugin through the Plugins menu in WordPress</li>
<li>Anywhere on your blog you would like to see the thumbnail gallery add the following code to you theme files (sidebar.php recommended).</li>
</ul>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td 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><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'envato_marketplace_items'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
  envato_marketplace_items<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: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<h3>Download File</h3><ul class="notebook-file"><li><a title="Download File" href="http://downloads.wordpress.org/plugin/envato-marketplace-items.1.0.3.zip">Envato Marketplace Items</a></li></ul> <h3>Donations</h3><ul class="notebook-donate"><li>Make a <a class="donateLink" href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=accounts@valendesigns.com&item_name=Donation+for+Code+Snippet" rel="external">donation</a> and help keep the awesomeness flowing.</li></ul> <h3>Disclaimer</h3><div class="disclaimer"><p>Valen Designs grants you a nonexclusive copyright license to use all programming code examples from which you can generate similar function tailored to your own specific needs.</p> <p>Valen Designs, cannot guarantee or imply reliability, serviceability, or function of these programs.</p> <p>All programs contained herein are provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://valendesigns.com/wordpress/envato-marketplace-items/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
		</item>
		<item>
		<title>The New Creattica Daily</title>
		<link>http://valendesigns.com/news/the-new-creattica-daily/</link>
		<comments>http://valendesigns.com/news/the-new-creattica-daily/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 01:07:28 +0000</pubDate>
		<dc:creator>Derek Herman</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Envato]]></category>
		<category><![CDATA[SimplePie]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[Upgrade]]></category>

		<guid isPermaLink="false">http://valendesigns.com/?p=592</guid>
		<description><![CDATA[
Creattica Daily has gotten a pretty sweet makeover, not that it wasn&#8217;t already awesome. Collis (CEO of Envato) was itching to try out a new larger 1200px wide design, and one that will pretty much update and maintain itself without the need to post daily roundups or cost tons of cash since the site has [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://valendesigns.com/wp-content/uploads/2009/07/creattica-daily-top.jpg" alt="creattica-daily-top" title="creattica-daily-top" width="460" height="120" class="alignnone size-full wp-image-593" /><br />
<a href="http://daily.creattica.com" rel="external">Creattica Daily</a> has gotten a pretty sweet makeover, not that it wasn&#8217;t already awesome. Collis (CEO of Envato) was itching to try out a new larger 1200px wide design, and one that will pretty much update and maintain itself without the need to post daily roundups or cost tons of cash since the site has not been very profitable. Don&#8217;t worry though, the Creative License comic will still be going strong for all who enjoy some good clean humor. As well, there will continue to be plenty of content to sink your teeth into, it will just be pulled from various sources around the web vs. manual submission.</p>
<h3>SimplePie, Oh Yeah!</h3>
<p>Yes, we are using the amazing <a href="http://simplepie.org/" rel="external">SimplePie</a> feed parser to aggregate feeds and give you fresh daily links, images, and even twitter updates with the ability to paginate all the content independently and at the same time. By &#8220;at the same time&#8221; I mean you can paginate one section and it will not loose the place of the other section. Just a little added bonus I thought might be good to have. Also, I opted to not use the WordPress plugin for SimplePie due to it&#8217;s restrictive feel, I needed to do some very customized code and the plugin was getting in the way.</p>
<p>I have to say that this was by far the most complex and interesting use of SimplePie I have ever created. Normally you would not use SimplePie to pull twitter updates because the RSS output is void of any links but with a little PHP string manipulation everything is working perfectly (I hope) and the main thing is we can paginate the updates; I&#8217;ve yet to see a JavaScript version that can paginate twitter forward and back.</p>
<h3>Snapshot</h3>
<p><img src="http://valendesigns.com/wp-content/uploads/2009/07/creattica-daily-bottom.jpg" alt="creattica-daily-bottom" title="creattica-daily-bottom" width="460" height="800" class="alignnone size-full wp-image-594" /></p>
<h3>Some Final Words</h3>
<p>Well, I hope you enjoy the new site and I am very interested to see if the new larger design is going to be a hit or not. Also, to clarify only 8% of the users who visit <a href="http://daily.creattica.com" rel="external">Creattica Daily</a> have a screen that is not 1200px or above. So, this was the perfect place to test out this kind of design.</p>
]]></content:encoded>
			<wfw:commentRss>http://valendesigns.com/news/the-new-creattica-daily/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Added Plugin to WordPress Directory</title>
		<link>http://valendesigns.com/news/added-plugin-to-wordpress-directory/</link>
		<comments>http://valendesigns.com/news/added-plugin-to-wordpress-directory/#comments</comments>
		<pubDate>Fri, 29 May 2009 14:21:47 +0000</pubDate>
		<dc:creator>Derek Herman</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Upgrade]]></category>

		<guid isPermaLink="false">http://valendesigns.com/?p=518</guid>
		<description><![CDATA[
I recently added an updated version of the is_page_or_sub() function now called is_page_or_ancestor() to the plugins directory over at WordPress.org. The new version of the function is a recursive test to see if the page ID or name you pass into the function is actually the current page or one of its ancestors. Basically you [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://valendesigns.com/wp-content/uploads/2009/05/is-page-or-ancestor.jpg" alt="is-page-or-ancestor" title="is-page-or-ancestor" width="460" height="120" class="alignnone size-full wp-image-522" /><br />
I recently added an updated version of the is_page_or_sub() function now called is_page_or_ancestor() to the plugins directory over at WordPress.org. The new version of the function is a recursive test to see if the page ID or name you pass into the function is actually the current page or one of its ancestors. Basically you can test to see if you are viewing an ancestor of the About page and if so execute some code (i.e. change a pages class or id).</p>
<p>I use this function on my site and pretty much on every other site I&#8217;ve ever built. However, the only different is this new code is leaner and will test many levels deep. A very handy tool for the custom type themes that seem to be popping up in the wake of what I am calling a WordPress feeding frenzy. The popularity of this platform has been growing exponentially and who can blame it, I absolutely love working with WordPress.</p>
<p>Anyhow, this is the first plugin I have submitted to be hosted in the Directory, mostly I just wanted to test out committing a plugin to the directory and this seemed like a logical place to start. If you&#8217;re interested in what was changed here is the code. Also, you can update the old functions code with this much better code.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * The parameter can contain the page ID, or page name
 *
 * @since 1.0
 * @uses $post
 * @uses $wpdb
 *
 * @param mixed $page either int or string
 * @return bool
 */</span>
<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;">'is_page_or_ancestor'</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;">function</span> is_page_or_ancestor<span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</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: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">,</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// If is not numeric get page ID</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">is_numeric</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_var</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT ID FROM <span style="color: #006699; font-weight: bold;">$wpdb-&gt;posts</span> WHERE post_name = '&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$page</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' AND post_type = 'page'&quot;</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;">// Recursive search through page hierarchy</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">is_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;">&amp;&amp;</span> <span style="color: #990000;">in_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</span><span style="color: #339933;">,</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: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>Sample Usage</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_page_or_ancestor<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'about'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    DISPLAY SOMETHING
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    DISPLAY SOMETHING DIFFERENT
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>Download File</h3><ul class="notebook-file"><li><a title="Download File" href="http://downloads.wordpress.org/plugin/is-page-or-ancestor.zip">Version 1.1</a></li></ul> <h3>Donations</h3><ul class="notebook-donate"><li>Make a <a class="donateLink" href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=accounts@valendesigns.com&item_name=Donation+for+Code+Snippet" rel="external">donation</a> and help keep the awesomeness flowing.</li></ul> <h3>Disclaimer</h3><div class="disclaimer"><p>Valen Designs grants you a nonexclusive copyright license to use all programming code examples from which you can generate similar function tailored to your own specific needs.</p> <p>Valen Designs, cannot guarantee or imply reliability, serviceability, or function of these programs.</p> <p>All programs contained herein are provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://valendesigns.com/news/added-plugin-to-wordpress-directory/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Is Category or Subcategory WP Function</title>
		<link>http://valendesigns.com/wordpress/is-category-or-subcategory-wp-function/</link>
		<comments>http://valendesigns.com/wordpress/is-category-or-subcategory-wp-function/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 10:26:59 +0000</pubDate>
		<dc:creator>Derek Herman</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Category]]></category>
		<category><![CDATA[Child]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[Parent]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://valendesigns.com/?p=508</guid>
		<description><![CDATA[
Here is another great WordPress function to test if you are in a subcategory or the actual parent category and if so return true. This function is pretty much identical in concept to the is_page_or_sub() function I released previously. However, it just tests categories and not pages. Also, the code is significantly different since there [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://valendesigns.com/wp-content/uploads/2009/04/is_category_or_sub.jpg" alt="Is Category or Subcategory Function" title="Is Category or Subcategory Function" width="460" height="120" class="alignnone size-full wp-image-511" /><br />
Here is another great WordPress function to test if you are in a subcategory or the actual parent category and if so return true. This function is pretty much identical in concept to the is_page_or_sub() function I released previously. However, it just tests categories and not pages. Also, the code is significantly different since there are a few more available pre existing function we can build upon here.</p>
<p>For example, the cat_is_ancestor_of() function comes in really handy and does a lot of the heavy lifting for this simple but very powerful function. I use this very function to build complex category based navigation and test for active states and use the appropriate CSS in the change we&#8217;re actually in one of the categories we&#8217;re testing for. If you have question feel free to ask by commenting below and enjoy mastering WordPress! </p>
<h3>The Function</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// If is category or subcategory of $cat_id</span>
<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;">'is_category_or_sub'</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;">function</span> is_category_or_sub<span style="color: #009900;">&#40;</span><span style="color: #000088;">$cat_id</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</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>get_the_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$cat</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: #000088;">$cat_id</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$cat</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cat_ID</span> <span style="color: #339933;">||</span> cat_is_ancestor_of<span style="color: #009900;">&#40;</span><span style="color: #000088;">$cat_id</span><span style="color: #339933;">,</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: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	    <span style="color: #009900;">&#125;</span>
	    <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>Sample Usage</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_category_or_sub<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    DISPLAY SOMETHING
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    DISPLAY SOMETHING DIFFERENT
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>Donations</h3><ul class="notebook-donate"><li>Make a <a class="donateLink" href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=accounts@valendesigns.com&item_name=Donation+for+Code+Snippet" rel="external">donation</a> and help keep the awesomeness flowing.</li></ul> <h3>Disclaimer</h3><div class="disclaimer"><p>Valen Designs grants you a nonexclusive copyright license to use all programming code examples from which you can generate similar function tailored to your own specific needs.</p> <p>Valen Designs, cannot guarantee or imply reliability, serviceability, or function of these programs.</p> <p>All programs contained herein are provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://valendesigns.com/wordpress/is-category-or-subcategory-wp-function/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Is Page or Subpage WP Function</title>
		<link>http://valendesigns.com/wordpress/is-page-or-subpage-wordpress-function/</link>
		<comments>http://valendesigns.com/wordpress/is-page-or-subpage-wordpress-function/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 12:47:13 +0000</pubDate>
		<dc:creator>Derek Herman</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Child]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[Parent]]></category>

		<guid isPermaLink="false">http://valendesigns.com/?p=374</guid>
		<description><![CDATA[
Have you ever wanted to know if the page you&#8217;re on is a child of a certain page because you needed to know that information in order to add a snippet of code to the sidebar or remove something or whatever you had planned but you tried and just couldn&#8217;t figure out a solution that [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://valendesigns.com/wp-content/uploads/2009/03/is_page_or_sub.jpg" alt="Is Page or Subpage Function" title="Is Page or Subpage Function" width="460" height="120" class="alignnone size-full wp-image-388" /><br />
Have you ever wanted to know if the page you&#8217;re on is a child of a certain page because you needed to know that information in order to add a snippet of code to the sidebar or remove something or whatever you had planned but you tried and just couldn&#8217;t figure out a solution that was simple and easy to maintain? Well, here is a piece of code that will do just that. I use this very code all over the place, on pretty much every project I do. The concept is simple. I need to know more than if the is_page(&#8216;portfolio&#8217;); I need to know if this is_page_or_sub(&#8216;portfolio&#8217;); </p>
<p>This is pretty much the same function as is_page(), it lets you pass in a page ID or slug, your choice, but the only real difference is that it goes beyond a single page and looks for a family relationship. The function will return true for all children and grandchildren of the page id or slug you pass in. For example, you want to show two different sidebars, one for normal content and one for the portfolio section. You would use this function to do that. First, copy and paste this code into your functions.php and then take a look at the usage example below.</p>
<p>EDIT:<br />
You can get an updated version if this function and as a plugin if you got to <a href="http://valendesigns.com/news/added-plugin-to-wordpress-directory/">here</a>.</p>
<h3>The Function</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//If is page or subpage of $my_page, works with both ID or name.</span>
<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;">'is_page_or_sub'</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;">function</span> is_page_or_sub<span style="color: #009900;">&#40;</span><span style="color: #000088;">$my_page</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> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$grand_parent</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_var</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT post_parent FROM <span style="color: #006699; font-weight: bold;">$wpdb-&gt;posts</span> WHERE ID = '&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' AND post_type = 'page'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #666666; font-style: italic;">// If you pass in a string, get the page ID of $my_page to use below</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_numeric</span><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: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$my_page</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_var</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT ID FROM <span style="color: #006699; font-weight: bold;">$wpdb-&gt;posts</span> WHERE post_name = '&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$my_page</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' AND post_type = 'page'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #666666; font-style: italic;">// If this is $my_page or the child or grandchild of $my_page return true </span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_page<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: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$my_page</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$grand_parent</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$my_page</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	    <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> 
	<span style="color: #666666; font-style: italic;">// Else return false</span>
        <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>Sample Usage</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_page_or_sub<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'portfolio'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    DISPLAY PORTFOLIO SIDEBAR
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    DISPLAY REGULAR SIDEBAR
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>If you have any question feel free to comment below. Have fun taking over the internet one WordPress blog at a time.</p>
<h3>Donations</h3><ul class="notebook-donate"><li>Make a <a class="donateLink" href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=accounts@valendesigns.com&item_name=Donation+for+Code+Snippet" rel="external">donation</a> and help keep the awesomeness flowing.</li></ul> <h3>Disclaimer</h3><div class="disclaimer"><p>Valen Designs grants you a nonexclusive copyright license to use all programming code examples from which you can generate similar function tailored to your own specific needs.</p> <p>Valen Designs, cannot guarantee or imply reliability, serviceability, or function of these programs.</p> <p>All programs contained herein are provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://valendesigns.com/wordpress/is-page-or-subpage-wordpress-function/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Vesper Dark A New Theme Variation</title>
		<link>http://valendesigns.com/wordpress/vesper-dark-a-new-theme-variation/</link>
		<comments>http://valendesigns.com/wordpress/vesper-dark-a-new-theme-variation/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 01:50:53 +0000</pubDate>
		<dc:creator>Derek Herman</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[Valid]]></category>
		<category><![CDATA[Widget-Ready]]></category>

		<guid isPermaLink="false">http://valendesigns.com/?p=54</guid>
		<description><![CDATA[And another version is born!
Well, Vesper Dark is pretty much exactly the same as the original theme named Vesper. The only real differences are in the header colors. A lot of what I am about to say is copied from the original post but here goes again anyhow.
Just like the original, Vesper Dark is a [...]]]></description>
			<content:encoded><![CDATA[<p>And another version is born!</p>
<p>Well, Vesper Dark is pretty much exactly the same as the original theme named Vesper. The only real differences are in the header colors. A lot of what I am about to say is copied from the original post but here goes again anyhow.</p>
<p>Just like the original, Vesper Dark is a free widget ready 2 column fixed width template written in valid standards based code for the Wordpress content management system. Vesper Dark supports second level subpage navigation that is very similar to our own here. Basically, if a top level page has child pages it will display them in the sidebar when viewing that page, even if you have widgets enabled.</p>
<p>As well, Vesper Dark has support for a more advanced paging navigation through the use of the wp-pagenavi plugin. The template has the pagination style built into the style.css file and removes the call to the default CSS file that comes with wp-pagenavi by a simple remove action in the functions.php file in the Vesper directory, so everything should work right out of the box.</p>
<p>In addition, Vesper Dark is Wordpress 2.6 compatible and should also work in previous version but has only been tested in 2.3 and above. You can download the latest version of Vesper below and play around with it. If you have any questions, found a bug, or think there is room for improvement to the code please leave a comment.</p>
<h3>Screenshot</h3>
<p><img src="http://valendesigns.com/wp-content/uploads/2008/08/vesper-dark.jpg" alt="vesper-dark" title="vesper-dark" width="460" height="399" class="alignnone size-full wp-image-259" /></p>
<h3>Download File</h3><ul class="notebook-file"><li><a title="Download File" href="http://valendesigns.com/downloads/vesper-dark.zip">Download</a></li></ul>
<h3>Installation</h3>
<ul class="notebook-ul">
<li>Download Vesper Dark</li>
<li>Unpack the zip file</li>
<li>Upload the ‘vesper-dark’ folder and all of its contents to the ‘/wp-content/themes/’ directory</li>
<li>Activate the theme through the ‘Design’ menu in WordPress</li>
<li>Download the <a rel="external" href="http://wordpress.org/extend/plugins/wp-pagenavi/">wp-pagenavi</a> plugin by <a rel="external" href="http://lesterchan.net/">Lester Chan</a></li>
<li>Activate the plugin through the ‘Plugins’ menu in WordPress</li>
<li>Done, enjoy!</li>
</ul>
<p></p>
<h3>Features</h3>
<p>Features include: Excerpt Reloaded; WP-Pagenavi; Recent Posts; Widget-Ready; simple, clean, organized layout; Valid HTML; Valid CSS.<br />
<h3>Donations</h3><ul class="notebook-donate"><li>Make a <a class="donateLink" href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=accounts@valendesigns.com&item_name=Donation+for+Code+Snippet" rel="external">donation</a> and help keep the awesomeness flowing.</li></ul> <h3>Disclaimer</h3><div class="disclaimer"><p>Valen Designs grants you a nonexclusive copyright license to use all programming code examples from which you can generate similar function tailored to your own specific needs.</p> <p>Valen Designs, cannot guarantee or imply reliability, serviceability, or function of these programs.</p> <p>All programs contained herein are provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://valendesigns.com/wordpress/vesper-dark-a-new-theme-variation/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Free Vesper theme for Wordpress</title>
		<link>http://valendesigns.com/wordpress/free-vesper-theme-for-wordpress/</link>
		<comments>http://valendesigns.com/wordpress/free-vesper-theme-for-wordpress/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 23:26:49 +0000</pubDate>
		<dc:creator>Derek Herman</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[Valid]]></category>
		<category><![CDATA[Widget-Ready]]></category>

		<guid isPermaLink="false">http://valendesigns.com/?p=47</guid>
		<description><![CDATA[Looking for a professional, clean layout? Vesper is your answer.
We love giving back to the open source community and thought what a better way than to build a beautiful template. Vesper is a free widget ready 2 column fixed width template written in valid standards based code for the Wordpress content management system. Vesper supports [...]]]></description>
			<content:encoded><![CDATA[<p>Looking for a professional, clean layout? Vesper is your answer.</p>
<p>We love giving back to the open source community and thought what a better way than to build a beautiful template. Vesper is a free widget ready 2 column fixed width template written in valid standards based code for the Wordpress content management system. Vesper supports second level subpage navigation that is very similar to our own here. Basically, if a top level page has child pages it will display them in the sidebar when viewing that page, even if you have widgets enabled.</p>
<p>As well, Vesper has support for a more advanced paging navigation through the use of the wp-pagenavi plugin. The template has the pagination style built into the style.css file and removes the call to the default CSS file that comes with wp-pagenavi by a simple remove action in the functions.php file in the Vesper directory, so everything should work right out of the box.</p>
<p>In addition, Vesper is Wordpress 2.6 compatible and should also work in previous version but has only been tested in 2.3 and above. You can download the latest version of Vesper below and play around with it. If you have any questions, found a bug, or think there is room for improvement to the code please leave a comment.</p>
<h3>Screenshot</h3>
<p><img src="http://valendesigns.com/wp-content/uploads/2008/07/vesper.jpg" alt="vesper" title="vesper" width="460" height="399" class="alignnone size-full wp-image-262" /></p>
<h3>Download File</h3><ul class="notebook-file"><li><a title="Download File" href="http://wordpress.org/extend/themes/vesper">Download from the Wordpress.Org Theme Directory</a></li></ul>
<h3>Installation</h3>
<ul class="notebook-ul">
<li>Download Vesper</li>
<li>Unpack the zip file</li>
<li>Upload the &#8216;vesper&#8217; folder and all of its contents to the &#8216;/wp-content/themes/&#8217; directory</li>
<li>Activate the theme through the &#8216;Design&#8217; menu in WordPress</li>
<li>Download the <a rel="external" href="http://wordpress.org/extend/plugins/wp-pagenavi/">wp-pagenavi</a> plugin by <a rel="external" href="http://lesterchan.net/">Lester Chan</a></li>
<li>Activate the plugin through the &#8216;Plugins&#8217; menu in WordPress</li>
<li>Done, enjoy!</li>
</ul>
<h3>Features</h3>
<p>Features include: Excerpt Reloaded; WP-Pagenavi; Recent Posts; Widget-Ready; simple, clean, organized layout; Valid HTML; Valid CSS.</p>
<h3>Donations</h3><ul class="notebook-donate"><li>Make a <a class="donateLink" href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=accounts@valendesigns.com&item_name=Donation+for+Code+Snippet" rel="external">donation</a> and help keep the awesomeness flowing.</li></ul> <h3>Disclaimer</h3><div class="disclaimer"><p>Valen Designs grants you a nonexclusive copyright license to use all programming code examples from which you can generate similar function tailored to your own specific needs.</p> <p>Valen Designs, cannot guarantee or imply reliability, serviceability, or function of these programs.</p> <p>All programs contained herein are provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://valendesigns.com/wordpress/free-vesper-theme-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
		<item>
		<title>8 Ways to Secure Your Wordpress Weblog</title>
		<link>http://valendesigns.com/wordpress/8-ways-to-secure-your-wordpress-weblog/</link>
		<comments>http://valendesigns.com/wordpress/8-ways-to-secure-your-wordpress-weblog/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 21:15:35 +0000</pubDate>
		<dc:creator>Derek Herman</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Upgrade]]></category>

		<guid isPermaLink="false">http://valendesigns.com/?p=44</guid>
		<description><![CDATA[
Content is probably your single most important assets on the web. So maybe you should consider keeping it protected. If you are like the many others out there using Wordpress to manage your precious content, than you probably should do a few things to help make it more secure from the admin side. Image you [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://valendesigns.com/wp-content/uploads/2008/07/lock-it-down.jpg" alt="Wordpress Security" title="Wordpress Security" width="460" height="60" class="alignnone size-full wp-image-264" /><br />
Content is probably your single most important assets on the web. So maybe you should consider keeping it protected. If you are like the many others out there using Wordpress to manage your precious content, than you probably should do a few things to help make it more secure from the admin side. Image you were hacked and lost everything, how devastating would that be? Take some simple measure now that will save you tons of heartache in the future.</p>
<p>We can all agree that having a secure web site is very important but what people forget is that you need to actually do a little work to make it that way. Yes, Wordpress does a good job of doing a lot of the heavy lifting for us, but there are always ways to improve. This post is dedicated to the simple but affective solutions for enhancing your sites security and lowering your chances of being hacked. Mind you if someone is determined to get in there isn’t a whole hell of a lot you can do to stop them, but there is a lot you can do to deter them hopefully just long enough to move on.</p>
<h3>Always use the most recent version of Wordpress</h3>
<p>Make sure you update your version of Wordpress when an update becomes available. The main reason for this is because some people are not like the rest of us morally obligated humans. They spend a great deal of their time finding our sites vulnerabilities so they can insert malicious code or even take it over. When Wordpress comes out with an update it is usually to fix these holes and make your site more secure. I know the process of doing this can be a bit laborious and for some just not an option. For that reason you should visit Techie Buzz to download their <a rel="external" href="http://techie-buzz.com/wordpress-plugins/wordpress-automatic-upgrade-plugin-update.html">Wordpress Automatic Upgrade Plugin</a> which automates the process and makes backing up and upgrading your Wordpress super simple.</p>
<h3>Change the default Username &amp; Password</h3>
<p>You should never use the default username or password that is given to you when you set up Wordpress. First, sign into the administrative section of Wordpress and reset your password to something at least 10 alphanumeric characters long. Also, be sure that is not a real word but a combination of two or more and a number or acronym. Make them work for it, right? You can also check out an article on blogherald called <a rel="external" href="http://www.blogherald.com/2007/05/08/protect-your-blog-with-a-solid-password/">Protect Your Blog With a Solid Password</a> that is of some use. Second, sign into the PHPMyAdmin through your web servers account center and change your username from &#8220;admin&#8221; to something much harder to guess. If you leave the username as &#8220;admin&#8221; you have basically made a hackers job that much easier because half the work is done.</p>
<h3>Login Lockdown Plugin</h3>
<p><a rel="external" href="http://www.bad-neighborhood.com/login-lockdown.html">Login LockDown</a> is a useful plugin that monitors the login attempts to your site. Basically, it checks how many times in a short period the same IP range has tried accessing your administrative files. If, in that period of time, they exceed the number of attempts allowed, Login LockDown will essentially lock them out and no more access privileges for the period of time you previously set. This is good for deterring brute force attacks on your username and password.</p>
<h3>Protect your Wordpress wp-admin folder</h3>
<p>A simple but powerful plugin that adds a 2nd layer of security to your site by requiring a username and password to gain access to anything in the /wp-admin/ folder, is <a rel="external" href="http://wordpress.org/extend/plugins/askapache-password-protect/">AskApache Password Protect</a>. It’s really easy to use, all you need to do is create a second username and password and bam, you got some more protection. It works by writing a new .htaccess file for that folder, and encrypts your new password. It’s super simple to use and highly recommended.</p>
<h3>Backup Your Posts/Pages and Comments</h3>
<p>This is to make certain that your able to revert to an earlier clean version in the face of disaster. I could suggest a plugin or two but am not going to because I don&#8217;t trust them. I think you should always do a full manual database backup as often as you feel necessary and use the export feature in newer versions of Wordpress to do a basic backup between full database backups. Always save your files in a couple of location in case one gets corrupted so you don&#8217;t loose your mind later.</p>
<h3>Loose the Wordpress version string.</h3>
<p>Displaying which Wordpress version you are running can leave you vulnerable to attacks. Hackers usually run attacks based on specific versions because there are know issues they can exploit. If you are proudly showing the your version it could actually bite you in the ass. Make it harder and keep them guessing is always my motto.</p>
<p>Below you will find two perfectly good ways to manually change your version or make it disappear altogether. However, I wrote a <a href="http://valendesigns.com/remove-my-version-wordpress-plugin/">Remove-My-Version</a> plugin for Wordpress a couple days ago where you don&#8217;t have to change any of your files directly, for all you lazy folks. This works by either making the meta generator completely go away or by replacing the wp-version with a random alphanumeric set of characters. So it will work for everyone, even if you haven&#8217;t upgraded yet, which you should!</p>
<p><strong>Old way, below version 2.4</strong><br />
Open header.php and find the line that looks like the text below and change it or delete it all together.</p>
<p>Change:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;meta name=&quot;generator&quot; content=&quot;WordPress <span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'version'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;</pre></td></tr></table></div>

<p>To:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;meta name=&quot;generator&quot; content=&quot;WordPress&quot; /&gt;</pre></td></tr></table></div>

<p><strong>New way, version 2.4 &amp; above</strong><br />
The Wordpress version generator was moved into the core and standardized, since so many themes did it differently. You can remove it by adding this to your theme&#8217;s functions.php:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">remove_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_generator'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Make a blank index.html for the /plugins/ directory</h3>
<p>If you view http://www.yourdomain.com/wp-content/plugins/ in your browser you will see a directory list. This is problematic because someone could potentially look at your plugins and see if you are using one with known security vulnerabilities and exploit them. Just make a blank index.html and put it in the /plugins/ folder and this is all fixed. Pretty cut and dry.</p>
<h3>Block search engines from crawling your wp- folders</h3>
<p>There is no reason you need to have all of your Wordpress files indexed, so it’s probably just a good idea to block them so when people search they don&#8217;t see those files. You can block search engines from crawling your wp- folders by blocking access via robots.txt file. Simply add this line:<br />
Disallow: /wp-*</p>
<h3>Lock It Down</h3>
<p>Well, I hope you found this informative and useful and I want to also mention that there are more ways to secure your site and this is by no means an exhaustive list, but more of a jumping off point. happy securing folks.<br />
<h3>Donations</h3><ul class="notebook-donate"><li>Make a <a class="donateLink" href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=accounts@valendesigns.com&item_name=Donation+for+Code+Snippet" rel="external">donation</a> and help keep the awesomeness flowing.</li></ul> <h3>Disclaimer</h3><div class="disclaimer"><p>Valen Designs grants you a nonexclusive copyright license to use all programming code examples from which you can generate similar function tailored to your own specific needs.</p> <p>Valen Designs, cannot guarantee or imply reliability, serviceability, or function of these programs.</p> <p>All programs contained herein are provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://valendesigns.com/wordpress/8-ways-to-secure-your-wordpress-weblog/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Remove-My-Version Wordpress Plugin</title>
		<link>http://valendesigns.com/wordpress/remove-my-version-wordpress-plugin/</link>
		<comments>http://valendesigns.com/wordpress/remove-my-version-wordpress-plugin/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 11:30:14 +0000</pubDate>
		<dc:creator>Derek Herman</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://valendesigns.com/?p=45</guid>
		<description><![CDATA[Recently Valen Designs had upgraded to a newer version of Wordpress and discovered that the wp-version for the meta generator in the head of our template was being added without any call to it. Previously you would add a line in you header.php file that would show what version of Wordpress you were using and [...]]]></description>
			<content:encoded><![CDATA[<p><span class="large">R</span>ecently Valen Designs had upgraded to a newer version of Wordpress and discovered that the wp-version for the meta generator in the head of our template was being added without any call to it. Previously you would add a line in you header.php file that would show what version of Wordpress you were using and was up to you if you wanted to leave it in or not. Now things are different. You actually need to tell Wordpress that you want to remove the meta generator. Why remove it you ask? It&#8217;s a security issue. If hackers know what version you use than they can use a technique specifically designed for that version to exploit your site.</p>
<p>The Remove-My-Version plugin is very simple and works in all version of Wordpress but just differently depending on what you have. In versions before 2.4 it will change the version to be a random string of alphanumeric characters. However, in newer versions it simply removes it all together. In addition, the plugin changes the wp-version in your feeds for all installations for added security.</p>
<h3>Installation</h3>
<p>To install the plugin just upload the remove-my-version.php file to your wp-content/plugins/ directory and activate it through the administration panel. This plugin requires no configuration, it just works.</p>
<h3>Download File</h3><ul class="notebook-file"><li><a title="Download File" href="http://valendesigns.com/downloads/remove-my-version.zip">Version 1.0</a></li></ul> <h3>Donations</h3><ul class="notebook-donate"><li>Make a <a class="donateLink" href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=accounts@valendesigns.com&item_name=Donation+for+Code+Snippet" rel="external">donation</a> and help keep the awesomeness flowing.</li></ul> <h3>Disclaimer</h3><div class="disclaimer"><p>Valen Designs grants you a nonexclusive copyright license to use all programming code examples from which you can generate similar function tailored to your own specific needs.</p> <p>Valen Designs, cannot guarantee or imply reliability, serviceability, or function of these programs.</p> <p>All programs contained herein are provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://valendesigns.com/wordpress/remove-my-version-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
