<?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>bavotasan.com &#187; Directory</title>
	<atom:link href="http://bavotasan.com/tag/directory/feed/" rel="self" type="application/rss+xml" />
	<link>http://bavotasan.com</link>
	<description>by c.bavota</description>
	<lastBuildDate>Tue, 07 Feb 2012 15:42:10 +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>The New Google Font API</title>
		<link>http://bavotasan.com/2010/google-font-api/</link>
		<comments>http://bavotasan.com/2010/google-font-api/#comments</comments>
		<pubDate>Mon, 24 May 2010 15:55:04 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[body]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Css File]]></category>
		<category><![CDATA[Directory]]></category>
		<category><![CDATA[face kits]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[head tags]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[look]]></category>
		<category><![CDATA[New]]></category>
		<category><![CDATA[serif]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[Stylesheet]]></category>
		<category><![CDATA[use]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=2074</guid>
		<description><![CDATA[Using the standard Web safe fonts is quickly becoming a thing of the past thanks to modern alternatives like @font-face kits and the new Google Font API. Taking a quick look through the Getting Started guide shows just how simple it is to apply the API to your Web site. All you have to do [...]]]></description>
			<content:encoded><![CDATA[<p>Using the standard Web safe fonts is quickly becoming a thing of the past thanks to modern alternatives like @font-face kits and the new <a href="http://code.google.com/apis/webfonts/">Google Font API</a>.  Taking a quick look through the <a href="http://code.google.com/apis/webfonts/docs/getting_started.html">Getting Started</a> guide shows just how simple it is to apply the API to your Web site. All you have to do is add a link between your site&#8217;s head tags to the CSS file hosted on Google, and then you can call the chosen font throughout your stylesheet.<br />
<span id="more-2074"></span><br />
Here is an example of the link:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>link rel<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;stylesheet&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/css&quot;</span> href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://fonts.googleapis.com/css?family=Tangerine&quot;</span><span style="color: #339933;">&gt;</span></pre></div></td></tr></table></div>

<p>Then you can use the font like this:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="css" style="font-family:monospace;">&lt;style<span style="color: #00AA00;">&gt;</span>
      body <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'Tangerine'</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
        <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">48px</span><span style="color: #00AA00;">;</span>
      <span style="color: #00AA00;">&#125;</span>
&lt;/style<span style="color: #00AA00;">&gt;</span></pre></div></td></tr></table></div>

<p>Check out a list of available font in the <a href="http://code.google.com/webfonts">font directory</a>. They are all licensed for commercial and non-commercial use.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2010/google-font-api/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Check if a Page is a Child of Another Page in WordPress</title>
		<link>http://bavotasan.com/2009/check-if-a-page-is-a-child-of-another-page-in-wordpress/</link>
		<comments>http://bavotasan.com/2009/check-if-a-page-is-a-child-of-another-page-in-wordpress/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 17:11:26 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[default]]></category>
		<category><![CDATA[Directory]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[parent]]></category>
		<category><![CDATA[Place]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[return]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[way]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1456</guid>
		<description><![CDATA[This post has been updated in &#8220;is_child() Conditional Function for WordPress&#8221;. WordPress has some default conditional tags that are really helpful when developing themes and plugins that need specific functions on specific pages. Strange enough though, there is no way to check if a page is a child of another page. This small function checks [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bit.ly/dOxWm7">This post has been updated in &#8220;is_child() Conditional Function for WordPress&#8221;.</a></p>
<p>WordPress has some default <a href="http://codex.wordpress.org/Conditional_Tags">conditional tags</a> that are really helpful when developing themes and plugins that need specific functions on specific pages. Strange enough though, there is no way to check if a page is a child of another page.<br />
<span id="more-1456"></span><br />
This small function checks the database to see if the page happens to have a parent page assigned to it. If so, then the function will return true.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> is_child<span style="color: #009900;">&#40;</span><span style="color: #000088;">$pageID</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: #b1b100;">if</span><span style="color: #009900;">&#40;</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</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;">$pageID</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;">else</span> <span style="color: #009900;">&#123;</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></div></td></tr></table></div>

<p>Place the above code in your theme&#8217;s functions.php file, or create a functions.php file and place it in your theme&#8217;s directory. Then you can use the is_child() function anywhere in your theme. Your code would look something like this:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><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>is_child<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">343</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;This is a child page of 'The Parent Page Title'.&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2009/check-if-a-page-is-a-child-of-another-page-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Securing Your Site&#8217;s Directories</title>
		<link>http://bavotasan.com/2009/securing-your-sites-directories/</link>
		<comments>http://bavotasan.com/2009/securing-your-sites-directories/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 16:51:22 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[com]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[Directory]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[folder]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[Upload]]></category>
		<category><![CDATA[way]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=741</guid>
		<description><![CDATA[If you store files or images in a folder called &#8220;images&#8221;, and people enter www.yoursite.com/images as a URL, they will see a list of all the files you have in that directory. A quick way to solve this is to create an empty index.html or index.php file and upload it to the directory. This will [...]]]></description>
			<content:encoded><![CDATA[<p>If you store files or images in a folder called &#8220;images&#8221;, and people enter <em>www.yoursite.com/images</em> as a URL, they will see a list of all the files you have in that directory. A quick way to solve this is to create an empty index.html or index.php file and upload it to the directory. This will load an empty page instead of showing a content list.<br />
<span id="more-741"></span><br />
Another way of doing this is by modifying (or creating) a .htaccess file. Just place:</p>
<pre name="code" class="php">
Options -indexes
</pre>
<p>in your .htaccess file and it will do the same thing as adding an index.html file to your folder.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2009/securing-your-sites-directories/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Bloginfo to Build a Custom Theme for WordPress</title>
		<link>http://bavotasan.com/2009/using-bloginfo-to-build-a-custom-theme-for-wordpress/</link>
		<comments>http://bavotasan.com/2009/using-bloginfo-to-build-a-custom-theme-for-wordpress/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 14:26:26 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[custom theme]]></category>
		<category><![CDATA[Custom Themes]]></category>
		<category><![CDATA[Directory]]></category>
		<category><![CDATA[Elements]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Programmers]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Stylesheet]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[Whole Lot]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=174</guid>
		<description><![CDATA[When you build a custom theme in WordPress that you would eventually like to share with the WordPress community, you can&#8217;t hard code certain elements like the blog&#8217;s name or images links. I know most coders use things like &#60;a href="../link.php"&#62; or &#60;a href="images/pic.jpg"&#62; but those might not work properly if your WordPress install is [...]]]></description>
			<content:encoded><![CDATA[<p>When you build a custom theme in WordPress that you would eventually like to share with the WordPress community, you can&#8217;t hard code certain elements like the blog&#8217;s name or images links. I know most coders use things like <code>&lt;a href="../link.php"&gt;</code> or <code>&lt;a href="images/pic.jpg"&gt;</code> but those might not work properly if your WordPress install is not in the root directory or if you are on a category page.<br />
<span id="more-174"></span><br />
WordPress has a very useful tag that you might have seen around if you&#8217;ve ever taken a look at the source code of any theme. It&#8217;s called <strong><em>bloginfo</em></strong> and it solves a lot of problems for programmers. Here are some examples of how you would use it.</p>
<p><code>&lt;?php bloginfo('name'); ?&gt;</code><br />
This will bring up the name of the blog as entered under the <em>Settings =&gt; General</em> page in the admin. This tag should be used when coding the header to display the name of the blog.</p>
<p><code>&lt;?php bloginfo('description'); ?&gt;</code><br />
This will display the description of the blog as entered under the <em>Settings =&gt; General</em> page in the admin. This tag should be used somewhere in the header to display the blog&#8217;s description.</p>
<p><code>&lt;?php bloginfo('url'); ?&gt;</code><br />
This will get you the URL of where WordPress has been installed, no matter if it&#8217;s in the root directory or a sub-directory. This is great for linking to certain pages or to link back to the home page.</p>
<p><code>&lt;?php bloginfo('template_url'); ?&gt;</code><br />
This tag is a life saver when developing custom themes. It brings back the location of where your custom theme&#8217;s folder has been installed. Life became a whole lot easier when I discovered this tag. It&#8217;s extremely useful when developing a custom theme if you need to link to a <a href="http://bavotasan.com/tip-of-the-week/creating-a-secondary-css-stylesheet-for-internet-explorer/">secondary stylesheet</a> or display an image stored in the images directory of your custom theme.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2009/using-bloginfo-to-build-a-custom-theme-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Getting Text in your WordPress Search Box</title>
		<link>http://bavotasan.com/2008/getting-text-in-your-wordpress-search-box/</link>
		<comments>http://bavotasan.com/2008/getting-text-in-your-wordpress-search-box/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 03:31:26 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[box]]></category>
		<category><![CDATA[default]]></category>
		<category><![CDATA[Default Theme]]></category>
		<category><![CDATA[Directory]]></category>
		<category><![CDATA[everyone]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Php File]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[use]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=105</guid>
		<description><![CDATA[Have you ever wondered how some sites have text in their search box? This one is pretty easy. All you need to do is modify the searchform.php file, which can be found in your theme&#8217;s directory. Let&#8217;s use the default theme as an example to make it easier for everyone to see what to do. [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wondered how some sites have text in their search box? This one is pretty easy. All you need to do is modify the searchform.php file, which can be found in your theme&#8217;s directory. Let&#8217;s use the default theme as an example to make it easier for everyone to see what to do.<br />
<span id="more-105"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;form method=&quot;get&quot; id=&quot;searchform&quot; action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/&quot;&gt;
&lt;label class=&quot;hidden&quot; for=&quot;s&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Search for:'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/label&gt;
&lt;div&gt;
&lt;input type=&quot;text&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_search_query<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; name=&quot;s&quot; id=&quot;s&quot; /&gt;
&lt;input type=&quot;submit&quot; id=&quot;searchsubmit&quot; value=&quot;Search&quot; /&gt;
&lt;/div&gt;
&lt;/form&gt;</pre></td></tr></table></div>

<p>Now let&#8217;s change&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;input type=&quot;text&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_search_query<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; name=&quot;s&quot; id=&quot;s&quot; /&gt;</pre></td></tr></table></div>

<p>to&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Search &amp; Hit Enter&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;s&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;s&quot;</span> onfocus<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;if (this.value == 'Search &amp; Hit Enter') {this.value = '';}&quot;</span> onblur<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;if (this.value == '') {this.value = 'Search &amp; Hit Enter';}&quot;</span> <span style="color: #339933;">/&gt;</span></pre></td></tr></table></div>

<p>What does all this do? Oh&#8230; So very much.</p>
<p>First, it will automatically fill your search box with &#8220;Search and Hit Enter&#8221;. If you click on the search box, it will disappear and you can enter text. But if you don&#8217;t enter text and click out of the box, &#8220;Search and Hit Enter&#8221; will appear again. </p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2008/getting-text-in-your-wordpress-search-box/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

