<?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>Glass Ocean</title>
	<atom:link href="http://glassocean.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://glassocean.net</link>
	<description>Perry Butler&#039;s Blog, Music Productions, Services, and Software Development.</description>
	<lastBuildDate>Thu, 26 Aug 2010 15:10:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>When to Update WordPress</title>
		<link>http://glassocean.net/when-to-upgrade-wordpress/</link>
		<comments>http://glassocean.net/when-to-upgrade-wordpress/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 15:39:32 +0000</pubDate>
		<dc:creator>Perry</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://glassocean.net/?p=1057</guid>
		<description><![CDATA[Broken Website = Unhappy Client I read an interesting article today which had some useful feedback on when and why WordPress users were updating to the latest major version, WordPress 3.0. Based on the comments in the article, I noticed &#8230; <a href="http://glassocean.net/when-to-upgrade-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Broken Website = Unhappy Client</strong></p>
<p>I read an interesting article today which had some useful feedback on <em>when</em> and <em>why</em> WordPress users were updating to the latest major version, WordPress 3.0. Based on the comments in the article, I noticed a few trends as well as some good insight.</p>
<p><span id="more-1057"></span></p>
<ul>
<li>Major upgrades can break compatibility with plugins and themes.</li>
<li>Wait for feedback from early adopters before upgrading.</li>
<li>Backup the entire website before upgrading so a rollback is possible if  needed.</li>
<li>Keep a separate installation of WordPress for testing purposes, and test the upgrade on this installation first, including desired plugins and themes.</li>
<li>Upgrade immediately if security flaws are addressed to mitigate cyber attacks, otherwise wait for feedback from early adopters.</li>
<li>Broken Website = Unhappy Client. For a webmaster who is managing a client&#8217;s website, it is generally not a good idea to jump on upgrades unless they are proven to work (use a test installation first!) or the client is pushing for them (recommend against it but let them know the risk!).</li>
</ul>
<p>You definitely don&#8217;t want to get burned by jumping ship too early like some people:</p>
<ul>
<li>odtaa wrote in stating that his Viva 7 theme stopped functioning, and upon contacting the theme&#8217;s vendor he discovered the business had been sold and their website was gone.</li>
<li>Mary from A-List Blogger Club wrote in stating that she upgraded right away and some of her plugins were incompatible. As a result, several pages ended up in the trash and WordPress somehow granted a newbie user admin status.</li>
</ul>
<p>You can read the full article <a href="http://www.dailyblogtips.com/when-to-update-wordpress-immediately-and-when-not-to/">here</a>.</p>
<p>As for my take&#8230;</p>
<p>I normally  would have waited to see what the general reaction was from the public,  but in this case I upgraded immediately, which turned out to be  painless. I was too eager to implement the new menu system on my blog.</p>
<p>The highly customized basic2col theme I was using would no longer  render in WordPress 3.0 and displayed a PHP error, so I switched to  TwentyTen and threw in some quick CSS customizations. Also, the  WP-Syntax plugin didn’t seem to work properly, so I switched to using  basic pre tags until I discovered SyntaxHighlighter Evolved about a week  later. After working through these hiccups my site was back online in  about 15 minutes.</p>
<p>My blog is rather new and I try to keep the plugins limited by    writing custom functions instead, so I wouldn’t recommend a    compulsive upgrade for everyone, especially those who are using many    customizations.</p>
<p>I’m happy to see such a stable release from a dev team.</p>
]]></content:encoded>
			<wfw:commentRss>http://glassocean.net/when-to-upgrade-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upload.com Does Not Accept Blogs!</title>
		<link>http://glassocean.net/upload-com-does-not-accept-blogs/</link>
		<comments>http://glassocean.net/upload-com-does-not-accept-blogs/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 20:35:45 +0000</pubDate>
		<dc:creator>Perry</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://glassocean.net/?p=973</guid>
		<description><![CDATA[Upload.com, relative of Download.com and part of the CNET.com network, does not allow a person to create a developer account and submit software if his or her website contains a blog, even if the blog and software are legitimate endeavors. &#8230; <a href="http://glassocean.net/upload-com-does-not-accept-blogs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Upload.com, relative of Download.com and part of the CNET.com network, does not allow a person to create a developer account and submit software if his or her website contains a blog, even if the blog and software are legitimate endeavors.</p>
<p>The fact is, GlassOcean.net needs  more promotion in order for my software    to reach a mass audience, and one way to do this is to submit the software to various  &#8220;File Hosting&#8221; websites.  Download.com is the first one that comes to mind.</p>
<p>I submitted my personal information yesterday to Upload.com.</p>
<p>8 hours later I was denied.</p>
<p><span id="more-973"></span></p>
<p>Here&#8217;s the letter they sent me via email:</p>
<p><img src="/media/upload-dot-com-does-not-accept-blogs-01.jpg" alt="PIC:  01" width="564" height="476" /></p>
<p><strong>Reason: At this time we do not accept blogs.</strong></p>
<p>I applaud them for using a review process to filter out all the absurd, virus filled software twinkies they get on a daily basis, as well as trying to curtail spammers and SEO nuts who submit   software for the sole purpose of bringing more traffic to their own   website for ad revenue and sales.</p>
<p>Besides writing about the things that I find interesting, my blog is a news tool that I use to guide readers towards my software, music, and services, which can all be found on the same website. Apparently I shouldn&#8217;t be doing this.</p>
<p>Their knowledgebase/help/faq does mention this:</p>
<p>&#8220;At  this time we do not accept product-specific URLs or links to pages other  than your main company home page.&#8221;</p>
<p>Nothing about blogs&#8230; Lame sauce!</p>
<p>In the meantime, I&#8217;ll need to rethink my idea of having everything <em>Perry </em>under one roof.</p>
]]></content:encoded>
			<wfw:commentRss>http://glassocean.net/upload-com-does-not-accept-blogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Upload WordPress</title>
		<link>http://glassocean.net/how-to-upload-wordpress/</link>
		<comments>http://glassocean.net/how-to-upload-wordpress/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 23:26:36 +0000</pubDate>
		<dc:creator>Perry</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://glassocean.net/?p=916</guid>
		<description><![CDATA[In this tutorial you will learn the basics of how to upload WordPress to a web host. This is particularly useful if you want to host WordPress yourself and use your own domain name to efficiently promote and market your &#8230; <a href="http://glassocean.net/how-to-upload-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In this tutorial you will learn the basics of how to upload WordPress to a web host. This is particularly useful if you want to host WordPress yourself and use your own domain name to efficiently promote and market your blog. Uploading WordPress to a web host and using a personal domain name also makes your blog look more professional.</p>
<p>While it is certainly possible to host your blog for free at <a href="http://WordPress.com">www.WordPress.com</a>, what they are doing is simply providing a service for people who do not have their own web host or the technical know-how to upload and maintain a WordPress installation themselves. Hosting WordPress requires some PHP and database knowledge among other   things. Furthermore, www.WordPress.com does not allow advertising for hosted blogs unless the blog attains VIP status.</p>
<p><span id="more-916"></span></p>
<h2>Create the WordPress Database</h2>
<p>WordPress uses a MySQL database to store all of its data and information, so you&#8217;ll need to set one up with your web host.</p>
<p><strong>Important: Setting up a database can be unique for any particular web host.</strong> No matter what web host you use, you&#8217;ll need to remember the <strong>database name</strong>, <strong>username</strong>, and <strong>password</strong> for the database, because WordPress needs this information to communicate with the database and function correctly. Most web hosts allow you to specify at least your own password for the database, but some web hosts won&#8217;t let you specify <em>any</em> of this information, so you&#8217;ll just have to create the database and settle for whatever your web host assigns for the database name, username, and password.</p>
<div class="wp-caption alignright" style="width: 135px"><a href="http://www.1and1.com/?affiliate_id=225292"><img src="http://www.1and1affiliate.com/uploads/pics/125x125_01.gif?aid=225292" alt="" width="125" height="125" /></a><p class="wp-caption-text">Sponsored Link</p></div>
<p>In my case, the <a href="http://www.1and1.com/?affiliate_id=225292">1&amp;1 Webhosting</a> plan that I use for GlassOcean.net costs   a mere $9.99/month and allows the creation of 50 MySQL databases&#8230; we only   need 1 for WordPress!</p>
<p>I just had to logon to my hosting plan at www.1and1.com, click the MySQL Administration link, then click the New Database button. I provided a password of <strong>mywpdata </strong>then clicked the Set Up button. After about a minute, my database was online and ready to use! I could also see that my web host automatically assigned the database a database name of <strong>db334141650</strong> and a username of <strong>dbo334141650.</strong></p>
<p>To summarize:</p>
<ul>
<li>Database name: <strong>db33414650</strong></li>
<li>Username: <strong>dbo334141650</strong><strong> </strong></li>
<li>Password: <strong>mywpdata</strong></li>
</ul>
<p>&#8230;and this is exactly what we will plug into the WordPress configuration file later on.</p>
<h2>Download WordPress</h2>
<p>Visit the <a href="http://wordpress.org">official WordPress site</a> and download the latest version of WordPress. All of the WordPress files come packaged inside a zip file.</p>
<h2>Extract the Files</h2>
<p>The zip file comes packaged with one folder called <strong>wordpress</strong>, and inside this folder you will find all of the WordPress files.</p>
<p>Extract the <strong>wordpress </strong>folder somewhere to your computer and open it. In my case I extracted it to the Desktop:</p>
<p><img src="/media/upload-wordpress-01.jpg" alt="PIC: 01" width="512" height="338" /></p>
<h2>Modify the Configuration</h2>
<p>This step is an important one you don&#8217;t want to overlook. Before WordPress can function correctly, you must provide it with information about the MySQL database that you created earlier. Particularly, WordPress needs the database name and a username/password to access the database.</p>
<p>Locate the <strong>wp-config-sample.php</strong> file in the files that you extracted and <strong>rename it to </strong><strong>wp-config.php</strong>. Now open this file in a text editor such as Notepad:</p>
<p><img src="/media/upload-wordpress-02.jpg" alt="PIC: 02" width="683" height="528" /></p>
<p>Notice the <span style="color: #ff0000;"><span style="text-decoration: underline;">underlined text</span></span>, which is where you will plug in the database information that you acquired earlier when you created the MySQL database. Make sure not to erase the single quotation marks.</p>
<h2>Upload the Files</h2>
<p>Now you&#8217;ll want to upload these files to your web server using an FTP program. I like <a href="http://filezilla-project.org/">FileZilla</a> since it is robust, easy to use, and of course open source and free.</p>
<h2>Welcome to WordPress</h2>
<p>Fire up your web browser and navigate to the install script that you uploaded under http://www.[YourSiteURL].com/wp-admin/install.php. Just follow the instructions in your web browser to finish the installation and begin pressing your valuable thoughts!</p>
]]></content:encoded>
			<wfw:commentRss>http://glassocean.net/how-to-upload-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Enable Permalinks for WordPress on a Shared Web Hosting Plan</title>
		<link>http://glassocean.net/how-to-enable-permalinks-for-wordpress-on-a-shared-web-hosting-plan/</link>
		<comments>http://glassocean.net/how-to-enable-permalinks-for-wordpress-on-a-shared-web-hosting-plan/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 16:13:24 +0000</pubDate>
		<dc:creator>Perry</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://glassocean.net/?p=858</guid>
		<description><![CDATA[Modify the .htaccess file in your root WordPress directory to enable Permalinks on a shared web hosting plan. <a href="http://glassocean.net/how-to-enable-permalinks-for-wordpress-on-a-shared-web-hosting-plan/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you have a shared web hosting plan like I do with <a href="http://www.1and1.com/?affiliate_id=225292">1&amp;1 Webhosting</a>, you most likely do not have direct access to the computer which your website is hosted on to install and configure the mod_rewrite plugin for Linux/Apache or the ISAPI_Rewrite plugin for Windows/IIS, either one of which is required to get Permalinks working in WordPress.</p>
<p>However, there is another way to this by editing the <strong>.htaccess</strong> file in your root WordPress directory.</p>
<p><span id="more-858"></span></p>
<p>Download the .htaccess file from your root WordPress directory via FTP and open the file in a text editor.</p>
<p>Here is what my .htaccess looked like in Notepad before the modification to enable Permalinks:</p>
<pre>AddType x-mapp-php5 .php
# BEGIN WordPress

# END WordPress
</pre>
<p>And here is what the modified version looks like, which enables some URL rewriting that WordPress requires to make proper use of Permalinks:</p>
<pre>AddType x-mapp-php5 .php
# BEGIN WordPress
&lt;IfModule mod_rewrite.c&gt;
ErrorDocument 404 /index.php?error=404
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
&lt;/IfModule&gt;
# END WordPress
</pre>
<div class="block-tech">This is quite an interesting bit of code. In line 4, we are defining a rewrite condition that says &#8220;if a visitor requests a URL from my website that does not exist, redirect them to the home page (index.php).&#8221; This is very useful because if someone uses a search engine to locate your site, and the search engine hasn&#8217;t updated the URL&#8217;s to match your current Permalink structure, that person will still land on your home page instead of a 404 error page because of this rewrite condition.</div>
<p>Just upload the .htaccess file back to your root WordPress directory via FTP, overwriting the old one.</p>
<p>Logon to your WordPress backend and go to <strong>Settings » Permalinks</strong>. Select the <strong>Custom</strong> option, then enter the following:</p>
<pre>/%postname%/
</pre>
<p>What this does is effectively rewrite the URL for your posts to use the Post Name in the URL instead of the Post ID.</p>
<p>Using <em>this article</em> as an example, my previous URL of:</p>
<pre>http://www.glassocean.net/?p=858
</pre>
<p>Would now become:</p>
<pre>http://www.glassocean.net/how-to-enable-permalinks-in-wordpress-for-a-shared-web-hosting-plan/
</pre>
<p>As you can see, that is quite a long URL! You can shorten these URL&#8217;s by changing the <strong>Post Slug</strong> in the Post/Page editor.</p>
]]></content:encoded>
			<wfw:commentRss>http://glassocean.net/how-to-enable-permalinks-for-wordpress-on-a-shared-web-hosting-plan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Move Comments in WordPress 3.0 with phpMyAdmin</title>
		<link>http://glassocean.net/how-to-move-comments-in-wordpress-3-0-with-phpmyadmin/</link>
		<comments>http://glassocean.net/how-to-move-comments-in-wordpress-3-0-with-phpmyadmin/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 17:53:37 +0000</pubDate>
		<dc:creator>Perry</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://glassocean.net/?p=784</guid>
		<description><![CDATA[Many of the Move Comments plugins for WordPress do not seem to work properly in WordPress 3.0, so I needed a way to move comments around from one post/page to another, as well as retain any threaded/nested comments. One could &#8230; <a href="http://glassocean.net/how-to-move-comments-in-wordpress-3-0-with-phpmyadmin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Many of the <em>Move Comments</em> plugins for WordPress do not seem to work properly in WordPress 3.0, so I needed a way to move comments around from one post/page to another, as well as retain any threaded/nested comments. One could always move comments by modifying the database directly with phpMyAdmin or something similar, and this is what I had to resort to. Modifying your WordPress database directly isn&#8217;t something you want to  do every day, but sometimes it is completely unavoidable. It took me all of 5 minutes to figure this out, so it shouldn&#8217;t be too  difficult for you either.</p>
<p><span id="more-784"></span></p>
<p><strong>Warning &#8211; backup your database now!</strong> You should always take precautions when modifying the database directly because you can really mess up WordPress if you do something wrong. You are highly advised to make a backup before proceeding, especially if you don&#8217;t feel comfortable with these instructions.</p>
<p>Assuming you&#8217;ve backed up your database, let&#8217;s continue!</p>
<p>Open up phpMyAdmin and click the <strong>wp_comments</strong> link on the left hand side:</p>
<p><img src="/media/move-comment-01.jpg" alt="PIC: screenshot 01" width="680" height="359" /></p>
<p>Now you&#8217;ll see a page with a ton of information about the wp_comments table, which is a table in your WordPress database that contains all of the comments.</p>
<p>Scroll down the page until you locate the section that says <strong>Run SQL query/queries on database</strong>:</p>
<p><img src="/media/move-comment-02.jpg" alt="PIC: screenshot 02" width="562" height="191" /></p>
<p>Pictured above is a SQL query that basically means &#8220;retrieve all comment records from the wp_comments table.&#8221;</p>
<p>Click the <strong>Go </strong>button to run this SQL query and retrieve the records from the database.</p>
<p>When the comment records have been retrieved, you will be presented with another page that shows a list of all the comments that are stored in the wp_comments table. This is where you can edit a comment to move it somewhere else.</p>
<p>You&#8217;ll want to locate the comment record that you wish to move, click the edit button, then modify the <strong>comment_post_ID</strong> value and/or <strong>comment_parent</strong> value to effectively assign the comment to a different post, page, or parent comment. If you&#8217;ve selected the option to <strong>Enable threaded (nested) comments</strong> under Settings &#8211;&gt; Discussion, <strong>comment_parent</strong> is what relates child comments to parent comments so they can appear nested.</p>
<p>In the screenshot below, comment 122 appears <em>nested beneath</em> comment 120 in post 21 due to the relationship defined in comment_parent for comment 122.</p>
<p><img src="/media/move-comment-04.jpg" alt="PIC: screenshot 03" /></p>
<p>Hold up cowboy, you aren&#8217;t done yet! If you were to visit the actual post/page where you moved the comment to, you would notice that the <strong>Comment Count</strong> hasn&#8217;t been updated even though the comments now appear to be moved and show up on the post/page.</p>
<p>What you&#8217;ll need to do now is modify the post/page record, much in the same way that you modified the comment record, but instead you would select the wp_posts link on the left hand side of phpMyAdmin. Again, you&#8217;ll want to query the table, then locate the post/page that needs the Comment Count updated.</p>
<p>This is where things might get confusing and here&#8217;s why: <strong>WordPress stores every revision that you make to a page/post, not  just the current copy, so you&#8217;ll want to locate the most recent revision  (the one that is actually being displayed on your blog) and modify THAT  record only.</strong> It&#8217;s easy to locate the most recent revision, just check the post_type column for &#8220;page&#8221; or &#8220;post&#8221; and not &#8220;revision&#8221;.</p>
<p>Once you locate the correct record, edit the record and update the comment_count value to match how many comments you actually have for that post/page.</p>
<p>You&#8217;re done!</p>
]]></content:encoded>
			<wfw:commentRss>http://glassocean.net/how-to-move-comments-in-wordpress-3-0-with-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Use Custom PHP Functions and Shortcodes in WordPress</title>
		<link>http://glassocean.net/how-to-use-custom-php-functions-and-shortcodes-in-wordpress/</link>
		<comments>http://glassocean.net/how-to-use-custom-php-functions-and-shortcodes-in-wordpress/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 20:08:19 +0000</pubDate>
		<dc:creator>Perry</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://glassocean.net/?p=684</guid>
		<description><![CDATA[I touched on this subject before in my previous article titled WordPress Tip: the_category Without Links, which focuses on the WordPress get_category function, but I decided to write this article so I can focus more on the general implementation of &#8230; <a href="http://glassocean.net/how-to-use-custom-php-functions-and-shortcodes-in-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I touched on this subject before in my previous article titled <a href="?p=589">WordPress Tip: the_category Without Links</a>, which focuses on the WordPress get_category function, but I decided to write this article so I can focus more on the general implementation of PHP functions with WordPress, and so that people will have an easier time locating these tips via a web search.</p>
<p>Some WordPress plugins require you to add shortcodes to your pages/posts to utilize the plugin, so I wouldn&#8217;t be surprised if you were already using shortcodes. Whether or not you&#8217;ve had any experience using WordPress shortcodes,  this tutorial has what you need to get started.</p>
<p><span id="more-684"></span></p>
<h2>Step 1: Create the user-functions.php file</h2>
<p>The user-functions.php file will contain our custom functions and shortcodes.</p>
<p>Create a new text file named <strong>user-functions.php</strong> and copy/paste the following code into the file:</p>
<pre lang="php">&lt;?php
function HelloWorld() {
    echo "Hello World! This is my custom function.";
}
add_shortcode('hello', 'HelloWorld');
?&gt;
</pre>
<p>What we&#8217;ve done here is create one function called HelloWorld (lines 2-4), and then we added a shortcode to WordPress (line 5) named <em>hello</em>, which calls the <em>HelloWorld </em>function when we include the <em>Hello World! My name is .</em> shortcode in the contents of a page or post.</p>
<p>Save this file and upload it to your active theme folder. For example, if you are using the Twenty Ten theme, the file should be located under <strong>[WordPressDir]\wp-content\themes\twentyten\user-functions.php</strong>.</p>
<h2>Step 2: Instruct WordPress to load the user-functions.php file</h2>
<p>Unless WordPress loads your user-functions.php file, it won&#8217;t even know about your custom functions/shortcodes!</p>
<p>Download <strong>functions.php</strong> from your active theme folder.</p>
<p>Open the functions.php file in a text editor and add the following line of code anywhere on a new line:</p>
<pre lang="php">include_once (TEMPLATEPATH . '/user-functions.php');
</pre>
<p>Here we are instructing WordPress to load our user-functions.php file as soon as it loads the functions.php file, which will make our custom functions/shortcodes available throughout the entire site, as long as the active theme that we are modifying remains active.</p>
<p>Save the functions.php file and upload it back to your root WordPress directory, overwriting the old one.</p>
<h2>Step 3: Using the Shortcode in a Page/Post</h2>
<p>Create a new page, then write the following text in the visual editor:</p>
<pre>Hello World! My name is .
</pre>
<p>This shortcode will instruct WordPress to call your HelloWorld function. When you view the published page (or preview the draft), you should get a result similar to this:</p>
<pre>Hello World! This is my custom function.
</pre>
<h2>Conclusion</h2>
<p>I&#8217;ve purposely kept this tutorial and the source code simple enough for anyone to grasp the the basics of what it takes to add a function/shortcode to WordPress. I may decide to extend this tutorial in the future and include some intermediary/advanced topics for readers who wish to continue learning <em>the simple way</em>, via this tutorial.</p>
]]></content:encoded>
			<wfw:commentRss>http://glassocean.net/how-to-use-custom-php-functions-and-shortcodes-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How to Use the_category Tag Without Links in WordPress</title>
		<link>http://glassocean.net/how-to-use-the_category-tag-without-links-in-wordpress/</link>
		<comments>http://glassocean.net/how-to-use-the_category-tag-without-links-in-wordpress/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 22:57:00 +0000</pubDate>
		<dc:creator>Perry</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://glassocean.net/?p=589</guid>
		<description><![CDATA[You see, the_category template tag outputs the name of every category a post belongs to, but the category names are linked to respective category pages that I do not want my visitors accessing. Here on GlassOcean.net I try to obscure &#8230; <a href="http://glassocean.net/how-to-use-the_category-tag-without-links-in-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You see, <em>the_category</em> template tag outputs the name of every category a post belongs to, but the category names are linked to respective category pages that I do not want my visitors accessing. Here on GlassOcean.net I try to obscure the category pages that WordPress generates because <a href="?p=513">they are not as customizable as I would like</a>. Therefore, I needed a way to list the categories that a post belongs to without the links.</p>
<p>A Google search for &#8220;wordpress the_category without links&#8221; returned an article by Robert Mirabito titled <a href="http://www.sydneyfx.com.au/wordpress/how-to-remove-link-from-the_category-in-wordpress/167">How to remove link from the_category in WordPress</a>, which led me to the understanding that I would need to use the <strong><em>get_the_category</em></strong> template tag instead of the<em> the_category</em> template tag. However, Robert&#8217;s example inserts a space character as the delimiter, and changing this delimiter to something else results in the delimiter appearing after the very last category. So if you used a comma character as the delimiter, you would end up with something like &#8220;Posted in Blog, Services,&#8221; which<em> </em>looks bad. This led to some more searching.</p>
<p><span id="more-589"></span></p>
<p>A Google search for &#8220;wordpress get_the_category separator&#8221; returned a question posted by <em>nipponese </em>to the WordPress.org forum titled <a href="http://wordpress.org/support/topic/300494">Adding $separator to get_the_category. Is it possible?</a></p>
<p>I wasn&#8217;t too sure about the solution <em>greenshady </em>provided, so I finally decided it was time to learn how to create my own template tags. One last Google search helped me locate an article by Chris Pearson titled <a href="http://www.pearsonified.com/2008/05/how-to-use-wordpress-functions.php">How You Can Use WordPress Functions To Run a Smarter Blog</a>, which had enough information to get me started.</p>
<p>I ended up creating the user-functions.php file and uploading it to my  active template folder as described in the article, where I included a  custom PHP function that would do the work of displaying the categories how I wanted them.</p>
<p>Check out the code:</p>
<pre>&lt;?php
function user_the_categories() {
    // get all categories for this post
    global $cat;
    $cat = get_the_category();
    // echo the first category
    echo $cat[0]-&gt;cat_name;
    // echo the remaining categories, appending separator
    for ($i = 1; $i &lt; count($cat); $i++) {echo ', ' . $cat[$i]-&gt;cat_name ;}
}
?&gt;
</pre>
<p>What this little function does is output the first category name, then for every remaining category output a comma and space (&#8216;, &#8216;), followed by the category name ($cat[$i]-&gt;cat_name). We no longer have to worry about that trailing separator character you will most likely have when providing a separator arg with the <em>get_the_categories</em> template tag.</p>
<p>To use this, all I have to do is include this line in my single.php template file:</p>
<pre>&lt;?php user_the_categories(); ?&gt;
</pre>
<p>And what you end up with on the page looks like this:</p>
<pre>Posted in Blog, Services</pre>
]]></content:encoded>
			<wfw:commentRss>http://glassocean.net/how-to-use-the_category-tag-without-links-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Update &#8211; WordPress 3.0</title>
		<link>http://glassocean.net/site-update-wordpress-3-0/</link>
		<comments>http://glassocean.net/site-update-wordpress-3-0/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 18:33:51 +0000</pubDate>
		<dc:creator>Perry</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://glassocean.net/?p=554</guid>
		<description><![CDATA[I&#8217;ve been keeping my eye on WordPress.org over the last week in anticipation of their major upcoming release &#8211; WordPress 3.0 &#8211; and I&#8217;m happy to see that it&#8217;s finally here! Following the simple upgrade instructions at WordPress.org, I backed &#8230; <a href="http://glassocean.net/site-update-wordpress-3-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img style="float: right;" src="/media/wordpress-3.0.jpg" alt="WordPress 3.0" width="170" height="95" />I&#8217;ve been keeping my eye on WordPress.org over the last week in anticipation of their major upcoming release &#8211; WordPress 3.0 &#8211; and I&#8217;m happy to see that it&#8217;s finally here!</p>
<p>Following the simple <a href="http://codex.wordpress.org/Upgrading_WordPress">upgrade instructions</a> at WordPress.org, I backed up the GlassOcean.net website and database, deactivated all plugins, then performed the automatic upgrade from the WordPress admin interface. About 15 minutes later and GlassOcean.net was running on the new WordPress 3.0!</p>
<p>The only problem I ran into was with the highly customized <em>basic2col </em>theme I was using. Upon visiting the newly upgraded GlassOcean.net I was presented with a PHP parsing error, so I switched over to the new <em>Twenty Ten</em> theme. This is the default theme that comes with WordPress 3.0, which likely means it is easily customizable for newer 3.0 features. <em>Twenty Ten</em> is actually a nice theme that closely resembles the minimal black-on-white style I was going for with the customized <em>basic2col </em>theme anyway. I&#8217;m happy with the switch.</p>
<p>GlassOcean.net will be undergoing many changes over the next few days while I continue to customize the appearance and layout to compensate for all of the WordPress 3.0 changes. I&#8217;ll be tweaking the &#8220;Twenty Ten&#8221; theme to match what I had with the &#8220;basic2col&#8221; theme, re-activating plugins and finding alternatives for those that are not yet supported in WordPress 3.0, as well as tinkering with all of the new features.</p>
<p>It&#8217;s an exciting day for WordPressers!</p>
]]></content:encoded>
			<wfw:commentRss>http://glassocean.net/site-update-wordpress-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Update &#8211; Better Navigation</title>
		<link>http://glassocean.net/site-update-better-navigation/</link>
		<comments>http://glassocean.net/site-update-better-navigation/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 18:29:06 +0000</pubDate>
		<dc:creator>Perry</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://glassocean.net/?p=513</guid>
		<description><![CDATA[I&#8217;ve fine tuned a few more things in the never-ending quest to organize this website so it flows logically and is easy to navigate for my readers. First off, you&#8217;ll notice that I&#8217;ve created a new navigation menu and static &#8230; <a href="http://glassocean.net/site-update-better-navigation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve fine tuned a few more things in the never-ending quest to organize this website so it flows logically and is easy to navigate for my readers.</p>
<p>First off, you&#8217;ll notice that I&#8217;ve created a new navigation menu and static pages for all of the main categories: Blog, Services, Music Productions, and Software Development. Previously, I was using the WordPress &#8220;Categories&#8221; widget as my navigation menu, and clicking into one of these categories provided a neat listing of all the posts related to that category. However, I soon discovered that the block of text which appears before the post listing on a category page was not very customizable. Unfortunately, the WordPress category editor is not up to par with the rich-text editing capabilities seen in the WordPress post/page editor, so I needed a way to work around this.</p>
<p><span id="more-513"></span></p>
<p>What I decided to do was create a static page for each category I was using on the website so I would have the rich-text editing capabilities I needed to provide a decent &#8220;intro&#8221; on my category pages. Combining this idea with the <a href="http://wordpress.org/extend/plugins/list-category-posts/">List category posts</a> plugin by author <a href="http://picandocodigo.net/">Fernando Briano</a>, I could now produce exactly what I wanted by designing a page, then using the <em>List category posts</em> shortcode to display a customized category post listing wherever I wanted to in the contents of the page.</p>
<p>Looking forward to WordPress 3.0, these problems might be eliminated entirely with the new menu system, post templates, and multi-site. WordPress design specialist <a href="http://www.briancasel.com/">Brian Casel</a> reviews these features in a Mashable article titled: <a href="http://mashable.com/2010/05/10/new-features-wordpress-3/">WordPress 3.0: The 5 Most Important New Features</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://glassocean.net/site-update-better-navigation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving Your WordPress Installation? Don’t Forget the .htaccess File!</title>
		<link>http://glassocean.net/moving-your-wordpress-installation-don%e2%80%99t-forget-the-htaccess-file/</link>
		<comments>http://glassocean.net/moving-your-wordpress-installation-don%e2%80%99t-forget-the-htaccess-file/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 23:24:53 +0000</pubDate>
		<dc:creator>Perry</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://glassocean.net/?p=220</guid>
		<description><![CDATA[In my previous article From WordPress to Joomla and Back Again, I wrote about how I made the switch back to WordPress after giving Joomla a long trial run. My migration plan back to WordPress was fairly simple: I had &#8230; <a href="http://glassocean.net/moving-your-wordpress-installation-don%e2%80%99t-forget-the-htaccess-file/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In my previous article <a href="?p=187">From WordPress to Joomla and Back Again</a>, I wrote about how I made the switch back to WordPress after giving Joomla a long trial run.</p>
<p>My migration plan back to WordPress was fairly simple: I had Joomla installed in my website&#8217;s root directory (glassocean.net) and I installed WordPress in a subdirectory (glassocean.net/wordpress) where I could begin setting up, customizing the theme, and migrating articles from Joomla.</p>
<p><img class="alignright" style="margin: 10px;" src="/media/php.jpg" alt="PHP" width="170" height="89" />While the <a href="http://codex.wordpress.org/Moving_WordPress">Moving WordPress</a> instructions in the WordPress documentation were easy enough to follow, it wasn&#8217;t until I noticed that the SexyBookmarks plugin wasn&#8217;t rendering properly in my articles that I must have done something wrong. I tried reinstalling the plugin, but it kept hanging up during the &#8220;Unpacking contents of package&#8221; phase.</p>
<p><span id="more-220"></span></p>
<p>The WordPress documentation does make some mention of the <strong>.htaccess</strong> file, but it doesn&#8217;t state that <strong>WordPress requires this file to be in your website&#8217;s root directory even if WordPress is not installed to the root of your website.</strong> The reason? For people like myself using a shared web hosting plan, you do not have full control of which version of PHP the web server is running. The alternative is to explicitly instruct the web server to use PHP5 instead of PHP4 (if available) to process all .php files on your website by including a .htaccess file at the root of your website containing the text: <strong style="font-family: Courier New,Courier,mono;">AddType x-mapp-php5 .php</strong>. Not knowing this myself, I removed the .htaccess file along with the rest of the Joomla files as I was migrating the WordPress files into the root of my website, which broke the WordPress plugin installer. When I restored the .htaccess file to the root of my website, WordPress started working normally again and I was able to get the SexyBookmarks plugin reinstalled.</p>
<p>In case you need to recreate the .htaccess file, just open a text editor and save the file as &#8220;.htaccess&#8221; without an extension. If your operating system gives it an extension anyway, just rename the file and remove the extension.</p>
<p>Here&#8217;s an excellent <a href="http://faq.1and1.com/scripting_languages_supported/php/php5_upgrade/4.html">explanation from 1and1</a> (the shared web hosting provider that I use) on why this .htaccess file is necessary.</p>
]]></content:encoded>
			<wfw:commentRss>http://glassocean.net/moving-your-wordpress-installation-don%e2%80%99t-forget-the-htaccess-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
