<?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>SEOAdsenseThemes.com &#187; How-To</title>
	<atom:link href="http://www.seoadsensethemes.com/category/wordpress/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.seoadsensethemes.com</link>
	<description>Search Engine Optimized (SEO), Adsense-Ready Free WordPress Themes</description>
	<lastBuildDate>Wed, 25 Aug 2010 06:11:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress Multi-Level Drop Down menu using jQuery</title>
		<link>http://www.seoadsensethemes.com/wordpress-multi-level-drop-down-menu-using-jquery/</link>
		<comments>http://www.seoadsensethemes.com/wordpress-multi-level-drop-down-menu-using-jquery/#comments</comments>
		<pubDate>Sat, 09 Aug 2008 14:53:28 +0000</pubDate>
		<dc:creator>Stanley</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Dropdown Menu]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.seoadsensethemes.com/?p=23</guid>
		<description><![CDATA[
Click here to view demo
As WordPress theme designers, we&#8217;re often faced between the choice of going for purely CSS drop-down menu or javascript drop-down menus in our struggle with cross-browser compatibility.
The aim of this short tutorial is help you build a simple multi-level drop-down menu in your WordPress theme using jQuery&#8217;s JavaScript library to ensure [...]]]></description>
			<content:encoded><![CDATA[<p style="float: right; margin: 0 0 1em 2em; padding: 18px 28px; border: 3px double #ddd; background: #f8f8f8;"><img class="size-full wp-image-27" title="WordPress jQuery Multi-Level Drop-Down Menu" src="http://www.seoadsensethemes.com/wp-content/uploads/2008/08/wordpress-jquery-multi-level-drop-down-menu.png" alt="WordPress jQuery Multi-Level Drop-Down Menu" width="252" height="117" /><a href="http://www.seoadsensethemes.com/wordpress-jquery-multi-level-drop-down-menus/"><br />
Click here to view demo</a></p>
<p>As WordPress theme designers, we&#8217;re often faced between the choice of going for purely CSS drop-down menu or javascript drop-down menus in our struggle with cross-browser compatibility.</p>
<p>The aim of this short tutorial is help you build a simple multi-level drop-down menu in your WordPress theme using jQuery&#8217;s JavaScript library to ensure cross-browser compatibility.</p>
<p><span id="more-23"></span>When I first started to design WordPress themes, I went the pure-CSS way. I found a variety of cross-browser CSS-only drop-down menus at Stu Nicholls CSS Play and implemented his solutions into my themes. Some people do not like the way Stu hacked CSS to ensure cross-browser compatibility. It may be ugly but it works. And you can&#8217;t really use WordPress wp_list_pages() tag with Stu Nicholl&#8217;s CSS because the tag&#8217;s parameters could not reproduce the CSS hacks needed to make it work.</p>
<p>Later on, as I started to embrace more JavaScript in my WordPress themes, I decided to built my drop-down menu with a bit of jQuery Javascript help. It saved a lot of effort. No more unnecessary CSS hacks. Plays nice with WordPress <code>wp_list_pages()</code> tag. And WordPress installation already comes with jQuery library included. This is one of the main reasons why I chose jQuery among other Javascript libraries.</p>
<p>Anyway, I&#8217;m not here to convince you to use JavaScript for your WordPress drop-down menus. To those of you who are would like to use jQuery for your multi-level WordPress drop-down menu, I hope you&#8217;ll find the short tutorial below helpful.</p>
<p>Add this bit of JavaScript between the <code>&lt;head&gt;&lt;/head&gt;</code> HTML tags in your WordPress theme&#8217;s  <code>header.php</code> (<em>thanks to <a href="http://www.kriesi.at/archives/create-a-multilevel-dropdown-menu-with-css-and-improve-it-via-jquery">kriesi.at</a></em>):</p>
<pre class="syntax-highlight:javascript">
&lt;?php wp_enqueue_script(&#039;jquery&#039;); ?&gt;

&lt;script type=&#039;text/javascript&#039;&gt;
jQuery(document).ready(function() {
jQuery(&quot;#dropmenu ul&quot;).css({display: &quot;none&quot;}); // Opera Fix
jQuery(&quot;#dropmenu li&quot;).hover(function(){
jQuery(this).find(&#039;ul:first&#039;).css({visibility: &quot;visible&quot;,display: &quot;none&quot;}).show(268);
},function(){
jQuery(this).find(&#039;ul:first&#039;).css({visibility: &quot;hidden&quot;});
});
});
&lt;/script&gt;
</pre>
<p>The HTML. We will list the pages using WordPress default <code>wp_list_pages()</code> tag. I used it in <code>header.php</code> of my WordPress theme:</p>
<pre class="syntax-highlight:html">
&lt;ul id=&quot;dropmenu&quot;&gt;
&lt;?php wp_list_pages(&#039;sort_column=menu_order&amp;amp;amp;amp;title_li=&#039;); ?&gt;
&lt;/ul&gt;
</pre>
<p>Now here&#8217;s the CSS:</p>
<pre class="syntax-highlight:css">
&lt;style type=&quot;text/css&quot;&gt;
#dropmenu, #dropmenu ul {margin:0; padding:0; list-style-type:none; list-style-position:outside; position:relative; line-height:1.5em; z-index:300; width:100%; background:#fff; font-weight:bold;}
#dropmenu a {display:block; padding:0.25em 1em; color:#686868; border-right:1px solid #c8c8c8; text-decoration:none; background:#fff;}
#dropmenu a:hover {background:#888; color:#fff;}
#dropmenu li {float:left; position:relative;}
#dropmenu ul {position:absolute; display:none; width:12em; top:1.9em; left:-1px;}
#dropmenu ul a {border-left:1px solid #c8c8c8;}
#dropmenu li ul {border-top:1px solid #c8c8c8; width:14.1em;}
#dropmenu li ul a {width:12em; height:auto; float:left;  border-bottom:1px solid #c8c8c8;}
#dropmenu ul ul {top:auto;}
#dropmenu li ul ul {left:12em; margin:0px 0 0 10px;}
#dropmenu li:hover ul ul, #dropmenu li:hover ul ul ul, #dropmenu li:hover ul ul ul ul {display:none;}
#dropmenu li:hover ul, #dropmenu li li:hover ul, #dropmenu li li li:hover ul, #dropmenu li li li li:hover ul {display:block;}
&lt;/style&gt;
</pre>
<p>The CSS styling provided is pretty much barebones. You can view another <a title="WordPress jQuery Multi-Level Drop-Down Menu Demo" href="http://www.hotelsandtravel.org" target="_blank">demo of WordPress jQuery Multi-Level Drop-Down Menu</a> in action here.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 731px; width: 1px; height: 1px; overflow: hidden;">Need quick results? Then go through our latest &lt;a href=&#8221;http://www.testking.com/117-101.htm&#8221;&gt;testking 117-101&lt;/a&gt; preparation material which includes &lt;a href=&#8221;http://www.testking.com/156-215.htm&#8221;&gt;testking 156-215&lt;/a&gt; dumps and &lt;a href=&#8221;http://www.testking.com/1Y0-259.htm&#8221;&gt;testking 1Y0-259&lt;/a&gt; practice exam so you will pass exam on first try.</div>
<hr />
<p style="text-align:center; padding:2em 0; font-size:0.9em; font-style:italic; border-top:1px solid #dfdfdf; margin:2em 0 0 0; ">Need quick results? Then go through our latest <a href="http://www.testking.com/117-101.htm">testking 117-101</a> preparation material which includes <a href="http://www.testking.com/156-215.htm">testking 156-215</a> dumps and <a href="http://www.testking.com/1Y0-259.htm">testking 1Y0-259</a> practice exam so you will pass exam on first try.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seoadsensethemes.com/wordpress-multi-level-drop-down-menu-using-jquery/feed/</wfw:commentRss>
		<slash:comments>95</slash:comments>
		</item>
		<item>
		<title>Putting a &#8216;New Post&#8217; image label next to WordPress entries posted within the last 24 hours</title>
		<link>http://www.seoadsensethemes.com/putting-a-new-post-image-label-next-to-entries-wordpress-posted-last-24-hours/</link>
		<comments>http://www.seoadsensethemes.com/putting-a-new-post-image-label-next-to-entries-wordpress-posted-last-24-hours/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 06:18:06 +0000</pubDate>
		<dc:creator>Stanley</dc:creator>
				<category><![CDATA[How-To]]></category>

		<guid isPermaLink="false">http://www.seoadsensethemes.com/?p=13</guid>
		<description><![CDATA[
&#8230; or perhaps entries posted in the last 48 hours? Ever wanted to put a small image label next to your post telling readers &#8220;Hey, this post is barely 2 days old. It&#8217;s new!&#8221;
Of course, putting a new post label is nothing new. But again, this tiny feature does not come with default WordPress. Luckily [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-14" title="New Post Label" src="http://www.seoadsensethemes.com/wp-content/uploads/2008/08/new.png" alt="New Post Label" width="286" height="230" /></p>
<p>&#8230; or perhaps entries posted in the last 48 hours? Ever wanted to put a small image label next to your post telling readers &#8220;Hey, this post is barely 2 days old. It&#8217;s new!&#8221;</p>
<p>Of course, putting a new post label is nothing new. But again, this tiny feature does not come with default WordPress. Luckily with just one or two lines of PHP code, you can modify your WordPress theme to label your new entries automatically.</p>
<p>The following code sample shows how you can label your posts with a tiny image &#8216;new.gif&#8217; if your post is less than 2 days old. Within your latest entries Loop, we&#8217;ll put the &#8216;new.gif&#8217; image label right new to your post title:<br />
<span id="more-13"></span>
<pre class="syntax-highlight:php">
...
...
&lt;h2&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &lt;?php the_title_attribute(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;?php if ( (time()-get_the_time(&#039;U&#039;)) &lt;= (2*86400) ) { ?&gt;
&lt;img class=&quot;new_entry_label&quot; src=&quot;&lt;?php bloginfo(&#039;template_directory&#039;); ?&gt;/images/new.gif&quot; alt=&quot;(New Entry)&quot; title=&quot;(New Entry)&quot; /&gt;
&lt;?php } ?&gt;
...
...
</pre>
<p>That&#8217;s it. Click <a href="http://www.hotelsandtravel.org">here</a> to see it in action on one of my WordPress theme demos. Notice how the newer posts&#8217; title are labelled with a new.gif image.</p>
<p>Now for some explanation on the code used &#8230;</p>
<p>PHP <code>time()</code> function returns the current time in <em>Unix Epoch format</em> which looks like this:</p>
<pre><code>12217984786</code></pre>
<p>The function <code>get_the_time('U')</code> returns the entry posted time in <em>Unix Epoch format</em>. Now that both current time ( time() ) and entry posted time ( get_the_time(&#8216;U&#8217;) ) is in <em>Unix Epoch format</em>, we can easily calculate the time difference by substracting current time with entry posted time;</p>
<pre><code>time()-get_the_time('U')</code></pre>
<p>Finally, we evaluate if the difference is less than 2 days (again converted to <em>Unix Epoch format</em> by multiplying with 86400 ), the condition is true and the <code><img alt="" /></code> tag is executed which puts &#8220;new.gif&#8221; image label next to your post title.</p>
<pre><code>
&lt;?php if ( (time()-get_the_time('U')) &lt;= (2*86400) ) { ?&gt;
	&lt;img class="new_entry_label" src="&lt;?php bloginfo('template_directory'); ?&gt;/images/new.gif" alt="(New Entry)" title="(New Entry)" /&gt;
&lt;?php } ?&gt;
</code></pre>
<p>If you want to label 7-day old posts as new instead, just change <code>(2*86400)</code> to <code>(7*86400)</code>. That&#8217;s it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seoadsensethemes.com/putting-a-new-post-image-label-next-to-entries-wordpress-posted-last-24-hours/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
