<?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>divPress</title>
	<atom:link href="http://divpress.com/feed" rel="self" type="application/rss+xml" />
	<link>http://divpress.com</link>
	<description>A Fresh look at Wordpress</description>
	<lastBuildDate>Sat, 26 Mar 2011 17:58: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>How to check if a post has the Excerpt field filled manually</title>
		<link>http://divpress.com/mods/check-if-post-has-excerpt-filled-manually.htm</link>
		<comments>http://divpress.com/mods/check-if-post-has-excerpt-filled-manually.htm#comments</comments>
		<pubDate>Wed, 23 Mar 2011 11:00:15 +0000</pubDate>
		<dc:creator>thinkdj</dc:creator>
				<category><![CDATA[Mods]]></category>

		<guid isPermaLink="false">http://divpress.com/?p=94</guid>
		<description><![CDATA[<p>A function to check if the excerpt was automatically generated by wordpress or manually entered in the Excerpt field</p>
]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wide wp-image-95" title="the excerpt" src="http://divpress.com/wp-content/uploads/2011/03/the-excerpt.png" alt="" width="605" height="261" /><br />
<br />
the_excerpt( ) displays the content filled in the Excerpt field (if filled manually) or else it will display an automatic excerpt which refers to the first 55 words of the post&#8217;s content.</p>
<p>To check if the Excerpt was manually filled, wordpress has a function called has_excerpt( ). So, if you dont like WP&#8217;s auto-excerpt, you can write a few lines of code like:</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> has_excerpt<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://divpress.com/mods/check-if-post-has-excerpt-filled-manually.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make URLs within posts clickable</title>
		<link>http://divpress.com/mods/make-urls-within-posts-clickable.htm</link>
		<comments>http://divpress.com/mods/make-urls-within-posts-clickable.htm#comments</comments>
		<pubDate>Wed, 23 Mar 2011 10:48:50 +0000</pubDate>
		<dc:creator>thinkdj</dc:creator>
				<category><![CDATA[Mods]]></category>

		<guid isPermaLink="false">http://divpress.com/?p=90</guid>
		<description><![CDATA[<p>Automatically make unlinked URLs within wordpress posts clickable.</p>
]]></description>
			<content:encoded><![CDATA[<p>Did you know that WordPress has a function &#8216;make_clickable&#8217; which converts plain text URLs to HTML links? It <strong>converts URI, www, ftp, and email addresses to clickable hyperlinks</strong> and also helps by fixing links within links. </p>
<p>To make use of this function in the most effective manner, edit your theme&#8217;s  functions.php file and add the following line:</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'make_clickable'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>The above code will automatically make all links clickable in your post content. If you want the returned content to be used some place else,</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$theContent</span> <span style="color: #339933;">=</span> make_clickable<span style="color: #009900;">&#40;</span>get_the_content<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">// Then, echo it wherever you wish to display the content</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$theContent</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Source: <a href="http://codex.wordpress.org/Function_Reference/make_clickable" target="wp">Codex</a></p>
]]></content:encoded>
			<wfw:commentRss>http://divpress.com/mods/make-urls-within-posts-clickable.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to remove the WordPress Admin Bar</title>
		<link>http://divpress.com/mods/how-to-remove-the-wordpress-admin-bar.htm</link>
		<comments>http://divpress.com/mods/how-to-remove-the-wordpress-admin-bar.htm#comments</comments>
		<pubDate>Wed, 23 Mar 2011 08:55:15 +0000</pubDate>
		<dc:creator>thinkdj</dc:creator>
				<category><![CDATA[Mods]]></category>

		<guid isPermaLink="false">http://divpress.com/?p=79</guid>
		<description><![CDATA[<p>Remove or disable the Wordpress Admin Bar for Admins, Subscribers and Contributors easily.</p>
]]></description>
			<content:encoded><![CDATA[<p>WordPress 3.1 came out with a couple of new features, with the inclusion of an &#8220;Admin Bar&#8221; being the most visible of them all. If you are unhappy with the bar and want to take it off your blog, here are a few ways:</p>
<h3>Method 1: From the good ol&#8217; options page</h3>
<p><img class="alignnone wide size-full wp-image-80" title="disable wp 3.1 admin bar - per user" src="http://divpress.com/wp-content/uploads/2011/03/disable-wp-3.1-admin-bar-per-user.png" alt="" width="605" height="229" /><br />
Goto Users &gt; Your Profile  and uncheck &#8220;Show Admin Bar&#8221; from the options. However, this is a per-user option and wont be feasible if you want to disable the bar for a multi-user blog.</p>
<h3>Method 2: Edit your theme&#8217;s functions.php file</h3>
<p>Add the following lines of code to disable the Admin Bar globally</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">remove_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_admin_bar_init'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Also, to disable &#8220;Show Admin Bar&#8221; option for all your users, you can add the following line too:</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">remove_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'personal_options'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'_admin_bar_preferences'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<h3>Method 3: Using plugins</h3>
<p>If you do not have permissions to edit your theme files, you can go with installing plugins. With the release of WP 3.1,</p>
<p><strong><a href="http://wordpress.org/extend/plugins/global-admin-bar-hide-or-remove/" target="wpplug">Global Hide/Remove Admin Bar Plugin</a> </strong>– Add a global option in  Settings Menu to hide/remove the new Admin bar in WP 3.1 and above.</p>
<p><strong><a href="http://wordpress.org/extend/plugins/wp-admin-bar-removal/" target="wpplug">Admin Bar Removal (completely disable) 3.1 only</a> </strong>–  Completely disables Frontend and Backend Menu that now appears on the   WordPress 3.1 based blogs, plus helps to remove code and get more free   memory.</p>
<p><strong><a href="http://wordpress.org/extend/plugins/admin-bar-disabler/" target="wpplug">Admin Bar Disabler</a> </strong>– Disable the WP Admin Bar in 3.1+ completely, or only for roles and capabilities which aren’t in the ‘whitelist’/‘blacklist’. This plugin can help you<strong> disable admin bar for subscribers</strong> on your blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://divpress.com/mods/how-to-remove-the-wordpress-admin-bar.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix &#8220;Is its parent directory writable by the server?&#8221; error for WordPress Image uploads</title>
		<link>http://divpress.com/mods/fix-parent-directory-unwritable-error-wp-image-uploads.htm</link>
		<comments>http://divpress.com/mods/fix-parent-directory-unwritable-error-wp-image-uploads.htm#comments</comments>
		<pubDate>Wed, 23 Mar 2011 08:37:47 +0000</pubDate>
		<dc:creator>thinkdj</dc:creator>
				<category><![CDATA[Mods]]></category>

		<guid isPermaLink="false">http://divpress.com/?p=72</guid>
		<description><![CDATA[<p>Fix wordpress' "Unable to create directory" media upload error without having to CHMOD the uploads directory.</p>
]]></description>
			<content:encoded><![CDATA[<p>You might encounter an error saying something like:</p>
<p>&#8220;Unable to create directory  /nfs/05/username/wp-content/uploads/2011/03. Is its  parent directory writable by the server?&#8221;</p>
<p>Naturally, the first thing we&#8217;d try to do is change the /uploads/ directory permissions to 777. Here&#8217;s a way to <strong>fix the error without having to CHMOD</strong> directories.</p>
<p><img class="alignnone size-full wp-image-74 wide" title="fix wp is your parent directory writable error when uploading images" src="http://divpress.com/wp-content/uploads/2011/03/fix-wp-is-your-parent-directory-writable-error-when-uploading-images.png" alt="" width="605" height="147" /></p>
<p>Goto Settings &gt; Media from your WP Dashboard and change&#8221; to &#8220;wp-content/uploads&#8221;<br />
PS: <strong>NOT </strong>&#8220;/wp-content/uploads&#8221; or &#8220;/nfs/05/username/wp-content/uploads/&#8221;</p>
<p>Please note that there is NO forward slash before wp-content/uploads. Hope this solves the media upload problem. Else, try CHMOD&#8217;in the uploads/ directory to 777.</p>
<p>Source: TRLocke&#8217;s suggestion found at <a href="http://wordpress.org/support/topic/error-is-its-parent-directory-writable-by-the-server-uploading-images">WP Forum</a></p>
]]></content:encoded>
			<wfw:commentRss>http://divpress.com/mods/fix-parent-directory-unwritable-error-wp-image-uploads.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Displaying a random blogroll link</title>
		<link>http://divpress.com/mods/displaying-a-random-blogroll-link.htm</link>
		<comments>http://divpress.com/mods/displaying-a-random-blogroll-link.htm#comments</comments>
		<pubDate>Tue, 08 Feb 2011 10:21:09 +0000</pubDate>
		<dc:creator>thinkdj</dc:creator>
				<category><![CDATA[Mods]]></category>
		<category><![CDATA[Blogroll]]></category>

		<guid isPermaLink="false">http://divpress.com/?p=8</guid>
		<description><![CDATA[<p>A function to fetch and display a random blogroll link in your Wordpress Theme.</p>
]]></description>
			<content:encoded><![CDATA[<p>We are going to make a simple function in WordPress to fetch a random blogroll from the WP database and display it as a link. </p>
<p>Place the following lines of code in your theme&#8217;s <em>function.php</em> file.</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> random_blogroll<span style="color: #009900;">&#40;</span><span style="color: #000088;">$number</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT link_url, link_name, link_description FROM <span style="color: #006699; font-weight: bold;">$wpdb-&gt;links</span> WHERE link_visible = 'Y' ORDER BY rand() LIMIT &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$number</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$results</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$results</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$link_url</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link_url</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$link_name</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link_name</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$link_description</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link_description</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$retsrting</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$link_url</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; rel=&quot;external&quot; title=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$link_name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$link_name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/a&gt; '</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$retsrting</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>To display the random link in your blog, place the following code where you want the link(s) to appear:</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/function_exists"><span style="color: #990000;">function_exists</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'random_blogroll'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> random_blogroll<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>To display &#8216;x&#8217; number of links, pass the number as a parameter to the function</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">//Example - To display 4 Blogroll links<br />
<span style="color: #000000; font-weight: bold;">&lt;?</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/function_exists"><span style="color: #990000;">function_exists</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'random_blogroll'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> random_blogroll<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://divpress.com/mods/displaying-a-random-blogroll-link.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove &#8220;View all posts filed under&#8221; from wp_list_categories Title attribute</title>
		<link>http://divpress.com/mods/remove-view-all-posts-filed-under-from-wp_list_categories.htm</link>
		<comments>http://divpress.com/mods/remove-view-all-posts-filed-under-from-wp_list_categories.htm#comments</comments>
		<pubDate>Sun, 18 Apr 2010 03:17:27 +0000</pubDate>
		<dc:creator>thinkdj</dc:creator>
				<category><![CDATA[Mods]]></category>
		<category><![CDATA[wp_list_categories]]></category>

		<guid isPermaLink="false">http://divpress.com/?p=29</guid>
		<description><![CDATA[<p>Remove the menacing "title" attribute from all elements under the wp_list_categories() function.</p>
]]></description>
			<content:encoded><![CDATA[<p>WordPress automatically includes the Title attribute for each element in the wp_list_categories() function. It looks pretty bad when it you&#8217;re implementing the category list in a place like the top navigation menu.</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">wp_list_categories<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Here is a way to take off the &#8220;Title&#8221; attribute from wp_list_categories(). wp_list_categories has a parameter echo [like many other wp functions], which when set to 0 does not echo the code onto the screen.  This way, we can get the whole string onto a php variable.</p>
<p>To change Title attribute to &#8220;Category Name&#8221; instead of &#8220;View all posts filed under Category Name&#8221; :</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$categoriesVar</span> <span style="color: #339933;">=</span> wp_list_categories<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;echo=0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$categoriesVar</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;View all posts filed under &quot;</span> <span style="color: #339933;">,</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">,</span> <span style="color: #000088;">$categoriesVar</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$categoriesVar</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>To completely remove the title attribute:</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$categoriesVar</span> <span style="color: #339933;">=</span> wp_list_categories<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;echo=0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$categoriesVar</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/preg_replace"><span style="color: #990000;">preg_replace</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'/title=\&quot;(.*?)\&quot;/'</span> <span style="color: #339933;">,</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">,</span> <span style="color: #000088;">$categoriesVar</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$categoriesVar</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>The same code can also be written in a single statement:</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">echo</span> <a href="http://www.php.net/preg_replace"><span style="color: #990000;">preg_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/title=\&quot;(.*?)\&quot;/'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span>wp_list_categories<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;echo=0&amp;amp;title_li=&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">/* Strips off Title attribute from wp_list_categories */</span></div></td></tr></tbody></table></div>
<h3>Update: Feb 08, 2010</h3>
<p>WordPress checks for the category description before it defaults the title to &#8220;View all posts filed under &#8220;. <strong>So, you could just add a single whitespace as the description of categories to not show anything in the title.</strong><br />
- Thanks to <a href="http://divpress.com/mods/remove-view-all-posts-filed-under-from-wp_list_categories.htm#comment-141891021">Justice Chad</a> for this.</p>
]]></content:encoded>
			<wfw:commentRss>http://divpress.com/mods/remove-view-all-posts-filed-under-from-wp_list_categories.htm/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding lightbox overlay to default WP gallery</title>
		<link>http://divpress.com/mods/add-rel-lightbox-to-wp-gallery.htm</link>
		<comments>http://divpress.com/mods/add-rel-lightbox-to-wp-gallery.htm#comments</comments>
		<pubDate>Mon, 14 Dec 2009 19:36:45 +0000</pubDate>
		<dc:creator>thinkdj</dc:creator>
				<category><![CDATA[Mods]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[overlay]]></category>

		<guid isPermaLink="false">http://divpress.com/?p=3</guid>
		<description><![CDATA[<p>How to change the "rel" attribute of Wordpress' default gallery. Unfortunately, WP doesnt allow you to change it the easy way.</p>
]]></description>
			<content:encoded><![CDATA[<p>Sure, WP has a great inbuilt gallery feature.  Unfortunately it does not allow you to change the &#8216;rel&#8217; attribute for links. It&#8217;s odd that wp doesn&#8217;t already provide an option to change the rel attribute for the hyperlinks that link directly to the image attachments. Here is a simple code hack to make your WP gallery images open up in an overlay screen like lightbox or any other js modal window.</p>
<h3>Change &#8216;rel&#8217; attribute of WP default gallery</h3>
<p>You will have to edit <strong>post-template.php</strong> in the <strong>wp-includes</strong> directory. Find the following line of code (WP 2.8 has it in line#946)</p>
<div class="codecolorer-container php mac-classic codecolorer-noborder" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>946<br />947<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">return</span> apply_filters<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_get_attachment_link'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&lt;a title=&quot;</span><span style="color: #000088;">$post_title</span><span style="color: #0000ff;">&quot; href=&quot;</span><span style="color: #000088;">$url</span><span style="color: #0000ff;">&quot;&gt;<span style="color: #006699; font-weight: bold;">$link_text</span>&lt;/a&gt;&quot;</span><span style="color: #339933;">,</span><br />
<span style="color: #000088;">$id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span><span style="color: #339933;">,</span> <span style="color: #000088;">$permalink</span><span style="color: #339933;">,</span> <span style="color: #000088;">$icon</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Change the above line of code with</p>
<div class="codecolorer-container php mac-classic codecolorer-noborder" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>946<br />947<br />948<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">return</span> apply_filters<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_get_attachment_link'</span><span style="color: #339933;">,</span><br />
<span style="color: #0000ff;">&quot;&lt;a title=&quot;</span><span style="color: #000088;">$post_title</span><span style="color: #0000ff;">&quot; rel=&quot;</span>shadowbox<span style="color: #009900;">&#91;</span>media<span style="color: #009900;">&#93;</span><span style="color: #0000ff;">&quot; href=&quot;</span><span style="color: #000088;">$url</span><span style="color: #0000ff;">&quot;&gt;<span style="color: #006699; font-weight: bold;">$link_text</span>&lt;/a&gt;&quot;</span><span style="color: #339933;">,</span><br />
<span style="color: #000088;">$id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span><span style="color: #339933;">,</span> <span style="color: #000088;">$permalink</span><span style="color: #339933;">,</span> <span style="color: #000088;">$icon</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>That&#8217;s it. Now all your image attachments would open up in a lightbox. [PS: The code above will be found in a single line in post-template.php. It has been broken down into multiple lines for easy readability.]</p>
]]></content:encoded>
			<wfw:commentRss>http://divpress.com/mods/add-rel-lightbox-to-wp-gallery.htm/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

