<?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"
	>

<channel>
	<title>Chocolate2Code.com &#187; How Tos</title>
	<atom:link href="http://chocolate2code.com/category/wordpress/wordpress-tutorials-2/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://chocolate2code.com</link>
	<description>sweet deals on blogs and websites</description>
	<pubDate>Wed, 11 Aug 2010 15:00:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Surprise! Advanced Editing Toolbar in WYSIWYG Editor</title>
		<link>http://chocolate2code.com/wordpress/wordpress-wysiwyg-editor-more-buttons/</link>
		<comments>http://chocolate2code.com/wordpress/wordpress-wysiwyg-editor-more-buttons/#comments</comments>
		<pubDate>Sun, 01 Jul 2007 06:34:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[How Tos]]></category>

		<category><![CDATA[Plugins]]></category>

		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://chocolate2code.com/wordpress/wordpress-wysiwyg-editor-more-buttons/</guid>
		<description><![CDATA[Who would have thought&#8230;.I&#8217;ve been grumping about the lack of buttons in TinyMCE, the &#8220;visual editor&#8221; or WYSIWYG editor in Wordpress, and come to find out, all this time there is so much more! 
I went hunting for a plugin I&#8217;d seen that allowed custom buttons, and discovered that the standard installation of WordPress actually [...]]]></description>
			<content:encoded><![CDATA[<p>Who would have thought&#8230;.I&#8217;ve been grumping about the lack of buttons in TinyMCE, the &#8220;visual editor&#8221; or WYSIWYG editor in Wordpress, and come to find out, all this time there is so much more! </p>
<p>I went hunting for a plugin I&#8217;d seen that allowed custom buttons, and discovered that the standard installation of WordPress actually has a keyboard command that toggles some extra goodies off and on. Obviously, mine have all been off!</p>
<p>Turns out, you can Show/Hide the Advanced Editor Toolbar in the standard Wordpress installation and unlock a dozen or so extra buttons, including &#8220;Paste as Plain Text&#8221; and &#8220;Paste from Word&#8221;. When the Advanced Editor Toolbar is enabled, there is a toggle button available to turn it off. However, when it is off, you must use Alt-V (IE) or Shift-Alt-V (Firefox) to toggle the advanced buttons back &#8220;on&#8221;.</p>
<p>Adding Buttons is something I haven&#8217;t delved into yet. I need to play with this new toy first. But I learned from the Codex that under &#8220;Rich Editor Filters&#8221; in the Plugin_API/Hooks page, you can see a simple means of adding your own buttons to TinyMCE in WordPress.</p>
<p>http://codex.wordpress.org/Plugin_API/Filter_Reference#Rich_Text_Editor_Filters</p>
<p><strong>Advanced Editing Plugins</strong></p>
<p>If the Advanced Editing Toolbar buttons are not sufficient, perhaps you&#8217;re looking for a plugin to extend the functionality of the TinyMCE editor, or to add custom code snippets. Here are two you can try:</p>
<p><a href="http://www.deliciousdays.com/tinymcebuttons">Custom TinyMCE Buttons</a> (for WordPress 2.1)</p>
<p><a href="http://www.mkbergman.com/?p=384">Advanced TinyMCE Editor</a> (for Wordpress 2.2)</p>
<p>It was the former that I recalled having seen, which started me on this quest, and the latter which I discovered in the process, and informed me of the advanced toggle option. Surprised that I had never heard of it in two years of hanging out on the WordPress forums, I personally added the information to the Codex. I also added links to these two amazing plugins, which I&#8217;m sure will come in handy for others.</p>
]]></content:encoded>
			<wfw:commentRss>http://chocolate2code.com/wordpress/wordpress-wysiwyg-editor-more-buttons/feed/</wfw:commentRss>
		</item>
		<item>
		<title>wp_link_pages nesting LI tags</title>
		<link>http://chocolate2code.com/wordpress/wp_link_pages-nesting-li-tags/</link>
		<comments>http://chocolate2code.com/wordpress/wp_link_pages-nesting-li-tags/#comments</comments>
		<pubDate>Mon, 25 Jun 2007 00:37:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[How Tos]]></category>

		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://chocolate2code.com/wordpress/wp_link_pages-nesting-li-tags/</guid>
		<description><![CDATA[If you&#8217;ve tried to use wp_link_pages outside your sidebar (for example, at the end of your Page content, to list child Pages), you&#8217;ve probably noticed that it creates it&#8217;s own set of LI tags before the title&#8230;.which is non-standard code for a standalone list. 
This manifests itself in an unexpected (and probably unwanted) bullet before [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve tried to use wp_link_pages outside your sidebar (for example, at the end of your Page content, to list child Pages), you&#8217;ve probably noticed that it creates it&#8217;s own set of LI tags before the title&#8230;.which is non-standard code for a standalone list. </p>
<p>This manifests itself in an unexpected (and probably unwanted) <strong>bullet</strong> before your list title (or a lone bullet alongside your first Page link, if you used the <code>title_li=0</code> argument), and often by making the &#8220;bullet&#8221; for all subsequent Page links appear as something other than a bullet (in mine, it looks like this: >> ) <em>because it&#8217;s reading them as sub-nested list items.</em> What a mess! </p>
<p>Maybe this is convenient if you only use wp_list_pages inside of an existing ordered or unordered list, but I generally don&#8217;t&#8230;.so I have been fighting this strange bullet problem for quite some time.</p>
<p>It may be possible for you to style away this problem by adding CSS classes for .pagenav and .page_item, but if that&#8217;s not working for you, then you might want to edit the function itself. Editing the core of WordPress isn&#8217;t generally recommended, but sometimes it becomes necessary.</p>
<p>Here are instructions for WordPress 2.1.3. Other versions are probably similar. <strong>Don&#8217;t forget to make a back up before you do this!!!</strong></p>
<p>You&#8217;ll be changing this file:</p>
<p>/wp-includes/post_functions.php.</p>
<p>Locate &#8220;function wp_list_pages&#8221; (line 265 in my 2.1.3)</p>
<p>Look for the &#8220;if&#8221; statement and remove the opening and closing LI tags in the two lines that begin with <strong><code>?output=</code></strong> (one of them includes class=pagenav), so it reads as follows:</p>
<p><code><br />
if ( !empty($pages) ) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if ( $r[&#039;title_li&#039;] )<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$output .= &#039;&#039; . $r[&#039;title_li&#039;] . &#039;&lt;ul&gt;&#039;;<br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;global $wp_query;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if ( is_page() )<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$current_page = $wp_query-&gt;get_queried_object_id();<br />
&nbsp;&nbsp;&nbsp;&nbsp;$output .= walk_page_tree($pages, $r[&#039;depth&#039;], $current_page, $r);<br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if ( $r[&#039;title_li&#039;] )<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$output .= &#039;&lt;/ul&gt;&#039;;<br />
&nbsp;&nbsp;}<br />
</code></p>
<p>When looking at the whole function, you&#8217;ll see you can also remove the page_item class for the inner nested LIs if you want, but you can also just not define that class in CSS and it won&#8217;t do anything.</p>
]]></content:encoded>
			<wfw:commentRss>http://chocolate2code.com/wordpress/wp_link_pages-nesting-li-tags/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cimy User Extra Fields: How to display field values outside the Loop</title>
		<link>http://chocolate2code.com/wordpress/cimy-user-extra-fields-display-field-values-outside-loop/</link>
		<comments>http://chocolate2code.com/wordpress/cimy-user-extra-fields-display-field-values-outside-loop/#comments</comments>
		<pubDate>Mon, 18 Jun 2007 03:11:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[How Tos]]></category>

		<category><![CDATA[Plugins]]></category>

		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://chocolate2code.com/misc/cimy-user-extra-fields-display-field-values-outside-loop/</guid>
		<description><![CDATA[I just started using Cimy User Extra Fields on a site I&#8217;m working on, and it has some really fantastic features if you want to add information to your registration form, and your author bio or profile pages.
The one thing I have struggled with is getting the contents of a field to appear outside the [...]]]></description>
			<content:encoded><![CDATA[<p>I just started using <a href="http://www.cimatti.it/blog/2007/02/12/cimy-user-extra-fields-for-wordpress-21" title="Cimy User Extra Fields">Cimy User Extra Fields</a> on a site I&#8217;m working on, and it has some really fantastic features if you want to add information to your registration form, and your author bio or profile pages.<br />
The one thing I have struggled with is getting the contents of a field to appear outside the Loop. I am using <strong>get_cimyFieldValue</strong>, which is disabled by default (so the first step is to enable it!). The readme explains how to get a field value to display in the Loop, but not outside of it. </p>
<p>The following instructions explain what to do, provided you are working with an <a href="http://codex.wordpress.org/Author_Templates" title="WordPress instructions to create Author Template (author.php)">Author Template</a> file (author.php) per the instructions in the WordPress codex.<span id="more-14"></span><a href="http://codex.wordpress.org/Author_Templates" title="WordPress instructions to create Author Template (author.php)"> </a></p>
<p>Your author.php file should begin looking something like this:</p>
<pre>
&lt;?php get_header(); ?&gt;
&nbsp;&nbsp; &lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot;&gt;
&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!&#45;- This sets the $curauth variable &#45;-&gt;
&lt;?php
if(isset($_GET[&#039;author_name&#039;])) :
$curauth = get_userdatabylogin($author_name);
else :
$curauth = get_userdata(intval($author));
endif;
?&gt;
</pre>
<p>You have called the header, and you&#8217;ve set the <code>$curauth</code> variable. This is EXTREMELY important. Without the <code>$curauth</code> variable, the rest of these instructions will produce nothing.</p>
<p>Now, let&#8217;s say you have used Cimy User Extra Fields to create a field for the user&#8217;s favorite color, named (appropriately) &#8220;FAV_COLOR&#8221;.  You want the author&#8217;s profile to display the author&#8217;s favorite color, which is &#8220;red&#8221;. </p>
<p>Once you have declared the <code>$currauth</code> variable, you can use it to retrieve the author&#8217;s ID, which is what the <strong>get_cimyFieldValue</strong> function needs to call (and display) the author&#8217;s favorite color outside the loop.</p>
<pre>
&lt;?php $value = get_cimyFieldValue($curauth-&gt;ID, &#039;FAV_COLOR&#039;); ?&gt;
&nbsp;
&lt;?php echo $value; ?&gt;
</pre>
<p>Note that <code>$curath-&gt;ID</code> replaces <code>get_the_author_ID</code>, because <code>get_the_author_ID</code> can only be used inside the Loop. </p>
<p>On the other hand, <code>$curauth-&gt;ID</code> can only be used in this example because the <code>$curauth</code> variable has been declared at the beginning of the file, and is now available for use in the rest of the template.</p>
<p>Once again, let me reiterate that you MUST have <strong>a working author.php file</strong> (with the <code>$curauth</code> variable declared at the outset)  in order for this to function correctly.</p>
<p>Many thanks to Marco Cimmino developing <a href="http://www.cimatti.it/blog/2007/02/12/cimy-user-extra-fields-for-wordpress-21" title="Cimy User Extra Fields">Cimy User Extra Fields</a>, and for his prompt and helpful support!!</p>
]]></content:encoded>
			<wfw:commentRss>http://chocolate2code.com/wordpress/cimy-user-extra-fields-display-field-values-outside-loop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Getting Started With WordPress</title>
		<link>http://chocolate2code.com/wordpress/getting-started-with-wordpress/</link>
		<comments>http://chocolate2code.com/wordpress/getting-started-with-wordpress/#comments</comments>
		<pubDate>Wed, 13 Jun 2007 20:45:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[How Tos]]></category>

		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://chocolate2code.com/wordpress-tutorials/getting-started-with-wordpress/</guid>
		<description><![CDATA[How to set up WordPress is something I will leave to the experts at WordPress. But there are a few things I do immediately after setting up WordPress, before I make any posts or even change the theme.

The very first thing I do is go to Users &#8211;&#62; Authors &#38; Users (default tab) and click [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://codex.wordpress.org/Installing_WordPress" title="How to set up WordPress">How to set up WordPress</a> is something I will leave to the experts at WordPress. But there are a few things I do immediately after setting up WordPress, before I make any posts or even change the theme.</p>
<ul>
<li>The very first thing I do is go to <strong>Users</strong> &#8211;&gt; <strong>Authors &amp; Users</strong> (default tab) and click &#8220;edit&#8221; for my new admin profile&#8230;.and CHANGE THE PASSWORD. I will never remember the random one WordPress gives me.  (If you installed WordPress with Fantastico, you chose your own password, so you can skip this step.)</li>
<li>Next, I set privacy settings in <strong>Options</strong> &#8211;&gt; <strong>Privacy</strong>.  If I have a lot of set up to do and don&#8217;t want visitors yet, I will opt for a <strong>private</strong> blog for now. This prevents WordPress from <a href="http://chocolate2code.com/wordpress-tutorials/be-seen-by-search-enginesor-ping-update-services/" title="WordPress Update Services and Your Privacy">pinging Update Services</a> every time I make a test post.</li>
<li>Another important step before you start posting is your Permalinks options (<strong>Options</strong> &#8211;&gt; <strong>Permalinks</strong>). I prefer &#8220;pretty permalinks&#8221; and so do search engines.  They look nicer, are more memorable to users, and can tell the search engines more about the content of your site than a link with ?p=4 in it. Be sure you have a file in your root (top level) WordPress directory (same place as index.php) named .htaccess (it can be completely blank, but it must exist)  which is CHMOD 666, so that <a href="http://chocolate2code.com/wordpress/wordpress-security/" title="Basic security issues in WordPress">WordPress can update the file for you</a>.</li>
<li>If this site will allow comments, I enable the Akismet plugin to prevent comment spam. You&#8217;d be amazed at how fast spammers find new installations of WordPress and start spamming them.</li>
</ul>
<p>Once these preliminary set up steps are completed, I install the theme, start adding plugins and making test posts. The plugins usually lead to theme modifications, so now the real fun begins. <img src='http://chocolate2code.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://chocolate2code.com/wordpress/getting-started-with-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Be Seen By Search Engines&#8230;or Ping Update Services?</title>
		<link>http://chocolate2code.com/wordpress/be-seen-by-search-enginesor-ping-update-services/</link>
		<comments>http://chocolate2code.com/wordpress/be-seen-by-search-enginesor-ping-update-services/#comments</comments>
		<pubDate>Wed, 13 Jun 2007 17:04:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[How Tos]]></category>

		<category><![CDATA[Security]]></category>

		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://chocolate2code.com/misc/be-seen-by-search-enginesor-ping-update-services/</guid>
		<description><![CDATA[During setup in the newer versions of WordPress, you are asked whether you want to let search engines see your blog, or just regular users. This is, IMHO, a very misleading question.
You might indeed want search engines to find your blog &#8212; after you get it set up completely. But not knowing the real meaning [...]]]></description>
			<content:encoded><![CDATA[<p>During setup in the newer versions of WordPress, you are asked whether you want to let search engines see your blog, or just regular users. This is, IMHO, a very misleading question.</p>
<p>You might indeed want search engines to find your blog &#8212; after you get it set up completely. But not knowing the real meaning of this option, you say &#8220;yes&#8221; to search engines, and unbeknownst to you, WordPress is now going to notify Ping-O-Matic every single time you make a post to your blog! Yes, even your test posts and that silly &#8220;Hello World!&#8221; post (if you edit or update it).</p>
<p>Personally, my first assumption would be that the question about search engines would insert or leave out robots.txt tags, create or modify the robots.txt file, or something of that nature &#8212; since the robots.txt file and tags are directly related to search engines, and keeping them out or letting them in.</p>
<p>As a new blogger, or even moreso as someone setting up a content management system, the concept behind Ping-O-Matic (and update services in general) may be completely unknown. And furthermore, it has nothing to do (at least not directly) with search engines.  So asking this question, in this manner, at set up is misleading to say the least.</p>
<p>This question should read &#8220;Do you want to automatically inform Ping-O-Matic of new posts to your blog? (If you choose YES, your site may be indexed immediately, even your test posts. You can change this option later in Options &#8211;&gt; Privacy.)&#8221; since that is exactly what your answer to the question will determine. It should also tell you (or present a link to find out more) about pinging, and the actual results of setting this option to YES.</p>
<p>If you don&#8217;t want your new blog (and any test posts you make) <u>immediately</u> crawled by Yahoo! and other search engines, then say NO to this option during set up, or turn it off as soon as you get into Admin for the first time, before you blog about anything&#8230;or even update (edit) the Hello World! test post.</p>
]]></content:encoded>
			<wfw:commentRss>http://chocolate2code.com/wordpress/be-seen-by-search-enginesor-ping-update-services/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
