<?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>GrenadePod &#187; WordPress</title>
	<atom:link href="http://www.grenadepod.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.grenadepod.com</link>
	<description>Dispersing the Seeds</description>
	<lastBuildDate>Mon, 22 Feb 2010 20:30:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Use SSH to upgrade WordPress plugins automatically</title>
		<link>http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/</link>
		<comments>http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 12:23:46 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[IT Technology]]></category>
		<category><![CDATA[Publishing]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=479</guid>
		<description><![CDATA[Here&#8217;s a quick summary on how to enable WordPress updates using SSH. For one or the other reason default FTP/SFTP method didn&#8217;t work for me, so I tried this, which seems to be working fine. Build and install SSH2 libraries Depending on your linux distribution you might need to use different method. On my Debian, [...]


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/21/securing-wordpress/' rel='bookmark' title='Permanent Link: Securing WordPress'>Securing WordPress</a></li>
<li><a href='http://www.grenadepod.com/2009/12/26/building-python-2-6-4-rpm-for-centos-5-4/' rel='bookmark' title='Permanent Link: Building python 2.6.4 RPM for CentOS 5.4'>Building python 2.6.4 RPM for CentOS 5.4</a></li>
<li><a href='http://www.grenadepod.com/2009/12/03/building-and-running-google-chrome-os-on-virtualbox/' rel='bookmark' title='Permanent Link: Building and running Google Chrome OS on VirtualBox'>Building and running Google Chrome OS on VirtualBox</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />Here&#8217;s a quick summary on how to enable WordPress updates using SSH. For one or the other reason default FTP/SFTP method didn&#8217;t work for me, so I tried this, which seems to be working fine.</p>
<h3>Build and install SSH2 libraries</h3>
<p>Depending on your linux distribution you might need to use different method. On my Debian, I had to use the following to install:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#  wget http://downloads.sourceforge.net/project/libssh2/libssh2-1.2.1.tar.gz?use_mirror=kent
#  tar zxf libssh2-1.2.1.tar.gz
#  cd libssh2-1.2.1
#  ./configure
#  make
#  make install</pre></div></div>

<p>What&#8217;s important here is that I had to build libssh2 from sources manually. However I hate doing this, it was apparently the only way. Aptitude was only offering me an older (0.12) version of the library, which failed to build PHP ssh2 extension.</p>
<h3>Build and install PHP SSH2 extension</h3>
<p>Now again, for some reason simple command failed to work for me&#8230; So I had to specify beta channel to install PHP SSH2 extension. Fear not though, just try this</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#  pecl install ssh2</pre></div></div>

<p>And if it doesn&#8217;t work, then do this</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#  pecl install channel://pecl.php.net/ssh2-0.11.0</pre></div></div>

<p>Simple, isn&#8217;t it?</p>
<h3>Generate SSH public and private keys</h3>
<p>You need to generate both public and private keys that are going to be used to connect to your server (even if it is the same server your connecting from!). Go to your home directory:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ cd .ssh
$ ssh-keygen 
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/user/.ssh/id_rsa.
Your public key has been saved in /home/user/.ssh/id_rsa.pub.
The key fingerprint is:
fe:3b:5d:94:53:1e:d3:9f:87:45:73:ab:8d:9f:d7:cc user@server
$ cp id_rsa.pub authorized_keys</pre></div></div>

<p>Private key is used to decrypt the data, whereas public key is used by the remote host to encrypt the data. You also need to create authorized_keys file, so that server knows your key is trusted and allows you to login without using actual user account password.</p>
<p>There is one annoying bit though. Apache user needs to be able to read both private and public keys. Normally they are kept secure in user&#8217;s .ssh/ directory, which is readable by user only, and allowing all to see it, is not a particularly good idea. So I had to copy both files to /etc/wordpress/ and make them readable to www-data group:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#  cd /etc
#  mkdir wordpress
#  cp /home/user/.ssh/id_rsa* wordpress/
#  chgrp www-data wordpress/*
#  chmod 640 wordpress/*</pre></div></div>

<h3>Configure WordPress to use public keys automatically</h3>
<p>Add the following lines to your wp-config.php file, so you&#8217;re not asked any passwords or server names during the upgrade:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'FTP_PUBKEY'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'/etc/wordpress/id_rsa.pub'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'FTP_PRIKEY'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'/etc/wordpress/id_rsa'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'FTP_USER'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'user'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'FTP_PASS'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'FTP_HOST'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'localhost:22'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/21/securing-wordpress/' rel='bookmark' title='Permanent Link: Securing WordPress'>Securing WordPress</a></li>
<li><a href='http://www.grenadepod.com/2009/12/26/building-python-2-6-4-rpm-for-centos-5-4/' rel='bookmark' title='Permanent Link: Building python 2.6.4 RPM for CentOS 5.4'>Building python 2.6.4 RPM for CentOS 5.4</a></li>
<li><a href='http://www.grenadepod.com/2009/12/03/building-and-running-google-chrome-os-on-virtualbox/' rel='bookmark' title='Permanent Link: Building and running Google Chrome OS on VirtualBox'>Building and running Google Chrome OS on VirtualBox</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing WordPress</title>
		<link>http://www.grenadepod.com/2009/11/21/securing-wordpress/</link>
		<comments>http://www.grenadepod.com/2009/11/21/securing-wordpress/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 10:15:08 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[IT Technology]]></category>
		<category><![CDATA[Publishing]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=457</guid>
		<description><![CDATA[No matter how good developers are (and I trust WordPress developers are one of the best bunch out there) they are still humans and make mistakes. When it comes to a security, one doesn&#8217;t need to make mistakes or introduce bugs in the code to make software or application vulnerable to external attacks. Software development [...]


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/' rel='bookmark' title='Permanent Link: Use SSH to upgrade WordPress plugins automatically'>Use SSH to upgrade WordPress plugins automatically</a></li>
<li><a href='http://www.grenadepod.com/2009/11/25/basic-apache-security/' rel='bookmark' title='Permanent Link: Basic Apache security'>Basic Apache security</a></li>
<li><a href='http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/' rel='bookmark' title='Permanent Link: Essential WordPress plugins'>Essential WordPress plugins</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />No matter how good developers are (and I trust WordPress developers are one of the best bunch out there) they are still humans and make mistakes. When it comes to a security, one doesn&#8217;t need to make mistakes or introduce bugs in the code to make software or application vulnerable to external attacks.</p>
<p>Software development is really complex process and although  WordPress developers take security very seriously, you should also take extra measures to ensure safety and security of your blog/web site.</p>
<p>There are few simple steps to make your WordPress installation lot harder for attacker to compromise.</p>
<h3>WordPress software</h3>
<p>Always keep up to date. Flaws in security model are being identified and addressed immediately as soon as they are reported. So it&#8217;s important for you to always keep your WordPress installation up to date. It&#8217;s very easy to do now that WordPress has automatic update feature, where all you have to do is just to tell it to install the newer version of it.</p>
<h3>File permissions</h3>
<p>You need to make sure that webserver can modify only those files that it is allowed to. Do not rely on WordPress to enforce this, use file system permission model. All files in WordPress installation need to be owned and writeable to by the user that installed the system and not the user which is used to run webserver. Only exceprion to this is /wp-content/ directory, which contains uploaded contents.</p>
<blockquote><p>Make sure you perform all actions in whatever your WordPress installation directory is, and not outside of it!</p></blockquote>
<p>Let&#8217;s make all files owned by your user and set the group to web server group:</p>
<pre>
$ sudo chown -R myuser.www-data *
</pre>
<p>Then change all file permissions so that files can be written to by your user only, and read-only by other users:</p>
<pre>
$ find . -type d -exec chmod 755 {} \;
$ find . -type f -exec chmod 644 {} \;
</pre>
<p>Finally allow group write for wp-content/ directory, so that web server can do automatic updates for plugins and user content could be uploaded:</p>
<pre>
$ chmod -R g+w *
</pre>
<h3>Secure wp-admin access</h3>
<p>WordPress recommend using additional plugins and HTTP authentication to provide additional security to the administration pages, but I think this is not necessary if you implement the following two security measures: enforce SSL only traffic to /wp-admin/ and allow access only from certain IP addresses.</p>
<p>Make /wp-admin/ available on SSL connection only, so all traffic to and from (including passwords) is encrypted. This prevent attackers hijacking traffic and intercepting passwords and other sensitive data.</p>
<p>This may sound bit complicated, but bear with me, it&#8217;s not that scary as it may look like. So you will need two &lt;VirtualServer&gt; directives: one for normal web traffic and one for SSL.</p>
<p>In default HTTP definition, you then need to make a special case for /wp-admin/ URL, and enforce redirection to HTTPS, so whenever you try to access wp-admin/ using http:// you will be redirected to https:// instead. HTTPS VirtualHost on it turn has instructions to deny access from all, but only the IPs listed in the configuration:</p>
<pre>&lt;VirtualHost server_ip:80&gt;
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/virtual/www.example.com
    ErrorLog /var/log/apache2/www.example.com-error.log
    CustomLog /var/log/apache2/www.example.com-access.log combined
    &lt;Location /wp-admin/&gt;
        RewriteEngine on
        RewriteRule ^(.*)$ https://%{SERVER_NAME}/wp-admin/ [R=permanent,L]
    &lt;/Location&gt;
&lt;/VirtualHost&gt; 

&lt;VirtualHost server_ip:443&gt;
    ServerName example.com
    ServerAlias www.example.com
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/example.com.pem
    SSLCertificateKeyFile /etc/ssl/private/example.com.key
    DocumentRoot /var/www/virtual/www.example.com
    ErrorLog /var/log/apache2/www.example.com-error.log
    CustomLog /var/log/apache2/www.example.com-access.log combined
    &lt;Location /wp-admin&gt;
        Order deny,allow
        Deny from all
        Allow from trusted_ip_1
        Allow from trusted_ip_2
    &lt;/Location&gt;
&lt;/VirtualHost&gt;</pre>
<h3>Other security measures</h3>
<p>Install <a href="http://wordpress.org/extend/plugins/wp-security-scan/" target="_blank">WP Security scan plugin</a> which will provide a good overview of how your installation looks like from the security point of view.</p>
<p>Also remove advertising of the WordPress version that you are using. Add the following line to functions.php file, which you are using:</p>
<pre>
remove_action('wp_head', 'wp_generator');
</pre>
<p>And did I mention that you need to make regular backups?&#8230;</p>


<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/' rel='bookmark' title='Permanent Link: Use SSH to upgrade WordPress plugins automatically'>Use SSH to upgrade WordPress plugins automatically</a></li>
<li><a href='http://www.grenadepod.com/2009/11/25/basic-apache-security/' rel='bookmark' title='Permanent Link: Basic Apache security'>Basic Apache security</a></li>
<li><a href='http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/' rel='bookmark' title='Permanent Link: Essential WordPress plugins'>Essential WordPress plugins</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/11/21/securing-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing my first WordPress plugin</title>
		<link>http://www.grenadepod.com/2009/11/18/developing-my-first-wordpress-plugin/</link>
		<comments>http://www.grenadepod.com/2009/11/18/developing-my-first-wordpress-plugin/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 14:28:54 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[IT Technology]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=435</guid>
		<description><![CDATA[It&#8217;s only couple of weeks that I&#8217;m using WordPress (actively!) and it&#8217;s been quite some time I last used PHP. There was a time when I was really comfortable with PHP, but that&#8217;s been oh so long ago. I&#8217;m all in Python nowadays. No stupid endless  curly brackets, or semicolons and the nice indentation is [...]


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/21/securing-wordpress/' rel='bookmark' title='Permanent Link: Securing WordPress'>Securing WordPress</a></li>
<li><a href='http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/' rel='bookmark' title='Permanent Link: Essential WordPress plugins'>Essential WordPress plugins</a></li>
<li><a href='http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/' rel='bookmark' title='Permanent Link: Use SSH to upgrade WordPress plugins automatically'>Use SSH to upgrade WordPress plugins automatically</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />It&#8217;s only couple of weeks that I&#8217;m using WordPress (actively!) and it&#8217;s been quite some time I last used PHP. There was a time when I was really comfortable with PHP, but that&#8217;s been oh so long ago. I&#8217;m all in Python nowadays. No stupid endless  curly brackets, or semicolons and the nice indentation is enforced&#8230; Ok, ok, it&#8217;s just me ranting, because I spent nearly 30 mins trying to figure out what&#8217;s wrong with my code. It appeared to be a missing $ in front of my variable name. How lame could that be?&#8230;</p>
<p>Right, back to business. So I decided to write a WordPress plugin. There were few reasons I wanted to do that:</p>
<ul>
<li>See how difficult it is and what WordPress looks like under the hood</li>
<li>Since I&#8217;m using WP, which is a PHP shop I needed to remind myself how PHP looks like</li>
<li>Get some more publicity and bump up the Google rating (that&#8217;ll never hurt, will it?)</li>
</ul>
<p>So, I remembered seeing this neat trick of reversing, or flipping over text by replacing regular ASCII latin characters with Unicode ones that resemble a mirror image of the original ones. There are numerous websites out there on the wild internets that would swallow your piece of texts and then spit out same text, but flipped over.</p>
 p&#x01DDs&#x0279&#x01DD&#x028C&#x01DD&#x0279 u&#x01DD&#x01DDq s&#x0250&#x0265 &#x0287&#x0131 &#x0279&#x01DD&#x0287&#x025F&#x0250 &#x01DD&#x029E&#x0131&#x0283 &#x029Eoo&#x0283 p&#x0283no&#x028D &#x0287x&#x01DD&#x0287 &#x01DD&#x0265&#x0287 &#x028Do&#x0265 s&#x0131 &#x01DD&#x0279&#x01DDH
<p>As you can see it is still text information, no magic with images or anything like that. You can select, copy-paste, etc.</p>
<p>So, I thought, right, let&#8217;s see if there was someone smart who has created a plugin for WordPress that would do this. Not that I&#8217;m a big fan of flipped over text, but just to make sure that I&#8217;m not reinventing the wheel. At the end of the day, what&#8217;s the point in creating something that&#8217;s already been build. If such plugin existed, I would have had to think of something else. Lucky for me, no one has yet created anything like it.</p>
<p>So, simple idea, just what I need to warm up.</p>
<p>First things first, go and read <a href="http://codex.wordpress.org/Writing_a_Plugin" target="_blank">official manual</a> from WordPress about how to develop plugins. It&#8217;s a really good manual, and everyone developing a plugin must read it. Or read it if you feel you need more details in following my manual&#8230; <img src='http://www.grenadepod.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>All plugins go into /wp-content/plugins/ directory in your WordPress installation. Each plugin has it&#8217;s own directory, but this isn&#8217;t a strict requirement, but if you&#8217;re not creating a directory for your plugin, it must be just a single PHP file. I&#8217;d advise to create a directory for your plugin.</p>
<p>Right, this is how I saw me implementing this: user types in any text in the post (or page, or comment, or even excerpt) and encloses any text he/she wants to flip over in my new (made up) tags, just like that:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&amp;lt;upsidedown&amp;gt;your text&amp;lt;/upsidedown&amp;gt;</pre></div></div>

<p>Because WordPress does some clever validation of the text and only certain tags are allowed, I had to include this code in my plugin to declare my new tags as valid ones:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>CUSTOM_TAGS<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// allow new tag in the posts</span>
    <span style="color: #000088;">$allowedposttags</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'upsidedown'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// ... and also in the comments</span>
    <span style="color: #000088;">$allowedtags</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'upsidedown'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Next thing is to register new filter function with WordPress. Hold on, what is this filter function? Filter function is a function that WordPress calls and passes contents of the post to it. Filter function can do anything it likes to the text and then spits is back to WordPress engine. WordPress will then pass the result to another filter, and so on and on until there are no more filter registered. Each filter get a priority flag assigned, and those with priority 0 will get executed before those that have priority 10. By default each filter gets priority 6 assigned to them.</p>
<p>Right, going back to my filters, let&#8217;s register them:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'flip_text_upside_down_filter'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_excerpt'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'flip_text_upside_down_filter'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comment_text'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'flip_text_upside_down_filter'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>As you can see, I register my filter with three types of content: post (or page), excerpt and comment.</p>
<p>Next thing is to define the filter function:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> flip_text_upside_down_filter<span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #990000;">preg_replace_callback</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'/\s*&amp;lt;upsidedown&amp;gt;(.*)&amp;lt;\/upsidedown&amp;gt;/siU'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'convert_to_upsidedown_unicode'</span><span style="color: #339933;">,</span>
        <span style="color: #000088;">$content</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>WordPress is going to call it with a parameter that contains content text in it. I pass the contents to PHP function preg_replace_callback, which matches the regular expression (any text in between my tags) and calls another function with the contents of the regular expression match (hope that makes sense to you, if not, read the sentence again, repeat until you got it&#8230; <img src='http://www.grenadepod.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).<br />
Finally, a function that actually does the conversion. Which is pretty simple &#8211; go through all characters and replace them with matching Unicode chars from the table. I&#8217;m not including the whole table here, you can download source code from WordPress plugins directory (in fact, if you install the plugin &#8211; you&#8217;ll have the sourcecode in your plugins/ directory):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> convert_to_upsidedown_unicode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$match</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// conversion table</span>
    <span style="color: #000088;">$flipTable</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
<span style="color: #339933;">...</span>
    <span style="color: #009900;">&#41;</span>
    <span style="color: #000088;">$origStr</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strrev</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$match</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$newStr</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">' '</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$origStr</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$origStr</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">array_key_exists</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> <span style="color: #000088;">$flipTable</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$newStr</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$flipTable</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#93;</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: #000088;">$newStr</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$ch</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$newStr</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This is it. Well, ok nearly it. You still need to do the boring bit, ie put a formal header so WP recognises your plugin code (put this, replacing what&#8217;s necessary accordingly):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/*
Plugin Name: Upside Down Text
Plugin URI: http://www.grenadepod.com/projects/upside-down-text-plugin-for-wordpress/
Description: This plugin allows to &quot;flip&quot; any section of text upside down
Version: 1.1.0
Author: Grenadepod
Author URI: http://www.grenadepod.com
*/</span></pre></div></div>

<p>Now you can activate the plugin from your WP admin console, and start typing text that everyone struggles to read.</p>
<p>Sooner or later you&#8217;ll notice that the implementation is not ideal. When you switch over to visual editor (which I use most of the time) and then back to HTML editor, all &#8220;new&#8221; tags are gone. This is because the editor does not know about them and so it removes them. Solution was to type in text in Visual (if you prefer to use it) then switch to HTML and place tags where needed. Save without switching back, and publish.</p>
<p>This wasn&#8217;t really nice, and I wasn&#8217;t going to get lots of users with this approach. Some nice soul on WordPress forum suggested to have a look at <a href="http://codex.wordpress.org/Shortcode_API" target="_blank">Shortcode API</a>. This API allows plugin to register shortcode that looks like: [somethinghere]content[/somethinghere], and passes all content back to your function. And this would be immune to switching between editors issue.</p>
<p>So I decided to make a second release of the plugin, where shortcodes are supported alongside with tags. And in fact using shortcodes not only allows me to type them in directly in the Visual editor, but also coding is simpler, I don&#8217;t need to do any regexp magic.</p>
<p>Register my new shortcode:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'upsidedown'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'flip_text_upside_down_shortcode'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And define what function to call:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> flip_text_upside_down_shortcode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span><span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> convert_to_upsidedown_unicode<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>As you can see, I&#8217;m reusing same character conversion function, so the changes were minimal.</p>
<p>All seems to be working quite fine, at the end of the day, what can go wrong with only few lines of code?&#8230;</p>


<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/21/securing-wordpress/' rel='bookmark' title='Permanent Link: Securing WordPress'>Securing WordPress</a></li>
<li><a href='http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/' rel='bookmark' title='Permanent Link: Essential WordPress plugins'>Essential WordPress plugins</a></li>
<li><a href='http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/' rel='bookmark' title='Permanent Link: Use SSH to upgrade WordPress plugins automatically'>Use SSH to upgrade WordPress plugins automatically</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/11/18/developing-my-first-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing menu order</title>
		<link>http://www.grenadepod.com/2009/11/10/changing-menu-order/</link>
		<comments>http://www.grenadepod.com/2009/11/10/changing-menu-order/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 11:02:40 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[Publishing]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=311</guid>
		<description><![CDATA[Ran into one issue while adding new menu item to the main menu. So I created &#8220;IT Technology&#8221; category, which I want to appear on the main menu. Since I&#8217;m using link categories to display these link, I just added new link. And it worked. Kind of: Yes, it did add the link, but not [...]


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/04/top-level-menu-in-arras-theme/' rel='bookmark' title='Permanent Link: Top level menu in Arras theme'>Top level menu in Arras theme</a></li>
<li><a href='http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/' rel='bookmark' title='Permanent Link: Essential WordPress plugins'>Essential WordPress plugins</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />Ran into one issue while adding new menu item to the main menu. So I created &#8220;IT Technology&#8221; category, which I want to appear on the main menu. Since I&#8217;m using link categories to display these link, I just added new link. And it worked. Kind of:</p>
<p><img class="aligncenter size-full wp-image-312" title="link-category-before" src="http://www.grenadepod.com/wp-content/uploads/2009/11/link-category-before.png" alt="link-category-before" width="561" height="270" /></p>
<p>Yes, it did add the link, but not where I wanted it to add. I want &#8216;About&#8217; link to be at the end of the list. Always. However it seems that there&#8217;s no way of changing the order in the link category, and the links appear based on the link IDs. So the only way to resolve this, is to change link_id of the &#8216;About&#8217; link to something big, let&#8217;s say 10&#8217;000. I&#8217;m never going to have that many links , so 10&#8217;000 sounds like a sound choice.</p>
<p>Go to your database and select all links:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">+---------+---------------------------------------------------+
| link_id | link_url                                          |
+---------+---------------------------------------------------+
...
|       8 | http://www.grenadepod.com/category/news/          |
|       9 | http://www.grenadepod.com/about/                  |
|      10 | http://www.grenadepod.com/category/it-technology/ |
+---------+---------------------------------------------------+
10 rows in set (0.00 sec)</pre></div></div>

<p>Now change the link_id:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">mysql&amp;gt; update wp_links set link_id=10000 where link_id=9;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0
&nbsp;
mysql&amp;gt; select link_id, link_url from wp_links;
+---------+---------------------------------------------------+
| link_id | link_url                                          |
+---------+---------------------------------------------------+
...
|       8 | http://www.grenadepod.com/category/news/          |
|      10 | http://www.grenadepod.com/category/it-technology/ |
|   10000 | http://www.grenadepod.com/about/                  |
+---------+---------------------------------------------------+
&nbsp;
10 rows in set (0.00 sec)</pre></div></div>

<p>All done, all fixed and here&#8217;s how the menu looks now:</p>
<p><img class="aligncenter size-full wp-image-313" title="link-category-after" src="http://www.grenadepod.com/wp-content/uploads/2009/11/link-category-after.png" alt="link-category-after" width="546" height="271" /></p>


<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/04/top-level-menu-in-arras-theme/' rel='bookmark' title='Permanent Link: Top level menu in Arras theme'>Top level menu in Arras theme</a></li>
<li><a href='http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/' rel='bookmark' title='Permanent Link: Essential WordPress plugins'>Essential WordPress plugins</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/11/10/changing-menu-order/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Essential WordPress plugins</title>
		<link>http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/</link>
		<comments>http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 16:47:17 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[Publishing]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=218</guid>
		<description><![CDATA[OK, I&#8217;ve been busy adding new plugins and setting up my WordPress installation, and I think I got it sorted out now. There are probably things that I will need to add at some later stage, but below is what I think to be a bare minimum for a blog/news site, or in fact any [...]


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/04/disabling-columns-for-specific-pages/' rel='bookmark' title='Permanent Link: Disabling columns for specific pages'>Disabling columns for specific pages</a></li>
<li><a href='http://www.grenadepod.com/2009/11/04/top-level-menu-in-arras-theme/' rel='bookmark' title='Permanent Link: Top level menu in Arras theme'>Top level menu in Arras theme</a></li>
<li><a href='http://www.grenadepod.com/2009/11/18/developing-my-first-wordpress-plugin/' rel='bookmark' title='Permanent Link: Developing my first WordPress plugin'>Developing my first WordPress plugin</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />OK, I&#8217;ve been busy adding new plugins and setting up my WordPress installation, and I think I got it sorted out now. There are probably things that I will need to add at some later stage, but below is what I think to be a bare minimum for a blog/news site, or in fact any site for that matter. I&#8217;m pretty sure there are loads of &#8220;must have plugins&#8221; lists out there, but this is my favourite.</p>
<ol>
<li><strong>Akismet</strong>. If you plan using comments (who doesn&#8217;t?) you most definitely need this one. This plugin will check any new comment against it&#8217;s spam database and if it thinks it is spam &#8211; it will not allow it to show up on your site. So no more penis enlargement pill comments&#8230; Apparently 83% of comments are spam. It comes in a default installation and also requires WordPress API key. <a href="http://akismet.com/" target="_blank">Plugin website</a>.</li>
<li><strong>All in One SEO Pack</strong>. Makes your website more search engine friendly. Not really sure how critical is that, but I tent to just install these plugins, just in case. <a href="http://semperfiwebdesign.com/portfolio/wordpress/wordpress-plugins/all-in-one-seo-pack/" target="_blank">Plugin website</a>.</li>
<li><strong>Amazon Affiliate Link Localizer</strong>. This one is quite handy if you&#8217;re advertising Amazon products on your site. Problem with Amazon is that you will not earn a penny if you advertise Amazon.com product and german user clicks and buys it off Amazon.de. This plugin detects the location of the user and display appropriate Amazon website link. <a href="http://petewilliams.info/blog/2009/09/amazon-affiliate-link-localizer-wordpress-plugin/" target="_blank">Plugin website</a>.</li>
<li><strong>Contact Form 7</strong>. Simple contact form. Yet quite extensible, allows you to add custom fields, email forwarding, etc. <a href="http://contactform7.com/" target="_blank">Plugin website</a>.</li>
<li><strong>Easy AdSense</strong>. Another must have for those who want to place their GoogleAds on the blog. Although it&#8217;s primarily meant for placing GoogleAd code, you can use it for other affiliate networks as well. <a href="http://www.thulasidas.com/adsense" target="_blank">Plugin website</a>.</li>
<li><strong>FollowMe</strong>. Everyone&#8217;s on Twitter these days right? This plugin displays a Twitter &#8220;FollowMe&#8221; link on your blog. <a href="http://wpburn.com/wordpress-plugins/wp-followme-plugin" target="_blank">Plugin website</a>.</li>
<li><strong>Google Analytics for WordPress</strong>. Another plugin to make your website and Google friends. Adds Google Analytics code to all your pages. <a href="http://yoast.com/wordpress/google-analytics/" target="_blank">Plugin website</a>.</li>
<li><strong>Google XML Sitemaps</strong>. Yup, they want sitemaps as well. So Let&#8217;s provide them with some. Very simple and easy to configure. <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/" target="_blank">Plugin website</a>.</li>
<li><strong>Inline Posts</strong>. This one allows you to include posts in your pages. I mean any page. Let&#8217;s say if for whatever reason in your about page you decide to add posts &#8211; now you can with this plugin. <a href="http://aralbalkan.com/wordpress" target="_blank">Plugin website</a>.</li>
<li><strong>Sociable</strong>. Puts links to all gazillion social networking websites that are out there, so people who enjoy reading your posts can spread the joy and love. And yes, you can only select those that you like. <a href="http://blogplay.com/plugin/" target="_blank">Plugin website</a>.</li>
<li><strong>WordPress.com Stats</strong>. Kind of redundant if you use Google analytics, but I like the ability to quickly check how the blog is doing in terms of visitors, etc. Also requires WordPress account. <a href="http://wordpress.org/extend/plugins/stats/" target="_blank">Plugin website</a>.</li>
</ol>
<p>As I said, this is just the beginning. These are bare necessity to get you online in a good shape. Add more to your taste afterwards&#8230;</p>
<h3>Update 1</h3>
<p>Just when I started writing my first post about coding, I realised that simple &lt;pre&gt; tag is way too boring and I want something juicier. So there it is, a plugin that adds syntax highlight to the code syntax snippets in your posts. It extends simple &lt;pre&gt; so that you can say &lt;pre lang=&#8221;python&#8221;&gt; and it&#8217;ll render nicely highlighted syntax:</p>
<ul>
<li><strong>WP-syntax</strong>. <a href="http://wordpress.org/extend/plugins/wp-syntax/" target="_blank">Plugin website</a>.</li>
</ul>


<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/04/disabling-columns-for-specific-pages/' rel='bookmark' title='Permanent Link: Disabling columns for specific pages'>Disabling columns for specific pages</a></li>
<li><a href='http://www.grenadepod.com/2009/11/04/top-level-menu-in-arras-theme/' rel='bookmark' title='Permanent Link: Top level menu in Arras theme'>Top level menu in Arras theme</a></li>
<li><a href='http://www.grenadepod.com/2009/11/18/developing-my-first-wordpress-plugin/' rel='bookmark' title='Permanent Link: Developing my first WordPress plugin'>Developing my first WordPress plugin</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Top level menu in Arras theme</title>
		<link>http://www.grenadepod.com/2009/11/04/top-level-menu-in-arras-theme/</link>
		<comments>http://www.grenadepod.com/2009/11/04/top-level-menu-in-arras-theme/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 15:10:17 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[Publishing]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=22</guid>
		<description><![CDATA[After spending 2 or 3 hours in a search for a perfect WordPress theme, I settled on Arras theme. I think it&#8217;s a decent looking theme and I liked the fact that it offers the so called &#8220;featured stories&#8221; slideshow on the top page with thumbnails for each story. This thumbnail grid view can also [...]


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/10/changing-menu-order/' rel='bookmark' title='Permanent Link: Changing menu order'>Changing menu order</a></li>
<li><a href='http://www.grenadepod.com/2009/11/04/disabling-columns-for-specific-pages/' rel='bookmark' title='Permanent Link: Disabling columns for specific pages'>Disabling columns for specific pages</a></li>
<li><a href='http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/' rel='bookmark' title='Permanent Link: Essential WordPress plugins'>Essential WordPress plugins</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />After spending 2 or 3 hours in a search for a perfect WordPress theme, I settled on <a href="http://www.arrastheme.com/" target="_blank">Arras theme</a>. I think it&#8217;s a decent looking theme and I liked the fact that it offers the so called &#8220;featured stories&#8221; slideshow on the top page with thumbnails for each story. This thumbnail grid view can also be used in search results, such as category listings, so I thought it&#8217;ll work quite well for a page that is going to host lots of little projects.</p>
<p>Still haven&#8217;t thought the exact structure as just yet, but I see it coming.</p>
<p>Anyway, again, being a complete dummy when it comes to WordPress configuration, I struggled with the top menu. From the first glance at the Arras theme config it seemed that I can either link to site pages or categories. So what I want is this: links to some (not all, just some!) categories and a link to a page (to be precise: about page). Neither of the two provided me with this functionality.</p>
<p>There is a third option, that I overlooked: link category. It allows you to pick a link category, such as blogroll, and display all links in the menu. Yeah right, why would I need that, I thought. But then it clicked &#8211; I can put any links I want, like links to my categories and pages and display it there. I can even link to individual posts.</p>
<p>How cool is that?! There&#8217;s one (or may be more, but I haven&#8217;t come across them yet) drawback &#8211; you need to specify all links manually. Would be really nice if I could just select from all the resources available on my site.</p>


<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/10/changing-menu-order/' rel='bookmark' title='Permanent Link: Changing menu order'>Changing menu order</a></li>
<li><a href='http://www.grenadepod.com/2009/11/04/disabling-columns-for-specific-pages/' rel='bookmark' title='Permanent Link: Disabling columns for specific pages'>Disabling columns for specific pages</a></li>
<li><a href='http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/' rel='bookmark' title='Permanent Link: Essential WordPress plugins'>Essential WordPress plugins</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/11/04/top-level-menu-in-arras-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disabling columns for specific pages</title>
		<link>http://www.grenadepod.com/2009/11/04/disabling-columns-for-specific-pages/</link>
		<comments>http://www.grenadepod.com/2009/11/04/disabling-columns-for-specific-pages/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 10:36:36 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[Publishing]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=18</guid>
		<description><![CDATA[Ok, I&#8217;m in this stage when I spend more time configuring and getting the website layout right than actually working on any projects or writing posts. I&#8217;ve never used WordPress before, so these posts tagged &#8220;WordPress&#8221; are more for myself to either implement something or as a reminder in case I need to tweak some [...]


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/' rel='bookmark' title='Permanent Link: Essential WordPress plugins'>Essential WordPress plugins</a></li>
<li><a href='http://www.grenadepod.com/2010/02/22/seo-is-killing-google/' rel='bookmark' title='Permanent Link: SEO is killing Google'>SEO is killing Google</a></li>
<li><a href='http://www.grenadepod.com/2009/11/04/top-level-menu-in-arras-theme/' rel='bookmark' title='Permanent Link: Top level menu in Arras theme'>Top level menu in Arras theme</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />Ok, I&#8217;m in this stage when I spend more time configuring and getting the website layout right than actually working on any projects or writing posts. I&#8217;ve never used WordPress before, so these posts tagged &#8220;WordPress&#8221; are more for myself to either implement something or as a reminder in case I need to tweak some settings.</p>
<p>So far I&#8217;ve only installed few themes, and basic plugins, mostly to get stuff like Google Ads and Analytics working, nothing too spectacular.</p>
<p>I was playing with Google search and got an idea of replacing the default WordPress search with GoogleSearch. There&#8217;s one issue though, I have two options:</p>
<ul>
<li>Redirect users to Google page, which isn&#8217;t ideal, I want them stay</li>
<li>Display search results on my website</li>
</ul>
<p>I opted for the second option, however it poses few issues &#8211; I have 2 column layout (and will possibly add 3rd one at some stage). Google results are best displayed in a single column view (debatable, but that&#8217;s my taste at the moment, which may change in the future).</p>
<p>So, how do I make specific pages single column? After some Googling I&#8217;ve come across <a href="http://www.arrastheme.com/forums/topic.php?id=196#post-680" target="_blank">this post</a>, which seems to work fine for me.</p>


<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/' rel='bookmark' title='Permanent Link: Essential WordPress plugins'>Essential WordPress plugins</a></li>
<li><a href='http://www.grenadepod.com/2010/02/22/seo-is-killing-google/' rel='bookmark' title='Permanent Link: SEO is killing Google'>SEO is killing Google</a></li>
<li><a href='http://www.grenadepod.com/2009/11/04/top-level-menu-in-arras-theme/' rel='bookmark' title='Permanent Link: Top level menu in Arras theme'>Top level menu in Arras theme</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/11/04/disabling-columns-for-specific-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
