<?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>BuyNowShop &#187; WPFirstAid</title>
	<atom:link href="http://buynowshop.com/tag/wpfirstaid/feed/" rel="self" type="application/rss+xml" />
	<link>http://buynowshop.com</link>
	<description>WordPress administration, installation, and development.</description>
	<lastBuildDate>Tue, 31 Jan 2012 20:32:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Featured in DMM v1.7</title>
		<link>http://buynowshop.com/2010/07/featured-in-dmm-v1-7/</link>
		<comments>http://buynowshop.com/2010/07/featured-in-dmm-v1-7/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 21:26:02 +0000</pubDate>
		<dc:creator>Edward Caissie</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[custom menu]]></category>
		<category><![CDATA[desk mess mirrored]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[WPFirstAid]]></category>

		<guid isPermaLink="false">http://buynowshop.com/?p=1442</guid>
		<description><![CDATA[The custom menu code featured in the free WordPress theme Desk Mess Mirrored version 1.7
Related posts:<ol>
<li><a href='http://buynowshop.com/2009/07/hide-a-menu-page/' rel='bookmark' title='Hide a Menu Page'>Hide a Menu Page</a></li>
<li><a href='http://buynowshop.com/2011/07/desk-mess-mirrored-1-9/' rel='bookmark' title='Desk Mess Mirrored 1.9'>Desk Mess Mirrored 1.9</a></li>
<li><a href='http://buynowshop.com/2010/09/bns-featured-category-1-8-1/' rel='bookmark' title='BNS Featured Category 1.8.1'>BNS Featured Category 1.8.1</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>DMM = the Desk Mess Mirrored theme</p>
<p>Just a quick preview of one of the upcoming featured changes to the Desk Mess Mirrored theme: custom menus via the <a href="http://codex.wordpress.org/Function_Reference/wp_nav_menu"><em>wp_nav_menu()</em></a> function.</p>
<p>The current code for Desk Mess Mirrored version 1.6 in <em>header.php</em> for menus is this (cleaned up for display):</p>
<pre class="brush: php; first-line: 41; highlight: [46]; title: ; notranslate">
&lt;?php if ( is_home() || is_front_page()) { ?&gt;
	&lt;?php wp_list_pages( 'title_li=&amp;depth=1&amp;include=2' ); ?&gt;
	&lt;?php wp_list_pages( 'title_li=&amp;depth=1&amp;exclude=2' ); ?&gt;
&lt;?php } else { ?&gt;
	&lt;li&gt;&lt;a href=&quot;&lt;?php bloginfo( 'url' ); ?&gt;&quot;&gt;&lt;?php _e( 'Home', 'desk-mess-mirrored' ) ?&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;?php wp_list_pages( 'title_li=&amp;depth=1' ); ?&gt;
&lt;?php } ?&gt;
</pre>
<p>All of that code is simply replaced by this line:</p>
<pre class="brush: php; first-line: 41; title: ; notranslate">
&lt;?php dmm_nav_menu(); ?&gt;
</pre>
<p>The function <em>dmm_nav_menu()</em> is referring to this section of code now found in the functions.php template file: </p>
<pre class="brush: php; first-line: 88; highlight: [106]; title: ; notranslate">
    // Add wp_nav_menu() custom menu support
    add_theme_support( 'menus' );
    function dmm_nav_menu() {
      if ( function_exists( 'wp_nav_menu' ) )
        wp_nav_menu( array(
                           'theme_location' =&gt; 'top-menu',
                           'depth' =&gt; 1,
                           'fallback_cb' =&gt; 'dmm_list_pages'
                           ) );
      else
        dmm_list_pages();
    }

    function dmm_list_pages() {
      if ( is_home() || is_front_page() ) {
        wp_list_pages( 'title_li=&amp;depth=1' );
      } else { ?&gt;
        &lt;li&gt;&lt;a href=&quot;&lt;?php bloginfo( 'url' ); ?&gt;&quot;&gt;&lt;?php _e( 'Home', 'desk-mess-mirrored' ) ?&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;?php wp_list_pages( 'title_li=&amp;depth=1' );
      }
    }

    add_action( 'init', 'register_dmm_menu' );
    function register_dmm_menu() {
      register_nav_menu( 'top-menu', __( 'Top Menu' ) );
    }
    // wp_nav_menu() end
</pre>
<p>Notice the highlighted lines are identical which means at the default settings after updating to version 1.7 you should see no difference in how your site looks, but you are now able to set the menu links using the interface under Appearance | Menus. Also note, the menu is still set as a top-level or parent only menu. Future versions of DMM may offer drop-down menus and other options but they are not currently scheduled for a particular release date or version at this time.</p>
<p>All of these changes were based on the article I wrote at <a href="http://wpfirstaid.com">WPFirstAid.com</a> titled: <a href="http://wpfirstaid.com/2010/07/upgrade-wp_list_pages-to-wp_nav_menu/">Upgrade wp_list_pages() to wp_nav_menu()</a>.</p>
<p>Enjoy!</p>
<p style='text-align:left'>&copy; 2010, <a href='http://buynowshop.com'>BuyNowShop</a>. All rights reserved. </p>
<p>Related posts:<ol>
<li><a href='http://buynowshop.com/2009/07/hide-a-menu-page/' rel='bookmark' title='Hide a Menu Page'>Hide a Menu Page</a></li>
<li><a href='http://buynowshop.com/2011/07/desk-mess-mirrored-1-9/' rel='bookmark' title='Desk Mess Mirrored 1.9'>Desk Mess Mirrored 1.9</a></li>
<li><a href='http://buynowshop.com/2010/09/bns-featured-category-1-8-1/' rel='bookmark' title='BNS Featured Category 1.8.1'>BNS Featured Category 1.8.1</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://buynowshop.com/2010/07/featured-in-dmm-v1-7/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Adding Dynamic Copyrights</title>
		<link>http://buynowshop.com/2010/02/adding-dynamic-copyrights/</link>
		<comments>http://buynowshop.com/2010/02/adding-dynamic-copyrights/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 01:52:33 +0000</pubDate>
		<dc:creator>Edward Caissie</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[cais]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WPFirstAid]]></category>

		<guid isPermaLink="false">http://buynowshop.com/?p=1243</guid>
		<description><![CDATA[Dynamic copyright notices (code sample included) to be added to all BuyNowShop.com themes.
Related posts:<ol>
<li><a href='http://buynowshop.com/2011/09/shades-1-7/' rel='bookmark' title='Shades 1.7'>Shades 1.7</a></li>
<li><a href='http://buynowshop.com/2011/12/nona-1-4/' rel='bookmark' title='NoNa 1.4'>NoNa 1.4</a></li>
<li><a href='http://buynowshop.com/2011/01/nona-1-3-1/' rel='bookmark' title='Nona 1.3.1'>Nona 1.3.1</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>We will be adding to all of <a href="http://buynowshop.com/themes/">our themes</a> our latest optimization, the <code>bns_dynamic_copyright()</code> function.</p>
<p><a href="http://wpfirstaid.com/">WPFirstAid.com</a> recently <a href="http://wpfirstaid.com/2010/02/dynamic-copyright/">wrote a post</a> covering the inclusion of this dynamic copyright function into most any theme. This added functionality will be included with the next update of each of our themes.</p>
<p>Using the <a href="http://codex.wordpress.org/Function_Reference/get_posts">get_post()</a> function, <strong>bns_dynamic_copyright()</strong> essentially finds the blog&#8217;s first post; makes note of its date; then creates a copyright notice that takes into account the year in the date of the first (read: oldest) post to recognize the lifetime of the blog.</p>
<p>Here is the code to be placed in the <strong>functions.php</strong> file:</p>
<pre class="brush: php; title: ; notranslate">function bns_dynamic_copyright() {
  /* Get all posts */
  $all_posts = get_posts('post_status=publish&amp;order=ASC');
  /* Get first post */
  $first_post = $all_posts[0];
  /* Get date of first post */
  $first_date = $first_post-&gt;post_date_gmt;

  /* Display common footer copyright notice */
  _e('Copyright &amp;copy; ');
  /* Display first post year and current year */
  if ( substr($first_date,0,4) == date(Y) ) {
  /* Only display current year if no posts in previous years */
    echo date(Y);
  } else {
    echo substr($first_date,0,4) . &quot;-&quot; . date(Y);
  }
  /* Display blog name from 'General Settings' page */
  echo ' &lt;strong&gt;' . get_bloginfo('name') . '&lt;/strong&gt; ';
  _e('All rights reserved.');
}</pre>
<p>&#8230; and here is the line of code to replace the <em>old static</em> copyright notice:</p>
<pre class="brush: xml; title: ; notranslate">&lt;?php bns_dynamic_copyright(); ?&gt;</pre>
<p style='text-align:left'>&copy; 2010, <a href='http://buynowshop.com'>BuyNowShop</a>. All rights reserved. </p>
<p>Related posts:<ol>
<li><a href='http://buynowshop.com/2011/09/shades-1-7/' rel='bookmark' title='Shades 1.7'>Shades 1.7</a></li>
<li><a href='http://buynowshop.com/2011/12/nona-1-4/' rel='bookmark' title='NoNa 1.4'>NoNa 1.4</a></li>
<li><a href='http://buynowshop.com/2011/01/nona-1-3-1/' rel='bookmark' title='Nona 1.3.1'>Nona 1.3.1</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://buynowshop.com/2010/02/adding-dynamic-copyrights/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

