<?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>Geeks Villa</title>
	<atom:link href="http://www.geeksvilla.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geeksvilla.com</link>
	<description>Latest News, Reviews for Computer Technology</description>
	<lastBuildDate>Fri, 03 Feb 2012 19:40:30 +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>How to Add Google+ to a WordPress Site</title>
		<link>http://www.geeksvilla.com/how-to-add-google-to-a-wordpress-site/</link>
		<comments>http://www.geeksvilla.com/how-to-add-google-to-a-wordpress-site/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 19:36:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Google Plus]]></category>
		<category><![CDATA[Google Social Media]]></category>
		<category><![CDATA[Google+]]></category>
		<category><![CDATA[Share Button]]></category>
		<category><![CDATA[Social Bookmarking]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[tips tricks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Wordpress Plugin]]></category>
		<category><![CDATA[Wordpress tips]]></category>
		<category><![CDATA[WP Plugin]]></category>

		<guid isPermaLink="false">http://www.geeksvilla.com/?p=520</guid>
		<description><![CDATA[Here is WP Plugin Google Plus for wordpress. Otherwise following article may help you to add manually. We have observed many WordPress website users/owners wants to add Google+ sharing button with their posts. And First thing you need to do is put the following code in your section of your site which you can change/alter [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.geeksvilla.com/how-to-add-google-to-a-wordpress-site/google-plus-logo/" rel="attachment wp-att-521"><img src="http://www.geeksvilla.com/wp-content/uploads/google-plus-logo.jpg" alt="" title="google-plus-logo" width="630" height="312" class="alignnone size-full wp-image-521" /></a></p>
<p>Here is WP Plugin <a href="http://wordpress.org/extend/plugins/google-page-badge/">Google Plus for wordpress</a>.<br />
Otherwise following article may help you to add manually.</p>
<p>We have observed many WordPress website users/owners wants to add <strong>Google+ sharing button</strong> with their posts. And First thing you need to do is put the following code in your section of your site which you can change/alter by editing the header.php file of your wp theme.</p>
<h2>Google+ Add to Circles Method:</h2>
<pre class="brush: php; title: ; notranslate">&lt;script type=&quot;text/javascript&quot;&gt;// &lt;![CDATA[
(function()
{var po = document.createElement(&quot;script&quot;);
po.type = &quot;text/javascript&quot;; po.async = true;po.src = &quot;https://apis.google.com/js/plusone.js&quot;;
var s = document.getElementsByTagName(&quot;script&quot;)[0];
s.parentNode.insertBefore(po, s);
})();
// ]]&gt;&lt;/script&gt;</pre>
<p>And do not forget to replace the {plusPageID} with your own Google+ Page ID. Your Page ID is a 21-digit string at the end of the URL. For example if your page URL is: https://plus.google.com/101634180904778803404/ then the numbers in bold is your Page ID.</p>
<p>Once you have added the header code, then you have to place the following code where you like to add your button/badge.<br />
Most users like to display this in their sidebar, so you can either modify your sidebar.php file, or simply add it in a text widget area.</p>
<pre class="brush: php; title: ; notranslate">
&lt;g:plus href=&quot;https://plus.google.com/{plusPageID}&quot; size=&quot;badge&quot;&gt;&lt;/g:plus&gt;
</pre>
<p>For the Small badge, Just use the following method:</p>
<pre class="brush: php; title: ; notranslate">&lt;g:plus href=&quot;https://plus.google.com/101674180904808003404&quot; size=&quot;smallbadge&quot;&gt;&lt;/g:plus&gt;</pre>
<p>I hope you have got it and Now it must work on your wordpress website with lot of blessings from Google with good search rank.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geeksvilla.com/how-to-add-google-to-a-wordpress-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>15 Different Techniques and Tools for Cross Browser Compatibility</title>
		<link>http://www.geeksvilla.com/15-different-techniques-and-tools-for-cross-browser-compatibility/</link>
		<comments>http://www.geeksvilla.com/15-different-techniques-and-tools-for-cross-browser-compatibility/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 06:44:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[browser tips]]></category>
		<category><![CDATA[Cross Browser Compatibility]]></category>
		<category><![CDATA[css design]]></category>
		<category><![CDATA[css layout]]></category>
		<category><![CDATA[CSS tips]]></category>
		<category><![CDATA[HTML design]]></category>
		<category><![CDATA[Web browsers]]></category>

		<guid isPermaLink="false">http://www.geeksvilla.com/?p=504</guid>
		<description><![CDATA[Make your websites compatible with a all browsers and I know its very hard job. To make your coding life easier, here are 15+ tools and techniques for cross-browser CSS development. Reset CSS Due to the fact web browsers define different default styling for html elements, the first thing to do is to always include [...]]]></description>
			<content:encoded><![CDATA[<header></header>
<header>Make your websites compatible with a all browsers and I know its very hard job. To make your coding life easier, here are 15+ tools and techniques for <strong>cross-browser CSS development</strong>.</header>
<header><a href="http://www.geeksvilla.com/15-different-techniques-and-tools-for-cross-browser-compatibility/sauce-scout2/" rel="attachment wp-att-505"><img class="size-medium wp-image-505 aligncenter" title="sauce-scout2" src="http://www.geeksvilla.com/wp-content/uploads/sauce-scout2-590x381.png" alt="" width="590" height="381" /></a></header>
<h3></h3>
<h3>Reset CSS</h3>
<p>Due to the fact web browsers define different default styling for html elements, the first thing to do is to always include a CSS reset in your stylesheet. By using this code, you’re already eliminating lots of future headaches.</p>
<blockquote>
<pre>html,body,div,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,fieldset,input,hr {margin:0; padding:0;}
h1,h2,h3,h4,h5,h6,pre,code,address,caption,cite,code,em,strong,th {font-size:1em; font-weight:normal; font-style:normal;}
ul,ol {list-style:none;}
fieldset,img,hr {border:none;}
caption,th {text-align:left;}
table {border-collapse:collapse; border-spacing:0;}
td {vertical-align:top;}</pre>
</blockquote>
<h3>Internet Explorer conditional comments</h3>
<p>Let’s face it: Internet Explorer, especially the dinosaur IE6, is the front-end developer nightmare. In order to minimize their errors, Microsoft implemented conditional comments in their browser, which allow you to link a style sheet that will be interpreted by a browser alone.</p>
<blockquote>
<pre>&lt;!--[if IE]&gt;
  	&lt;link href="ie.css" rel="stylesheet" type="text/css" /&gt;
&lt;![endif]--&gt;</pre>
</blockquote>
<p>You can also target only a certain version of IE:</p>
<blockquote>
<pre>&lt;!--[if IE6]&gt;
  	&lt;link href="ie.css" rel="stylesheet" type="text/css" /&gt;
&lt;![endif]--&gt;</pre>
</blockquote>
<h3>Internet Explorer hacks</h3>
<p>While conditional comments are better, you can also target some versions of Internet Explorer using the following syntax:</p>
<blockquote>
<pre>.class {
  width:200px; /* All browsers */
  *width:250px; /* IE */
  _width:300px; /* IE6 */
  .width:200px; /* IE7 */
}</pre>
</blockquote>
<p>This technique is not W3C compliant (this is why you should use conditional comments instead) but sometimes, it is a real time saver.</p>
<h3>Targeting Opera only</h3>
<p>Opera isn’t the popular browser, but that isn’t a reason not fix problem that may occur. The code below will only target Opera, allowing you to add CSS rules only for this browser.</p>
<blockquote>
<pre>@media all and (min-width: 0px){
    .classname {}
}</pre>
</blockquote>
<h3>Targeting Safari only</h3>
<p>Safari is one of the most standard-compliant browsers, so it is rare that you have to fix Safari-only problems. But it can happen sometimes. Here is a nice hack to write Safari-only CSS rules.</p>
<blockquote>
<pre>html:lang(en)&gt;body  .classname {}</pre>
</blockquote>
<h3>Targeting Google Chrome only</h3>
<p>After Opera and Safari, here is finally the same kind of hack, to target only Google Chrome:</p>
<blockquote>
<pre>body:nth-of-type(1) p{
   color: #333333;
}</pre>
</blockquote>
<h3>“Browser Detect” PHP Class</h3>
<p>While Internet Explorer is most of the time the reason of cross-browser compatibility problems, sometimes you may need to detect a wide range of browsers</p>
<p>If you’re working with the PHP language, the <a href="http://www.phpclasses.org/browse/package/2827.html" target="blank">Browser Detect</a> class is a very useful tool for detecting more than 20 different browsers.<br />
<a href="http://www.phpclasses.org/browse/package/2827.html" target="blank">Get the class</a></p>
<h3>JQuery browser detection</h3>
<p>Another great piece of code to detect the most common browsers (Safari, Firefox, Chrome, IE and Opera) is the <em>browserdetect.js</em> Jquery plugin.<br />
Once you inclued JQuery and browserdetect.js in your html file, the script will automatically add a css class to the body tag.<br />
For example, your body tag will look like this if the visitor browser is Firefox 3:</p>
<pre>&lt;body&gt;</pre>
<p><a href="http://www.tvidesign.co.uk/blog/CSS-Browser-detection-using-jQuery-instead-of-hacks.aspx" target="blank">Get the code</a></p>
<h3>WordPress browser detection</h3>
<p>A while ago, I’ve explained on my other blog <a href="http://www.wprecipes.com/">WpRecipes</a> how WordPress can detect the browser used by your visitors. The code below will automatically add a CSS class to the <em>&lt;body&gt;</em> element of each page of your blog. Simply paste it on the <em>functions.php</em> file of your theme.</p>
<pre class="brush: php; title: ; notranslate"> add_filter('body_class','browser_body_class');
function browser_body_class($classes) {
	global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;

	if($is_lynx) $classes[] = 'lynx';
	elseif($is_gecko) $classes[] = 'gecko';
	elseif($is_opera) $classes[] = 'opera';
	elseif($is_NS4) $classes[] = 'ns4';
	elseif($is_safari) $classes[] = 'safari';
	elseif($is_chrome) $classes[] = 'chrome';
	elseif($is_IE) $classes[] = 'ie';
	else $classes[] = 'unknown';

	if($is_iphone) $classes[] = 'iphone';
	return $classes;
}  </pre>
<h3>IE6 crash</h3>
<p>Sometimes (Who said always?) Internet fucking Explorer 6 gives us, developers, lots of headaches. Although this is definitely not the best method to make your web clients satisfy. But it can be a fun to fix it.</p>
<p>You have guess it now, the following line of code will make IE6 crash.</p>
<blockquote>
<pre>&lt;style&gt;*{position:relative}&lt;/style&gt;&lt;table&gt;&lt;input&gt;&lt;/table&gt;</pre>
</blockquote>
<p>Have a nice day!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geeksvilla.com/15-different-techniques-and-tools-for-cross-browser-compatibility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shut Down Megaupload.com File-Sharing Website By US Feds</title>
		<link>http://www.geeksvilla.com/shut-down-megaupload-com-file-sharing-website-by-us-feds/</link>
		<comments>http://www.geeksvilla.com/shut-down-megaupload-com-file-sharing-website-by-us-feds/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 20:00:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[File Sharing Website]]></category>
		<category><![CDATA[IT News]]></category>
		<category><![CDATA[Kim Dotcom]]></category>
		<category><![CDATA[Megaupload.com]]></category>

		<guid isPermaLink="false">http://www.geeksvilla.com/?p=498</guid>
		<description><![CDATA[The operation to arrest the founder of the online file-sharing service Megaupload and close down the website has left users worldwide in limbo and prompted warnings that consumers should not rely on &#8220;cloud&#8221; storage for their data. Kim Dotcom, who was arrested during his 38th birthday party at his luxurious Auckland mansion, was the brain [...]]]></description>
			<content:encoded><![CDATA[<p>The operation to arrest the founder of the online file-sharing service Megaupload and close down the website has left users worldwide in limbo and prompted warnings that consumers should not rely on &#8220;cloud&#8221; storage for their data.<a href="http://www.geeksvilla.com/shut-down-megaupload-com-file-sharing-website-by-us-feds/ipad-art-wide-mega2-420x0/" rel="attachment wp-att-499"><img class="size-full wp-image-499 alignright" title="ipad-art-wide-mega2-420x0" src="http://www.geeksvilla.com/wp-content/uploads/ipad-art-wide-mega2-420x0.jpg" alt="" width="420" height="304" /></a></p>
<p>Kim Dotcom, who was arrested during his 38th birthday party at his luxurious Auckland mansion, was the brain behind Megaupload, infamous as a place to allegedly download pirated movies and television programmes.</p>
<p>But apart from storing allegedly illegal material, Megaupload was used legitimately by hundreds of thousands &#8211; possibly millions &#8211; of people around the world.</p>
<p>The site address yesterday displayed a notice from the FBI announcing the domain name had been seized &#8220;pursuant to an order issued by the US District Court&#8221;, with no indication when, or even if, they would be able to access their files again.</p>
<p>Steve Su, a Perth academic, was caught out by the closure. He lost material he had uploaded to share with his students.</p>
<p>Su said the FBI should have distinguished between legal and illegal content.</p>
<p>&#8220;It&#8217;s like confiscating everyone&#8217;s mobile phone because terrorists used them,&#8221; he said. &#8220;I don&#8217;t think it&#8217;s correct to penalise the technology because, based on that logic, shouldn&#8217;t the internet be taken down, as this is how people infringe copyright?&#8221;</p>
<p>Mark Pesce, a futurist and web commentator, said the incident had cast a shadow over cloud storage services in general.</p>
<p><a href="http://www.geeksvilla.com/shut-down-megaupload-com-file-sharing-website-by-us-feds/banner/" rel="attachment wp-att-501"><img class="aligncenter" title="banner" src="http://www.geeksvilla.com/wp-content/uploads/banner-533x400.jpg" alt="" width="533" height="400" /></a></p>
<p>&#8220;Everyone who is using a cloud-based back-up service right now is asking themselves how secure it is,&#8221; Pesce said.</p>
<p>&#8220;The folks who have legitimate files on Megaupload can&#8217;t get to them and they are pissed off. It has made cloud services look that much less legitimate.&#8221;</p>
<p>Megaupload is just one of several popular services known as &#8220;cyberlockers&#8221; that allow users to upload files and access them from wherever they want.</p>
<p>Sites such as Dropbox, RapidShare and Hotfile typically take little or no responsibility for the material their users upload, potentially leaving the sites open to legal action.</p>
<p>The author and software developer John Allsopp said if people were serious about protecting precious data such as family photos and videos, keeping local copies was essential.</p>
<p>&#8221;In addition to keeping your content in the cloud, it&#8217;s essential to also keep a local backup,&#8221; Mr Allsopp said.</p>
<p>&#8220;And because backing up is something even most tech savvy people tend to not do religiously, a network-attached storage device which your laptop or desktop can connect to wirelessly, and to which backups can be automatically be made as often as several times a day, is a no-brainer.&#8221;</p>
<p>Dotcom and the three other men arrested in the raid are expected to appear in an Auckland court today for proceedings to extradite them to the US.</p>
<p>The police spent much of yesterday searching the $30 million mansion leased by Dotcom in the Auckland suburb of Coatesville.</p>
<p>They removed artwork, computers, documents and 18 luxury cars, one of which reportedly bore the number plate &#8220;GOD&#8221;.</p>
<p>Dotcom has retained the American lawyer Robert Bennett, who represented Bill Clinton in the Paula Jones sex harassment case, to fight charges of criminal copyright infringement and conspiracy to commit racketeering.</p>
<p>Carlos Sanchez Almeida, a Spanish lawyer known for his crusading stance on issues of online privacy and piracy, has urged users to take stock of the data they have lost in the Megaupload shutdown in preparation for a possible class action against the US government.</p>
<p><strong>Source:</strong> http://www.stuff.co.nz/technology/6298467/Megaupload-closure-hits-legitimate-users</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geeksvilla.com/shut-down-megaupload-com-file-sharing-website-by-us-feds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 10 Professional One Page WordPress Themes</title>
		<link>http://www.geeksvilla.com/top-10-professional-one-page-wordpress-themes/</link>
		<comments>http://www.geeksvilla.com/top-10-professional-one-page-wordpress-themes/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 18:38:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WordPress theme]]></category>
		<category><![CDATA[Wordpress Themes]]></category>

		<guid isPermaLink="false">http://www.geeksvilla.com/?p=495</guid>
		<description><![CDATA[WordPress themes have made the easy life for everyone. Many small level companies earning lot of money through WordPress premium and free wp themes. It has been become industry. In this tough competitive world, you should find the best options when it comes to online business. The themes you choose should leave an everlasting impression [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress themes have made the easy life for everyone. Many small level companies earning lot of money through WordPress premium and<strong> free wp themes</strong>. It has been become industry.</p>
<p>In this tough competitive world, you should find the best options when it comes to online business. The themes you choose should leave an everlasting impression in the minds of the viewer or the customer and should make him remember your site. From the wide variety of one page wordpress themes available online, choose the best professionally designed theme that suits the needs of your business. Normally, these themes come with professional templates and fully customized layouts with a diverse range of colors and designs. </p>
<h3>ShapeShifter – One Page, Infinite Possibilities</h3>
<p><a href="http://themeforest.net/item/shapeshifter-one-page-infinite-possibilities/75759?" target="_blank"><img title="1" src="http://www.geeksvilla.com/wp-content/uploads/116.jpg" alt="" width="590" height="300" /></a></p>
<h3>Locus One Page – WordPress</h3>
<p><a href="http://themeforest.net/item/locus-one-page-wordpress/112800?" target="_blank"><img title="2" src="http://www.geeksvilla.com/wp-content/uploads/216.jpg" alt="" width="590" height="300" /></a></p>
<h3>Auzora – One Page Portfolio and Business theme</h3>
<p><a href="http://themeforest.net/item/auzora-one-page-portfolio-and-business-theme/102832?" target="_blank"><img title="3" src="http://www.geeksvilla.com/wp-content/uploads/315.jpg" alt="" width="590" height="300" /></a></p>
<h3>Coalition – One Page WordPress Portfolio</h3>
<p><a href="http://themeforest.net/item/coalition-one-page-wordpress-portfolio/492528?" target="_blank"><img title="4" src="http://www.geeksvilla.com/wp-content/uploads/415.jpg" alt="" width="590" height="300" /></a></p>
<h3>ExcelsiorWP – One Page Portofolio Theme</h3>
<p><a href="http://themeforest.net/item/excelsiorwp-one-page-portofolio-theme/159996?" target="_blank"><img title="5" src="http://www.geeksvilla.com/wp-content/uploads/54.jpg" alt="" width="590" height="300" /></a></p>
<h3>SOFA – One Page Folio</h3>
<p><a href="http://themeforest.net/item/sofa-one-page-folio/71106?" target="_blank"><img title="6" src="http://www.geeksvilla.com/wp-content/uploads/64.jpg" alt="" width="590" height="300" /></a></p>
<h3>Pixelstudio – An Elegant Scrolling One-page Theme</h3>
<p><a href="http://themeforest.net/item/pixelstudio-an-elegant-scrolling-onepage-theme/126024?" target="_blank"><img title="7" src="http://www.geeksvilla.com/wp-content/uploads/74.jpg" alt="" width="590" height="300" /></a></p>
<h3>NANICA – One Page WordPress Theme</h3>
<p><a href="http://themeforest.net/item/nanica-one-page-wordpress-theme/462293?" target="_blank"><img title="8" src="http://www.geeksvilla.com/wp-content/uploads/84.jpg" alt="" width="590" height="300" /></a></p>
<h3>Identity – One Page Blog/Portfolio Theme</h3>
<p><a href="http://themeforest.net/item/identity-one-page-blogportfolio-theme/120934?" target="_blank"><img title="9" src="http://www.geeksvilla.com/wp-content/uploads/94.jpg" alt="" width="590" height="300" /></a></p>
<h3>Da Vinci Theme – WP One Page Portfolio 12 in 1</h3>
<p><a href="http://themeforest.net/item/da-vinci-theme-wp-one-page-portfolio-12-in-1/166510?" target="_blank"><img title="10" src="http://www.geeksvilla.com/wp-content/uploads/104.jpg" alt="" width="590" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geeksvilla.com/top-10-professional-one-page-wordpress-themes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to display WordPress posts in columns</title>
		<link>http://www.geeksvilla.com/how-to-display-wordpress-posts-in-columns/</link>
		<comments>http://www.geeksvilla.com/how-to-display-wordpress-posts-in-columns/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 07:27:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Three Column Posts]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress theme]]></category>
		<category><![CDATA[Wordpress tips]]></category>
		<category><![CDATA[Wordpress tutorial]]></category>
		<category><![CDATA[Wp tips]]></category>

		<guid isPermaLink="false">http://www.geeksvilla.com/?p=449</guid>
		<description><![CDATA[Something I think is funny when I build websites in WordPress is to try to move away from the traditional blog layout, and build the page a little differently. One of the tricks I have used are that instead of presenting blog posts in the traditional way, are listed on one line from the top [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.geeksvilla.com/how-to-display-wordpress-posts-in-columns/carolina/" rel="attachment wp-att-450"><img class="size-medium wp-image-450 alignright" title="carolina" src="http://www.geeksvilla.com/wp-content/uploads/carolina-311x400.png" alt="" width="311" height="400" /></a><br />
Something I think is funny when I build websites in <em>WordPress</em> is to try to move away from the traditional blog layout, and build the page a little differently. One of the tricks I have used are that instead of presenting blog posts in the traditional way, are listed on one line from the top down, so I have chosen to present them in columns, <strong>from left to right.</strong></p>
<p>Examples of this can be seen on several of the websites I built, including the journal of the singer <a href="http://www.carolinawallinperez.com/" target="_blank">Carolina Wallin Pérez</a>.</p>
<p>In this post I will go through how to go about implementing this technology on their own WordPress blog.</p>
<h2>WordPress loop</h2>
<p>For those of you who do not know what WordPress loop is, one can simply say that all the information you enter into a WordPress post is saved in a database. The loop is the code on the home page that connects to the database and retrieves the information stored, and then presents it for your visitors. The loop looks like this:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php if (have_posts()) : ?&gt;&lt;?php while (have_posts()) : the_post(); ?&gt;</pre>
<p>Here is the loop, which defines what is to be retrieved from the database.</p>
<p>Now that we know what the loop is for something, we will take and modify it to get WordPress to list the entries in columns. In this example we will limit it to three columns per row, but it is easy to change to another number if you prefer. The loop that controls your blog can be found in the <em>index.php</em> file located in the folder to your WordPress theme.</p>
<p><strong>Make a backup of <em>index.php</em> before you start making changes!</strong></p>
<h2>Modify the WordPress loop</h2>
<p>We start with the beginning of the loop. We want to give each column a value of <em>1, 2 or 3,</em> in order to count the posts and tell WordPress when it&#8217;s time for a new line. We define at the beginning of the loop that we begin to count the posts from the first</p>
<pre class="brush: php; title: ; notranslate">&lt;?php if (have_posts()) : ?&gt; &lt;?php $col = 1; // Start counting from 1 while (have_posts()) : the_post(); ?&gt;</pre>
<p>We want each row to start with a <em>new series of container,</em> and therefore continue the race with the following code:</p>
<blockquote>
<pre><code>&lt;?php if ($col == 1) echo "&lt;divpln"&gt;rad"&gt;"; ?&gt;</code></pre>
</blockquote>
<p>Since we continue to define what content is displayed on each post. In this example, we choose to show:</p>
<ul>
<li>The title of the post</li>
<li>The date when this was written</li>
<li>Number of Comments</li>
<li>A summary of this</li>
<li>A link to the full post</li>
</ul>
<blockquote>
<pre>&lt;div id="post-&lt;?php the_ID(); ?&gt;"&gt;

&lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php the_title(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;small&gt;&lt;?php the_time('j F Y') ?&gt;&lt;?php comments_popup_link( 'Start Comment', '1 Comment', '% Comments'); ?&gt;&lt;/small&gt;

&lt;div&gt;
&lt;?php the_excerpt(); ?&gt;

&lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php the_title(); ?&gt;"&gt;Link →&lt;/a&gt;

&lt;/div&gt;

&lt;/div&gt;</pre>
</blockquote>
<p>Now for the beauty of it, the small part of the code that makes sure that it all works. Here counts posts and decide when a new line should begin. We end even with an extra <em>new line-container,</em> which will help to break the floats from the bottom line. I will explain what this means later in the post.</p>
<blockquote>
<pre>&lt;?php
if ($col == 1) echo "&lt;/div&gt;";
if($col == 1) {$col = 2;} else {
if($col != 1) {
if($col == 3) {$col = 1;}
if($col == 2) {$col = 3;}
}
}
endwhile; ?&gt;
&lt;div&gt;&lt;/div&gt;</pre>
</blockquote>
<p>We end the loop by adding navigation for newer / older posts, and an error message if there would be no posts in the database.</p>
<blockquote>
<pre>&lt;div&gt;  
&lt;div&gt;&lt;?php previous_posts_link('← Previous Post') ?&gt;&lt;/div&gt;
&lt;div&gt;&lt;?php next_posts_link('Next Post →') ?&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;?php else : ?&gt;  
&lt;h2&gt;No posts found&lt;/h2&gt;
&lt;p&gt;Find anywhere else on our website. Thanks

&lt;?php endif; ?&gt;</pre>
</blockquote>
<h2>The entire loop:</h2>
<p>Now you should if you followed the guide to the letter have a loop that looks like this:</p>
<pre class="brush: php; title: ; notranslate">
&lt;? php if (have_posts ()):?&gt;

&lt;? php $ col = 1 / / Start counting from 1

while (have_posts ()): the_post ();?&gt;

&lt;? php if ($ col == 1) echo &quot;&lt;div&gt;&quot;;?&gt;
&lt;- If we are in column 1, add a new line-container -&gt;
&lt;div class = &quot;post-col &lt;? php echo $ col;?&gt;&quot; id = &quot;post-&lt;? php the_ID ();?&gt;&quot;&gt;
&lt;! - Provides each post a CSS class, &quot;col1&quot; &quot;col2&quot; or &quot;col3&quot; -&gt;
&lt;h2&gt; &lt;a href = &quot;&lt;? php the_permalink ();?&gt;&quot; title = &quot;&lt;? php the_title (); ?&gt;&quot;&gt;&lt;? php the_title ();?&gt; &lt;/ a&gt; &lt;/ h2&gt;

&lt;! - Gets the post's title -&gt;

&lt;small&gt; &lt;? php the_time ('j F Y')?&gt; &lt;? php comments_popup_link ('No comments', '1 comment', '% Comments');?&gt; &lt;/ small&gt;
&lt;! - Showing the post date and number of comments -&gt;
&lt;div&gt;
&lt;? php the_excerpt ();?&gt;
&lt;! - Gets the summary of the post -&gt;

&lt;a href = &quot;&lt;? php the_permalink ();?&gt;&quot; title = &quot;&lt;? php the_title ();?&gt;&quot;&gt; Read the full post → &lt;/ a&gt;
&lt;! - A link to the full post -&gt;
&lt;/ div&gt;

&lt;! - Closes the entry -&gt;
&lt;/ div&gt;

&lt;! - Closes the record -&gt;

&lt;? php
if ($ col == 1) echo &quot;&lt;/ div&gt;&quot;, / / if we are in column 1, close the new line-container.
if ($ col == 1) {$ col = 2;} else {/ / if we are in column 1, then the next column 2.
if ($ col: = 1) {/ / if we are not at column 1, do the following:
if ($ col == 3) {$ col = 1;} / / if we are in column 3, then the next column No. 1.
if ($ col == 2) {$ col = 3;} / / if we are in column 2, then the next column No 3.
}
}
EndWhile;?&gt;
&lt;div&gt; &lt;/ div&gt;

  &lt;! - Break last row of floats. -&gt;
&lt;div&gt; &lt;! - Navigate newer / older pages -&gt;
&lt;div&gt; &lt;? php previous_posts_link ('← Newer Posts &quot;)?&gt; &lt;/ div&gt;
&lt;div&gt; &lt;? php next_posts_link ('Older Posts →')?&gt; &lt;/ div&gt;
&lt;/ div&gt;

&lt;? php else:?&gt; &lt;! - If nothing was found in the database: -&gt;
&lt;h2&gt; No posts found &lt;/ h2&gt;
&lt;p&gt; Unfortunately it seems that you are looking for something that does not exist.

&lt;? php endif;?&gt; &lt;! - Closes the loop -&gt;
</pre>
<h2>Formatting with CSS</h2>
<p>If you were to look at your website in your browser right now you would not see any particular difference, despite all these changes in the code. Contributions are not in columns, three per row, but still in succession from top to bottom. Strange? Not at all! For the browser to understand that we want the posts should be in horizontal rows, we must give the instructions on this matter. We do this in the file <em>style.css</em> that is also located in the folder to your WordPress theme.</p>
<p><strong>Make a backup of <em>style.css</em> before making any changes!</strong></p>
<p>The first thing we must do is decide how wide each post-column should be, and how much space we want between each column. If we assume that the page where we publish our WordPress posts is 1000 pixels wide, so it fits quite well to each column is 300 pixels wide, with a gap between them of 50 pixels. Then each line that looks something like this (the white spaces is thus 50 pixels wide):</p>
<p>To achieve this we need to write the following in our style.css file:</p>
<blockquote>
<pre> <code>.col1, .col2 {width:300px; float:left; margin:0 50px 25px 0;} .col3 {width:300px; float:left; margin:0 0 25px 0;}</code></pre>
</blockquote>
<p>What we are doing here is we set the width of columns to 300 pixels. Then we attribute <code>float:left</code> of each column, which means that the columns flows / is / are listed next to each other instead of each post end up in the previous. In columns 1 and 2, we also have a margin of 50 pixels to the right, which means that there will be 50 pixels apart to the next post. In all three columns, we also have a bottom margin of 25 pixels, which ensures that it is never less than 25 pixels between each line.</p>
<p>Press refresh in the browser now, it will look different, but still not right out. This is because the float ( <code>float:left</code> ) as we sat on the columns. We must ensure that they are reset when each new row starts and that is why we put in our <em>new series of container</em> in the code earlier.</p>
<p>So we add the following little code in our <em>style.css</em> file:</p>
<blockquote>
<pre> <code>.rad {clear: both;}</code></pre>
</blockquote>
<p>The code <code>clear:both</code> ensures that reset our float, and since this is now sitting on our <em>new line-container</em> which enters into every row, so will it all work properly.</p>
<h2>The final details</h2>
<p>If we list our WordPress posts as in the example, with three posts per line, so you probably want to change the number of posts to be displayed per page. WordPress default&#8217;s 10 posts, but in <a href="http://carolinawallinperez.com/" target="_blank">Carolina Wallin Pérez diary</a> , we have eg have 6 posts per page.</p>
<p>To change the number of posts per page to be displayed, go to <strong>Settings</strong> -&gt; <strong>Reading</strong> in wordpress menu, and under the <em>posts per page,</em> change the number you want to use.</p>
<p>I hope you enjoyed the advantage of this guide, I will love to receive both the questions and comments down in the comments below!</p>
<blockquote><p> <code>&lt;?php if (have_posts()) : ?&gt;&lt;?php while (have_posts()) : the_post(); ?&gt;</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.geeksvilla.com/how-to-display-wordpress-posts-in-columns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Five tips for better online marketing</title>
		<link>http://www.geeksvilla.com/five-tips-for-better-online-marketing/</link>
		<comments>http://www.geeksvilla.com/five-tips-for-better-online-marketing/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 06:47:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SEO & Marketing]]></category>
		<category><![CDATA[Internet Marketing]]></category>
		<category><![CDATA[Online Marketing tips]]></category>
		<category><![CDATA[SEO / SEM tips]]></category>

		<guid isPermaLink="false">http://www.geeksvilla.com/?p=442</guid>
		<description><![CDATA[Marketing on the Internet becomes an increasingly important part of a company&#8217;s marketing plan. Ideafist is a web agency, which is very precisely with online marketing. Here are Ideafist top five tips for better online marketing 1st Read on so you have good knowledge of internet marketing, how others have done to succeed online, and [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://www.geeksvilla.com/five-tips-for-better-online-marketing/internet-marketing/" rel="attachment wp-att-446"><img class="size-medium wp-image-446 alignright" title="Internet Marketing" src="http://www.geeksvilla.com/wp-content/uploads/SEM-590x393.jpg" alt="" width="590" height="393" /></a>Marketing on the Internet becomes an increasingly important part of a company&#8217;s marketing plan. <a title="Online Marketing" href="http://www.ideafist.com">Ideafist</a> is a web agency, which is very precisely with online marketing.</strong></p>
<p><strong>Here are Ideafist top five tips for better online marketing</strong></p>
<p><strong>1st</strong> Read on so you have good knowledge of internet marketing, how others have done to succeed online, and why not all bets are gold in his pockets. <strong></strong></p>
<p><strong>Second</strong> Concentration your business idea and develop a well thought out web strategy from the outset. For example, with questions like: What is the purpose of this site? Who we turn to? What and how does the competition? How and when to bet bear their costs? How do we get traffic to the site? <strong></strong></p>
<p><strong>Third,</strong> do an analysis of suitable suppliers. For most investments, it is wise to find a Web agency that can take a holistic approach to web strategy, web design, system construction and marketing. For programming, it is important to ensure that the chosen content management (CMS) is sufficiently flexible and user friendly for your needs. <strong></strong></p>
<p><strong>4th</strong> Do not build too complex web system at release, better to just carry the essentials needed to attract visitors. That way you get greater flexibility to adapt and further develop the market demands. <strong></strong></p>
<p><strong>5th</strong> Make an in-depth study of how to draw traffic to the website linked to the budget and time frame you have. For example, <strong>search engine optimization</strong>, sponsored links, social media, newsletters and so on. What is required for the specific products and services I offer and where is the audience?</p>
<p><strong>What mistakes do companies usually when they try to market themselves online?</strong><br />
- You have a budget for its Internet betting but it has too few resources devoted to suspend traffic to the site. Many still believe that visitors will only be received up its site.</p>
<p>by Zekonis Jacobi on Ideafist Solutions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geeksvilla.com/five-tips-for-better-online-marketing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Download failed Destination directory for file streaming does not exist</title>
		<link>http://www.geeksvilla.com/download-failed-destination-directory-for-file-streaming-does-not-exist/</link>
		<comments>http://www.geeksvilla.com/download-failed-destination-directory-for-file-streaming-does-not-exist/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 14:38:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Wordpress error]]></category>
		<category><![CDATA[Wordpress tips]]></category>
		<category><![CDATA[Wordpress tutorial]]></category>

		<guid isPermaLink="false">http://www.geeksvilla.com/?p=435</guid>
		<description><![CDATA[&#160; &#160; When updating a component (or the core) in wordpress, you may get the error message “Destination directory for file streaming does not exist or is not writable”. This directory is either wp-content/ or a custom path defined in wp-config.php. To fix this issue, you can remove any define() calls specifying “WP_TEMP_DIR” as key, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.geeksvilla.com/download-failed-destination-directory-for-file-streaming-does-not-exist/fix-wordpress-fatal-error-allowed-memory-size-550x279/" rel="attachment wp-att-436"><img class="size-full wp-image-436 aligncenter" title="fix-wordpress-fatal-error-allowed-memory-size-550x279" src="http://www.geeksvilla.com/wp-content/uploads/fix-wordpress-fatal-error-allowed-memory-size-550x279.jpg" alt="" width="550" height="279" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>When updating a component (or the core) in wordpress, you may get the error message “Destination directory for file streaming does not exist or is not writable”. This directory is either wp-content/ or a custom path defined in wp-config.php.</p>
<p>To fix this issue, you can remove any define() calls specifying “WP_TEMP_DIR” as key, and enter the following instead:</p>
<pre>define('WP_TEMP_DIR', ABSPATH . 'wp-content/');</pre>
<p>Also, make sure that there are correct permissions to this folder. In a UNIX environment, this means “755″. In a Windows environment, this means that the IIS Website App Pool Identity should have Modify permissions.</p>
<p>If you have problems detecting which Identity the App Pool is using, you can try adding permissions to the objects “SERVICE ACCOUNT” and “IIS_IUSRS”.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geeksvilla.com/download-failed-destination-directory-for-file-streaming-does-not-exist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Fix Skype Overwriting Phone Numbers in WordPress Themes</title>
		<link>http://www.geeksvilla.com/how-to-fix-skype-overwriting-phone-numbers-in-wordpress-themes/</link>
		<comments>http://www.geeksvilla.com/how-to-fix-skype-overwriting-phone-numbers-in-wordpress-themes/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 06:14:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Wordpress tips]]></category>
		<category><![CDATA[Wordpress tutorial]]></category>

		<guid isPermaLink="false">http://www.geeksvilla.com/?p=429</guid>
		<description><![CDATA[If you have Skype on your computer you may have noticed that sometimes Skype highlights phone numbers automatically when you visit a website. From a WordPress developers point of view this can be very frustrating. Not only can it make your site look bad, but it can mess up the layout as well. In fact, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.geeksvilla.com/how-to-fix-skype-overwriting-phone-numbers-in-wordpress-themes/skypeicon/" rel="attachment wp-att-431"><img class="size-full wp-image-431 alignright" title="skypeicon" src="http://www.geeksvilla.com/wp-content/uploads/skypeicon.gif" alt="" width="210" height="210" /></a></p>
<p>If you have Skype on your computer you may have noticed that sometimes <strong>Skype highlights phone numbers</strong> automatically when you visit a website. From a WordPress developers point of view this can be very frustrating. Not only can it make your site look bad, but it can mess up the layout as well. In fact, just recently we had a client whose page kept breaking because Skype was highlighting his phone number. Fixing this problem is not very hard. All you have to do is add some code to the head of your HTML document and it will prevent Skype from highlighting numbers in your theme no matter what browser it is being displayed on. This is the code you should paste:</p>
<pre>
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />
</pre>
<p>Make sure it is between the <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags.</p>
<p>For those of you who simply want to turn on the plugin, then download our plugin <a title="Prevent Skype Overwriting" href="http://wordpress.org/extend/plugins/prevent-skype-overwriting/" target="_blank">Prevent Skype Overwriting</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geeksvilla.com/how-to-fix-skype-overwriting-phone-numbers-in-wordpress-themes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Custom Fields [ Part 2 ] Final</title>
		<link>http://www.geeksvilla.com/wordpress-custom-fields-part-2-final/</link>
		<comments>http://www.geeksvilla.com/wordpress-custom-fields-part-2-final/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 06:04:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Wordpress tips]]></category>
		<category><![CDATA[Wordpress tutorial]]></category>
		<category><![CDATA[wp custom field]]></category>

		<guid isPermaLink="false">http://www.geeksvilla.com/?p=425</guid>
		<description><![CDATA[Only Display Posts with a Specific Custom Field &#160; The best part about query_posts function in WordPress is that it has a parameter for custom fields. So we can use it to create a loop that only displays posts with a specific custom field key and/or value. All you would have to do is enter [...]]]></description>
			<content:encoded><![CDATA[<h2>Only Display Posts with a Specific Custom Field</h2>
<p>&nbsp;</p>
<p><a href="http://www.geeksvilla.com/wordpress-custom-fields-part-2-final/writepanel/" rel="attachment wp-att-426"><img src="http://www.geeksvilla.com/wp-content/uploads/writepanel.jpg" alt="" title="writepanel" width="520" height="600" class="alignnone size-full wp-image-426" /></a></p>
<p>The best part about query_posts function in WordPress is that it has a parameter for custom fields. So we can use it to create a loop that only displays posts with a specific custom field key and/or value. All you would have to do is enter the query_posts tag above your post’s loop statement. Let’s say you want to display posts that you wrote while listening to a music as opposed to posts that you wrote in reflection of the book you read.</p>
<p>You will paste the following query before you start the loop:</p>
<pre>query_posts('meta_key=music');</pre>
<p>This code will list posts with the meta key music present.</p>
<p>Let’s say you want to customize it a bit more by saying you want to display posts that you wrote while listening to Eminem’s Songs. Well then, you will customize the codes like this:</p>
<pre>query_posts('meta_key=music&amp;meta_value=Eminem');
</pre>
<h2>How to Style Individual Posts with Custom Fields</h2>
<p>&nbsp;</p>
<p>Want an entirely different look for your WordPress single posts? Well you can do this by adding custom post classes via custom field. We have written an entire article on how to style each WordPress post differently, so this code is based on that tutorial.</p>
<p>First thing you need to do is create a custom field with the name “post-class” and then add the value which will be your class. So in this example, we will use “anniversary”. Once you have done that, then add the following code inside your loop:</p>
<pre>
<?php $custom_values = get_post_meta($post->ID, 'post-class'); ?>
</pre>
<p>Now if you look in your loop, there is a post_class function inside a div class. Just replace that with something like this:</p>
<pre>
<?php post_class('class-1 class-2 ' . $custom_values); ?>
</pre>
<p>Alternatively, you can also add inline css to the header of your single pages. If that is something that you are looking to do, then open your header.php file, and insert the following code somewhere between the head tags.</p>
<pre>
<?php if (is_single()) {
	$customstyle = get_post_meta($post->ID, 'customstyle', true);
	if (!empty($customstyle)) { ?>
<style type="text/css">
	<?php echo $customstyle; ?>
<style>
	<?php }
	} ?>
</pre>
<p>Once this code is added, now you can simply add the custom field with the name “customstyle” and add any css text in the value. An example text would be this:</p>
<pre>
 #coolimageclass{border: 5px solid #ccc;}
</pre>
<p>We hope that this article broadens your horizon about the WordPress custom fields. If you know of other cool tricks that can be done with WordPress custom fields, then feel free to post in the comments.</p>
<p>There are some other neat plugins that expands the functionalities of WordPress Custom Fields that you should check out: </p>
<p><a href="http://wordpress.org/extend/plugins/custom-field-template/" rel="nofollow" target="_blank">Custom Fields Template</a><br />
<a href="http://wordpress.org/extend/plugins/more-fields/" rel="nofollow" target="_blank">More Fields</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geeksvilla.com/wordpress-custom-fields-part-2-final/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Custom Fields [ Part 1 ]</title>
		<link>http://www.geeksvilla.com/wordpress-custom-fields-part-1/</link>
		<comments>http://www.geeksvilla.com/wordpress-custom-fields-part-1/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 18:12:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[custom field]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Wordpress tips]]></category>
		<category><![CDATA[Wordpress tutorial]]></category>
		<category><![CDATA[wp custom field]]></category>

		<guid isPermaLink="false">http://www.geeksvilla.com/?p=409</guid>
		<description><![CDATA[What are WordPress Custom Fields? Custom fields are a form of meta-data to store arbitrary information with each post of WordPress. While this does not sound so powerful, it is the most powerful of the WordPress posts and content types (type known as post). This meta-data is handled with key / value pairs. The key [...]]]></description>
			<content:encoded><![CDATA[<h2>What are WordPress Custom Fields?</h2>
<p>Custom fields are a form of meta-data to store arbitrary information with each post of WordPress. While this does not sound so powerful, it is the most powerful of the WordPress posts and content types (type known as post). This meta-data is handled with key / value pairs. The key is a &#8220;name&#8221; that identifies the specific field so it is a constant and must remain the same for all messages however you can use the same key several times in one post. The value is the information to be displayed for the field when you do on your WordPress theme so you can change with each message.</p>
<p>Now let&#8217;s look at a very basic example of WordPress Custom Fields in Action. When editing messages, you see the section called Custom Fields. Scroll down a bit, and you should see one. We will use the box to add the author&#8217;s mood since the time of writing. As you add the name of &#8220;mood today,&#8221; and then adds the value that can be happy, so sad, excited etc.</p>
<p><a href="http://www.geeksvilla.com/wordpress-custom-fields-part-1/mood/" rel="attachment wp-att-410"><img class="size-full wp-image-410 aligncenter" title="mood" src="http://www.geeksvilla.com/wp-content/uploads/mood.gif" alt="" width="520" height="144" /></a><br />
Now once you add this field, and save the message. This additional information related to the arbitrary message is stored in the database, and can be called from anywhere within your WordPress theme. So for this example is very simple, we will use the very basic form of display in the message. Say, you want to display your mood before the person reads the message, so they know what to expect. Well, then open the single.php file and add this code inside the WordPress loop:</p>
<pre><?php the_meta(); ?></pre>
<p>It will display something like this:</p>
<p><strong>Today’s Mood: Happy</strong></p>
<p>Now by using <em>the_meta</em> hook, you will display all fields associated with that post. This is great when you have one field, but if you have 5 different fields that you want to display at 5 different locations, then we will have to use <em>get_post_meta</em> hook. Let’s say you want to display the custom field at a separate location by itself, then you will add the following code within the post loop.</p>
<pre><?php echo get_post_meta($post->ID, 'key', true); ?></pre>
<p>Note: replace the key value to whatever your key is.</p>
<p>What if you have a custom field like ‘songs’ for the songs you were listening while writing the post? Well you can have multiple ‘songs’ keys and have different values stored from the backend. Then inside your loop paste a code like this:</p>
<pre><!--?php $songs = get_post_meta($post--->ID, 'songs', false); ?&gt;</pre>
<h3>This post is inspired by:</h3>
<p>Note the trick here is the third parameter &#8220;false&#8221;. By changing to false, we tell the function to return an array of values ​​for the specified key. This is a useful tip for viewing multiple key values.</p>
<p>Source: <a href="http://perishablepress.com/press/2008/12/22/wordpress-custom-fields-tips-tricks/" rel="nofollow" target="_blank">Jeff Starr at Perishable</a></p>
<p>&nbsp;</p>
<h3>How to Hide Custom Fields from Your Users</h3>
<p>Open up your theme’s functions.php file and add the following:</p>
<pre>add_action('admin_init','remove_custom_meta_boxes');
function remove_custom_meta_boxes() {
remove_meta_box('postcustom','post','normal');
remove_meta_box('postcustom','page','normal');
}</pre>
<div>Now we&#8217;re going to share some tips cool tricks, hacks and custom fields. Custom fields are limited to your imagination only, so there&#8217;s a lot of tricks that we could lose.</div>
<div>We will write more details on Custom fields in our up coming articles. Please keep reading more articles.</div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geeksvilla.com/wordpress-custom-fields-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

