<?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>Joey Rivera &#187; WordPress</title>
	<atom:link href="http://www.joeyrivera.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joeyrivera.com</link>
	<description>Blogging about PHP, Actionscript, MySQL, and other interests.</description>
	<lastBuildDate>Fri, 02 Dec 2011 03:55:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Finally gave my blog a much needed face lift!</title>
		<link>http://www.joeyrivera.com/2010/finally-gave-my-blog-a-much-needed-face-lift/</link>
		<comments>http://www.joeyrivera.com/2010/finally-gave-my-blog-a-much-needed-face-lift/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 18:38:47 +0000</pubDate>
		<dc:creator>Joey</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.joeyrivera.com/?p=513</guid>
		<description><![CDATA[So what do you guys think? Does it look better now? It is not finished, I still need to tweak some graphics and colors but overall I&#8217;m very pleased. I started out with a new theme: Arclite by digitalnature. It has many customization options so I haven&#8217;t had to do too much tweaking of the .css files [...]]]></description>
			<content:encoded><![CDATA[<p>So what do you guys think? Does it look better now? It is not finished, I still need to tweak some graphics and colors but overall I&#8217;m very pleased. I started out with a new theme: Arclite by <a href="http://digitalnature.ro/">digitalnature</a>. It has many customization options so I haven&#8217;t had to do too much tweaking of the .css files but there has been some. Since I blog so much about code, I finally stopped being lazy and got a code highlighter. I&#8217;m using: <a href="http://www.deanlee.cn/wordpress/code_highlighter_plugin_for_wordpress/">Dean&#8217;s Code Highlighter by</a> Dean Lee. It&#8217;s very easy to use and supports a range of different code syntax such as PHP and Actionscript. One of the reasons I decided to update my look was because I have been running an older version of WordPress and it was about time to upgrade. I&#8217;m now running 2.9.1 and it looks great. I really like the new admin back office and it is so easy to use and setup.</p>
<p>I also created my first widgets! The &#8216;Interesting Links&#8217; and &#8216;Interesting Images&#8217; on the sidebar are no longer hacks done on the themes sidebar.php file. I learned how to create a plugin in WordPress and make it into a widget. Here is what one of the widgets looks like:</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="coMULTI">/*<br />
Plugin Name: JR-Images<br />
Plugin URI: http://www.joeyrivera.com<br />
Description: Show my images<br />
Version: 0.1<br />
Author: Joey Rivera<br />
Author URI: http://www.joeyrivera.com</p>
<p>&nbsp; Copyright 2010 &nbsp;Joey Rivera &nbsp;(email : joey1.rivera@gmail.com)</p>
<p>&nbsp; &nbsp; This program is free software; you can redistribute it and/or modify<br />
&nbsp; &nbsp; it under the terms of the GNU General Public License, version 2, as <br />
&nbsp; &nbsp; published by the Free Software Foundation.</p>
<p>&nbsp; &nbsp; This program is distributed in the hope that it will be useful,<br />
&nbsp; &nbsp; but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
&nbsp; &nbsp; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &nbsp;See the<br />
&nbsp; &nbsp; GNU General Public License for more details.</p>
<p>&nbsp; &nbsp; You should have received a copy of the GNU General Public License<br />
&nbsp; &nbsp; along with this program; if not, write to the Free Software<br />
&nbsp; &nbsp; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA &nbsp;02110-1301 &nbsp;USA<br />
*/</span><br />
&nbsp;<br />
<span class="kw2">function</span> show_images<span class="br0">&#40;</span><span class="br0">&#41;</span> <br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/global"><span class="kw3">global</span></a> <span class="re0">$wpdb</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$query</span> = <span class="st0">&#8216;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT image_file, image_origin, image_thumbnail<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM wp_images<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ORDER BY image_id DESC<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LIMIT 6&#8242;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$results</span> = <span class="re0">$wpdb</span>-&gt;<span class="me1">get_results</span><span class="br0">&#40;</span><span class="re0">$query</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>!<span class="re0">$results</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&#8216;&lt;li class=&quot;block widget widget_images&quot;&gt;&lt;div class=&quot;box&quot;&gt; &lt;div class=&quot;wrapleft&quot;&gt;&lt;div class=&quot;wrapright&quot;&gt;&lt;div class=&quot;tr&quot;&gt;&lt;div class=&quot;bl&quot;&gt;&lt;div class=&quot;tl&quot;&gt;&lt;div class=&quot;br the-content&quot;&gt;&lt;div class=&quot;titlewrap&quot;&gt;&lt;h4&gt;&lt;span&gt;Interesting Images&lt;/span&gt;&lt;/h4&gt;&lt;/div&gt;&#8217;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&#8216;&lt;ul class=&quot;blank&quot;&gt;&#8217;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">foreach</span><span class="br0">&#40;</span><span class="re0">$results</span> <span class="kw1">as</span> <span class="re0">$row</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&#8216;&lt;li&gt;&lt;a href=&quot;/uploader/sample/&#8217;</span> . <span class="re0">$row</span>-&gt;<span class="me1">image_file</span> . <span class="st0">&#8216;&quot; title=&quot;&#8217;</span> . <span class="re0">$row</span>-&gt;<span class="me1">image_origin</span> . <span class="st0">&#8216;&quot; rel=&quot;lightbox&quot;&gt;&lt;img src=&quot;/uploader/sample/&#8217;</span> . <span class="re0">$row</span>-/&gt;image_thumbnail . <span class="st0">&#8216;&quot; /&gt;&lt;/a&gt;&lt;/li&gt;&#8217;</span>, <span class="st0">&quot;<span class="es0">\n</span>&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&#8216;&lt;/ul&gt;&#8217;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&#8216;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;/div&gt;&lt;/li&gt;&#8217;</span>;<br />
<span class="br0">&#125;</span><br />
&nbsp;<br />
<span class="kw2">function</span> register_images<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; register_sidebar_widget<span class="br0">&#40;</span><span class="st0">&quot;JR-Images&quot;</span>, <span class="st0">&quot;show_images&quot;</span><span class="br0">&#41;</span>; &nbsp; &nbsp; <br />
<span class="br0">&#125;</span><br />
&nbsp;<br />
add_action<span class="br0">&#40;</span><span class="st0">&quot;plugins_loaded&quot;</span>, <span class="st0">&quot;register_images&quot;</span><span class="br0">&#41;</span>;</div>
<p>I had to go back to all my old posts and make updates. If you find any issues anywhere, please let me know so I can fix it asap. I&#8217;ve found instances in code where there should be two &amp;&amp; and instead the code blocks shows &amp;amp;&amp;amp;. I&#8217;m currently trying to figure out why my preview button doesn&#8217;t work, hopefully I&#8217;ll figure that out soon so I can move on to changing some colors around and finally updating my &#8216;About Me&#8217; page. I hope to have some content in that page by the end of this weekend. Other than that, I hope you all enjoy the new look and am looking forward to hearing some feedback!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joeyrivera.com/2010/finally-gave-my-blog-a-much-needed-face-lift/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Joey&#8217;s WordPress Setup</title>
		<link>http://www.joeyrivera.com/2008/joeys-wordpress-setup/</link>
		<comments>http://www.joeyrivera.com/2008/joeys-wordpress-setup/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 16:28:46 +0000</pubDate>
		<dc:creator>Joey</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.joeyrivera.com/blog/?p=58</guid>
		<description><![CDATA[I&#8217;m going to list the changes I&#8217;ve made to WordPress to look and function the way it is today. This will probably change over time, but I feel as if it&#8217;s working pretty well right now. This information is for anyone trying to create something similar and for me to use as reference later if [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to list the changes I&#8217;ve made to WordPress to look and function the way it is today. This will probably change over time, but I feel as if it&#8217;s working pretty well right now. This information is for anyone trying to create something similar and for me to use as reference later if I need to recreate this again.</p>
<p>The theme I&#8217;m using is <a title="Devart Theme Link" href="http://wordpress.org/extend/themes/devart" target="_blank">Devart</a> by <a title="Deniart - Author of Devart" href="http://wordpress.org/extend/themes/profile/deniart" target="_blank">deniart</a>. The few mods I&#8217;ve made to this theme are:</p>
<ul>
<li>Edited the /wp-content/themes/devart/images/author.gif (to show my pic instead of the default apple)</li>
<li>Modified the /wp-content/themes/devart/style.css to change the way &lt;code&gt;, &lt;ul&gt;, &lt;li&gt; look</li>
<li>Modified the style.css to add my twitter logo and link on the top right hand side of the page</li>
<li>Modified the header.php page to add my twitter logo and link to the top right hand side of the page</li>
<li>Had to add &lt;?php wp_footer(); ?&gt; to footer.php to launch stats code</li>
<li>Added img#wpstats{display:none} to style.css to hide the <img src='http://www.joeyrivera.com/blog_new/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  from stats plugin</li>
</ul>
<p>I&#8217;ve also done the following to my setup:</p>
<ul>
<li>Followed these instructions to make my blog be at the root: <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory" target="_blank">http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory</a></li>
<li>Installed the following stats plugin: <a href="http://wordpress.org/extend/plugins/stats/" target="_blank">http://wordpress.org/extend/plugins/stats/</a></li>
<li>Change &#8216;blog roll&#8217; to &#8216;Links of Interest&#8217; (displays all links under links category)</li>
<li>Installed <a href="http://lesterchan.net/wordpress/readme/wp-postviews.html" target="_blank">http://lesterchan.net/wordpress/readme/wp-postviews.html</a> to show how many views each page/post has received. Made the modifications required for this to show and work. Also modified the view_options in db to format the text a bit differently.</li>
<li>Installed the <a title="Google Analytics Plugin for WordPress" href="http://wordpress.org/extend/plugins/google-analytics-for-wordpress/" target="_blank">Google Analytics plugin</a> and created an account with them.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.joeyrivera.com/2008/joeys-wordpress-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rtl.css?</title>
		<link>http://www.joeyrivera.com/2008/rtlcss/</link>
		<comments>http://www.joeyrivera.com/2008/rtlcss/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 19:09:43 +0000</pubDate>
		<dc:creator>Joey</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.joeyrivera.com/blog/?p=39</guid>
		<description><![CDATA[So I&#8217;m still learning to use WordPress and decided to style the default theme a bit. I went to the theme folder and opened up the first CSS file I found which was &#8216;rtl.css&#8217;. I added a background color to the &#60;code&#62; tag, saved the file, and refreshed my page&#8230; nothing. Tried it again and [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m still learning to use WordPress and decided to style the default theme a bit.  I went to the theme folder and opened up the first CSS file I found which was &#8216;rtl.css&#8217;.  I added a background color to the &lt;code&gt; tag, saved the file, and refreshed my page&#8230; nothing. Tried it again and nothing. I went back to the theme folder and noticed a &#8216;style.css&#8217; file. Opened that up, made changes to the &lt;code&gt; tag, saved and reloaded and it worked! So what&#8217;s this &#8216;rtl.css&#8217; file? A quick Google search gave me the following answer:</p>
<blockquote><p>&#8220;rtl.css is called when you are using a language localization that reads from right to left (e.g., Arabic or Hebrew).&#8221; &#8211; <a title="what is rtl.css" href="http://wordpress.org/support/topic/136250">source</a></p></blockquote>
<p>Well now I know and so do you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joeyrivera.com/2008/rtlcss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up my WordPress</title>
		<link>http://www.joeyrivera.com/2008/setting-up-my-wordpress/</link>
		<comments>http://www.joeyrivera.com/2008/setting-up-my-wordpress/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 19:02:13 +0000</pubDate>
		<dc:creator>Joey</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.joeyrivera.com/blog/?p=23</guid>
		<description><![CDATA[So I&#8217;m using WordPress for the first time and I&#8217;m quickly learning that it&#8217;s neat and fun to play around with.  The documentation seems good and the code easy to work with.  I&#8217;m going to be tracking all the changes I make to the default installation of version 2.6.3 for reference.  I may need this [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m using <a title="WordPress site" href="http://www.wordpress.org">WordPress</a> for the first time and I&#8217;m quickly learning that it&#8217;s neat and fun to play around with.  The documentation seems good and the code easy to work with.  I&#8217;m going to be tracking all the changes I make to the default installation of version 2.6.3 for reference.  I may need this information later or someone else might find helpful.</p>
<p>So far I am using the default theme.  I&#8217;m sure I&#8217;ll eventually change it but for now I&#8217;m just trying to understand how things are structured and how to tweak elements on screen.  The <a title="List of functions for WordPress" href="http://codex.wordpress.org/Function_Reference">WordPress Function Reference</a> page was a great place to start.  My first goal was to figure out how to get my sidebar to display a list of projects and topics.  In the admin, I created a root level category called &#8216;Topics&#8217; and another one called &#8216;Projects&#8217;.  Then I created a few other categories that were under either topics or projects such as &#8216;Flash&#8217;, &#8216;Cars&#8217;, &#8216;PHP&#8217;.</p>
<p><span id="more-23"></span></p>
<p>I was trying to make my side bar look something like this:</p>
<div>Topics</div>
<ul>
<li>Flash</li>
<li>PHP</li>
<li>General</li>
</ul>
<div>Projects</div>
<ul>
<li>QAlias</li>
<li>Car</li>
</ul>
<p>Unfortunately, once I reloaded my page I didn&#8217;t get these results.  Instead, I had a root level element titled &#8216;Categories&#8217; and the links under it were my sub topics.  After talking to <a title="moses' website" href="http://www.mospired.com/">Moses</a>, he explained the concept of widgets and I guess currently the default theme is using a categories widget that isn&#8217;t doing what I need it to do.  So, I went back to the admin, clicked on &#8216;Design&#8217;, finally on &#8216;Widgets&#8217;.  On the right side of the page, it showed I was using a &#8216;Categories&#8217; widget so I removed it since I didn&#8217;t see any options to modify it from here to do what I wanted.  I think this would be the right time to mention I like coding so I (depending on time constraints and the project) rather figure things out myself than to ask and/or find a guide online.   it makes things more fun &#8211; ok, back to the topic.</p>
<p>After removing the &#8216;Category&#8217; widget I had to modify the &#8216;sidebar.php&#8217; file located at &#8216;wordpress root/wp-content/themes/default/&#8217; to add my &#8216;Topics&#8217; and &#8216;Projects&#8217; lists.  I opened the file and looked over it to see what it&#8217;s doing.  It&#8217;s pretty much just one big &lt;ul&gt; with a bunch of checks to see what needs to be displayed.  I went to the bottom of the file to add my two new &lt;li&gt;&#8217;s in there.  Using the functions reference list, I found a function called &#8216;<a title="list categories function" href="http://codex.wordpress.org/Template_Tags/wp_list_categories">wp_list_categories</a>&#8216;.  By using the &#8216;child_of&#8217; parameter, I was able to get a list of all the sub topics for a particular topic.  My code looked something like this:</p>
<p><code>&lt;!-- topic --&gt;<br />
&lt;li&gt;<br />
&lt;h2&gt;Topics&lt;/h2&gt;<br />
&lt;ul&gt;&lt;?php wp_list_categories('orderby=name&amp;show_count=1&amp;use_desc_for_title=0&amp;child_of=1&amp;title_li='); ?&gt;<br />
&lt;/ul&gt;<br />
&lt;/li&gt;<br />
&lt;!-- project --&gt;<br />
&lt;li&gt;<br />
&lt;h2&gt;Projects&lt;/h2&gt;<br />
&lt;ul&gt;<br />
&lt;?php wp_list_categories('orderby=name&amp;show_count=1&amp;use_desc_for_title=0&amp;child_of=2&amp;title_li='); ?&gt;<br />
&lt;/ul&gt;<br />
&lt;/li&gt;</code> <br />
To get the id value for the &#8216;child_of&#8217; parameter, I just went to the admin and clicked on &#8216;Manage&#8217; and &#8216;Categories&#8217;.  Then you can move the mouse over the categories and in the status bar of your browser see if the cat_id for each category.  After a bit of researched, I found out that if you pass &#8216;title_li=&#8217; with no value, the function won&#8217;t return a &#8216;Category&#8217; title attached to the list of sub topics.  Before this, the list returned by the &#8216;wp_list_categories&#8217; function was &#8216;Categories-&gt;Flash/PHP/Other&#8217;.  With &#8216;title_li=&#8217; the return value is just the sub topics &#8216;Flash/PHP/Other&#8217;.</p>
<p>After hitting reload on my browser, my sidebar was displaying correctly but something was bothering me.  I was hard coding the title of the categories and I didn&#8217;t like that.  As you can see the code above, the &lt;h2&gt;&#8217;s have the names of the categories hard coded.  This to me is a big no no so I did some browsing around the list of functions in WordPress and found &#8216;get_cat_name(id)&#8217;.  Now I&#8217;m using this function and passing the correct id&#8217;s and I&#8217;m feeling better about the end result.  Final code is:</p>
<p><code>&lt;!-- topic --&gt;<br />
&lt;li&gt;<br />
&lt;h2&gt;&lt;?php print get_cat_name(1); ?&gt;&lt;/h2&gt;<br />
&lt;ul&gt;<br />
&lt;?php wp_list_categories('orderby=name&amp;show_count=1&amp;use_desc_for_title=0&amp;child_of=1&amp;title_li='); ?&gt;<br />
&lt;/ul&gt;<br />
&lt;/li&gt;<br />
&lt;!-- project --&gt;<br />
&lt;li&gt;<br />
&lt;h2&gt;&lt;?php print get_cat_name(2); ?&gt;&lt;/h2&gt;<br />
&lt;ul&gt;<br />
&lt;?php wp_list_categories('orderby=name&amp;show_count=1&amp;use_desc_for_title=0&amp;child_of=2&amp;title_li='); ?&gt;<br />
&lt;/ul&gt;<br />
&lt;/li&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joeyrivera.com/2008/setting-up-my-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

