<?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>Dagon Design &#187; WordPress Hacks and Info</title>
	<atom:link href="http://www.dagondesign.com/topics/wp-mods-and-info/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dagondesign.com</link>
	<description>WordPress Plugins, PHP Scripts, Tools, and Tutorials</description>
	<lastBuildDate>Tue, 23 Feb 2010 22:49:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Show the Intro to Password Protected Posts in WordPress</title>
		<link>http://www.dagondesign.com/articles/show-the-intro-to-password-protected-posts-in-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/show-the-intro-to-password-protected-posts-in-wordpress/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 01:11:06 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[WordPress Hacks and Info]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/show-the-intro-to-password-protected-posts-in-wordpress/</guid>
		<description><![CDATA[This is a small hack for WordPress that allows you to show the first part of password protected posts. It will display the content you have before the &#8216;more&#8217; tag, followed by the standard password box. I wrote this up for a member of the WordPress forum, and I thought I would share it here. [...]]]></description>
			<content:encoded><![CDATA[<p>This is a small hack for WordPress that allows you to show the first part of password protected posts. It will display the content you have before the &#8216;more&#8217; tag, followed by the standard password box. I wrote this up for a member of the WordPress forum, and I thought I would share it here. Update: Instructions are now provided for WordPress 2.2<span id="more-68"></span></p>
<h3>Before you begin</h3>
<p>The instructions below have been verified in WordPress versions 2.0 through 2.8. The only difference between these versions is the file you have to edit.</p>
<h3>Instructions</h3>
<p>For WordPress 2.0 or 2.1, open <strong>/wp-includes/template-functions-post.php</strong></p>
<p>For WordPress 2.2 through 2.8+, open <strong>/wp-includes/post-template.php</strong></p>
<p>Find the following text:</p>
<pre>$output = get_the_password_form();
return $output;</pre>
<p>Replace it with this:</p>
<pre>$content = $pages[$page-1];
$content = explode(&#039;&lt;!&#45;-more&#45;-&gt;&#039;, $content, 2);
$output = &quot;&quot;;
$output .= $content[0];
$output .= get_the_password_form();
return $output;</pre>
<p>This next step is optional, but I think it makes it nicer.</p>
<p>In the <strong>get_the_password_form</strong> function, find the following text (may vary between versions):</p>
<p><code>This post is password protected.</code></p>
<p>And replace it with this:</p>
<p><code>The rest of this post is password protected.</code></p>
<p>Or whatever text you would like it to show.</p>
<p>

	<div style="margin: 10px 0 20px 0; padding: 6px; border: 1px solid #D5D5D5; background: #F3F3F3; color: #777777; font-weight: bold;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif" style="vertical-align: middle; "></a>

	&nbsp; If you have found this page useful, please consider donating. Thanks!

	</div>

	</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/show-the-intro-to-password-protected-posts-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Change Default Thumbnail Size in WordPress</title>
		<link>http://www.dagondesign.com/articles/change-default-thumbnail-size-in-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/change-default-thumbnail-size-in-wordpress/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 01:08:56 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[WordPress Hacks and Info]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/change-default-thumbnail-size-in-wordpress/</guid>
		<description><![CDATA[WordPress 2.5 and later include a built-in option to change the size of thumbnails, but for those of you out there using an older version, it is quiet easy to change. It just requires modification of one WordPress file. When WordPress 2.1 was released, it changed the way this was done, and once again with [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress 2.5 and later include a built-in option to change the size of thumbnails, but for those of you out there using an older version, it is quiet easy to change. It just requires modification of one WordPress file. When WordPress 2.1 was released, it changed the way this was done, and once again with the release of WordPress 2.3, so I have included instructions below for multiple versions. <span id="more-100"></span></p>
<h3>Instructions for:</h3>
<ul>
<li><a href="#20">WordPress 2.0</a></li>
<li><a href="#2122">WordPress 2.1 &#8211; 2.2</a></li>
<li><a href="#23">WordPress 2.3</a></li>
<li><a href="#25">WordPress 2.5 and later</a></li>
</ul>
<p>

	<div style="margin: 10px 0 20px 0; padding: 6px; border: 1px solid #D5D5D5; background: #F3F3F3; color: #777777; font-weight: bold;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif" style="vertical-align: middle; "></a>

	&nbsp; If you have found this page useful, please consider donating. Thanks!

	</div>

	</p>
<hr />
<h3><a name="20">WordPress 2.0</a></h3>
<p>Open <strong>/wp-admin/inline-uploading.php</strong> and look for the following code:</p>
<pre>if ( $imagedata[&#039;width&#039;] &gt; 128 &amp;&amp; 
$imagedata[&#039;width&#039;] &gt;= $imagedata[&#039;height&#039;] * 4 / 3 )
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$thumb = wp_create_thumbnail($file, 128);
&nbsp;&nbsp;&nbsp;&nbsp;elseif ( $imagedata[&#039;height&#039;] &gt; 96 )
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$thumb = wp_create_thumbnail($file, 96);</pre>
<p>The default max size is 128 x 96. You can change these numbers to whatever you like, although you must keep the proper aspect ratio (4 / 3).</p>
<p>For example, to double the size of the thumbnails, replace 128 with 256, and 96 with 192. Be sure to change both sets of numbers &#8211; they are each listed in the code twice.</p>
<hr />
<h3><a name="2122">WordPress 2.1 &#8211; 2.2</a></h3>
<p>Open <strong>/wp-admin/admin-functions.php</strong> and look for the following code:</p>
<pre>$max_side = apply_filters( &#039;wp_thumbnail_max_side_length&#039;, 
128, $attachment_id, $file );</pre>
<p>The number specified here (128 by default) is the maximum size of either dimension. Just change this to whatever you like.</p>
<hr />
<h3><a name="23">WordPress 2.3</a></h3>
<p>Open <strong>/wp-admin/includes/image.php</strong> and look for the following code:</p>
<pre>$max_side = apply_filters( &#039;wp_thumbnail_max_side_length&#039;, 
128, $attachment_id, $file );</pre>
<p>The number specified here (128 by default) is the maximum size of either dimension. Just change this to whatever you like.</p>
<h3><a name="25">WordPress 2.5 and later</a></h3>
<p>Version 2.5 and later have built-in support for the thumbnail size in the options.</p>
<p>

	<div style="margin: 10px 0 20px 0; padding: 6px; border: 1px solid #D5D5D5; background: #F3F3F3; color: #777777; font-weight: bold;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif" style="vertical-align: middle; "></a>

	&nbsp; If you have found this page useful, please consider donating. Thanks!

	</div>

	</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/change-default-thumbnail-size-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>WordPress Search Form without Search Button</title>
		<link>http://www.dagondesign.com/articles/wordpress-search-form-without-search-button/</link>
		<comments>http://www.dagondesign.com/articles/wordpress-search-form-without-search-button/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 18:45:45 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[WordPress Hacks and Info]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/wordpress-search-form-without-search-button/</guid>
		<description><![CDATA[This article explains a method for displaying a WordPress search form without a search button. The user simply enters they text they would like to search for, and hits enter. While this is easy to do with the use of a hidden submit button, this method also allows for the use of a default message [...]]]></description>
			<content:encoded><![CDATA[<p>This article explains a method for displaying a WordPress search form without a search button. The user simply enters they text they would like to search for, and hits enter. While this is easy to do with the use of a hidden submit button, this method also allows for the use of a default message in the search box (such as &#8220;Enter your search&#8221;), which keeps you from having to display a label next to the form explaining what it is for. This default message automatically clears when the user clicks to start typing, and puts itself back if the user clicks away. This allows you to have a search form that looks nice and clean, and is still just as functional.<span id="more-98"></span></p>
<h3>The code</h3>
<p>(extra newlines have been added to the code to make it fit the page properly)</p>
<pre>&lt;?php $search_text = &quot;Search&quot;; ?&gt; 
&lt;form method=&quot;get&quot; id=&quot;searchform&quot;&nbsp;&nbsp;
action=&quot;&lt;?php bloginfo(&#039;home&#039;); ?&gt;/&quot;&gt; 
&lt;input type=&quot;text&quot; value=&quot;&lt;?php echo $search_text; ?&gt;&quot;&nbsp;&nbsp;
name=&quot;s&quot; id=&quot;s&quot;&nbsp;&nbsp;
onblur=&quot;if (this.value == &#039;&#039;)&nbsp;&nbsp;
{this.value = &#039;&lt;?php echo $search_text; ?&gt;&#039;;}&quot;&nbsp;&nbsp;
onfocus=&quot;if (this.value == &#039;&lt;?php echo $search_text; ?&gt;&#039;)&nbsp;&nbsp;
{this.value = &#039;&#039;;}&quot; /&gt; 
&lt;input type=&quot;hidden&quot; id=&quot;searchsubmit&quot; /&gt; 
&lt;/form&gt;</pre>
<h3>Usage</h3>
<p>Most WordPress themes have a file called <strong>searchform.php</strong> which contains the code that generates the search form. All you generally have to do is replace the existing code with the code above. </p>
<p>For themes without the <strong>searchform.php</strong> file, you can place this code directly into your theme files, wherever you would like the search to go. </p>
<h3>Changing the default text</h3>
<p>To change the default text of the form, you just have to configure the <strong>$search_text</strong> variable in the first line of the code.</p>
<h3>Styling the form</h3>
<p>Using CSS, it is easy to adjust your form. For example, if you want to define the exact width of the search field, you could wrap a div around it like this:</p>
<pre>&lt;div class=&quot;search-form&quot;&gt;
(form code goes here)
&lt;/div&gt;</pre>
<p>And then in your CSS file, add the following:</p>
<pre>.search-form input {
&nbsp;&nbsp;width: 150px;
}</pre>
<h3>Example</h3>
<p>You can see an example of this method in the left sidebar of this website.</p>
<p>

	<div style="margin: 10px 0 20px 0; padding: 6px; border: 1px solid #D5D5D5; background: #F3F3F3; color: #777777; font-weight: bold;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif" style="vertical-align: middle; "></a>

	&nbsp; If you have found this page useful, please consider donating. Thanks!

	</div>

	</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/wordpress-search-form-without-search-button/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>Specify the user level needed to skip comment moderation in WordPress</title>
		<link>http://www.dagondesign.com/articles/specify-the-user-level-needed-to-skip-comment-moderation-in-wordpress/</link>
		<comments>http://www.dagondesign.com/articles/specify-the-user-level-needed-to-skip-comment-moderation-in-wordpress/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 01:12:44 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[WordPress Hacks and Info]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/specify-the-user-level-needed-to-skip-comment-moderation-in-wordpress/</guid>
		<description><![CDATA[This simple WordPress hack allows you to specify the minimum user level needed to post comments without moderation. By default, WordPress allows administrators (and the author of the post) to skip moderation checks when posting comments, but it is easy to adjust this so that you can choose the user level yourself. This can be [...]]]></description>
			<content:encoded><![CDATA[<p>This simple WordPress hack allows you to specify the minimum user level needed to post comments without moderation. By default, WordPress allows administrators (and the author of the post) to skip moderation checks when posting comments, but it is easy to adjust this so that you can choose the user level yourself. This can be useful for those of you who have strict comment moderation enabled (manual comment approval), as it allows you to let registered users of your site post immediately without having to wait for approval. <span id="more-96"></span></p>
<h3>Requirements</h3>
<p>This code modification has been verified to work in WordPress versions 2.1 through 2.8+</p>
<h3>Instructions</h3>
<p>Open <strong>wp-includes/comment.php</strong></p>
<p>For <strong>WordPress 2.1 through 2.7.x</strong>, Find the following code:</p>
<pre>if ( $userdata &amp;&amp; ( $user_id == $post_author || $user-&gt;has_cap(&#039;level_9&#039;) 
) ) {
&nbsp;&nbsp;// The author and the admins get respect.
&nbsp;&nbsp;$approved = 1;</pre>
<p>For <strong>WordPress 2.8</strong>, Find the following code:</p>
<pre>if ( isset($userdata) &amp;&amp; ( $user_id == $post_author || $user-&gt;has_cap(&#039;moderate_comments&#039;) ) ) {
&nbsp;&nbsp;// The author and the admins get respect.
&nbsp;&nbsp;$approved = 1;</pre>
<p>Then simply change <strong>level_9</strong> to whatever user level you want. All users at or above the selected level will be able to post comments without requiring manual approval (if you have manual approval enabled).</p>
<p>For a complete list of the user levels, and their roles, please see this page from the WordPress codex: <a href="http://codex.wordpress.org/Roles_and_Capabilities">http://codex.wordpress.org/Roles_and_Capabilities</a></p>
<p>

	<div style="margin: 10px 0 20px 0; padding: 6px; border: 1px solid #D5D5D5; background: #F3F3F3; color: #777777; font-weight: bold;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif" style="vertical-align: middle; "></a>

	&nbsp; If you have found this page useful, please consider donating. Thanks!

	</div>

	</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/specify-the-user-level-needed-to-skip-comment-moderation-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Prevent author impersonation in WordPress comments</title>
		<link>http://www.dagondesign.com/articles/prevent-author-impersonation-in-wordpress-comments/</link>
		<comments>http://www.dagondesign.com/articles/prevent-author-impersonation-in-wordpress-comments/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 01:08:02 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[WordPress Hacks and Info]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/articles/prevent-author-impersonation-in-wordpress-comments/</guid>
		<description><![CDATA[This modification to WordPress prevents unregistered comment authors from using the names or email addresses of the registered authors on your site. It does this by first checking to see if the comment author is logged in. If they are not, it compares their name and email address to the registered author data. If there [...]]]></description>
			<content:encoded><![CDATA[<p>This modification to WordPress prevents unregistered comment authors from using the names or email addresses of the registered authors on your site. It does this by first checking to see if the comment author is logged in. If they are not, it compares their name and email address to the registered author data. If there is a match, the comment is blocked and a custom message is displayed. The name and email address comparison is case-insensitive. <span id="more-110"></span></p>
<h3>Requirements</h3>
<p>This code modification has been tested in WordPress 2.2 through 2.8+</p>
<h3>Instructions</h3>
<p><strong>1)</strong> Open <strong>/wp-comments-post.php</strong> for editing (backup the file first!)</p>
<p><strong>2)</strong> Find the following block of code:</p>
<p><strong>Notice:</strong> In WordPress 2.8, the code has changed a bit, but should be easy to find near the top of the page.</p>
<pre>$comment_author&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = trim(strip_tags($_POST[&#039;author&#039;]));
$comment_author_email = trim($_POST[&#039;email&#039;]);
$comment_author_url&nbsp;&nbsp; = trim($_POST[&#039;url&#039;]);
$comment_content&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= trim($_POST[&#039;comment&#039;]);</pre>
<p><strong>3)</strong> After it, add the following:</p>
<pre>// get list of user (display) names for blog
global $wpdb;
$valid_users = (array)$wpdb-&gt;get_results(&quot;
&nbsp;&nbsp;SELECT display_name, user_email FROM &quot; . $wpdb-&gt;prefix . &quot;users&quot;);

// get ID of logged in user (if there is one)
global $userdata;
get_currentuserinfo();
$logged_in_name = $userdata-&gt;ID;
$logged_in_email = $userdata-&gt;user_email;
&nbsp;
// see if the comment author matches an existing author
$found_match = FALSE;
foreach ($valid_users as $va) {
&nbsp;&nbsp;if (trim($va-&gt;display_name) != &#039;&#039;) {
&nbsp;&nbsp;&nbsp;&nbsp;if (strtolower($va-&gt;display_name) == strtolower($comment_author)) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$found_match = TRUE;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}
&nbsp;&nbsp;if (trim($va-&gt;user_email) != &#039;&#039;) {
&nbsp;&nbsp;&nbsp;&nbsp;if (strtolower($va-&gt;user_email) == strtolower($comment_author_email)) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$found_match = TRUE;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}&nbsp;&nbsp;
}

// if commenter is not logged in, but match was found, block the comment
if (trim($logged_in_name) == &#039;&#039;) {
&nbsp;&nbsp;if ($found_match == TRUE) {
&nbsp;&nbsp;&nbsp;&nbsp;wp_die( __(&#039;You cannot post using the name or email of a registered author.&#039;) );
&nbsp;&nbsp;}
}</pre>
<p><strong>4)</strong> Save and close the file</p>
<h3>Notes</h3>
<p>To test this modification, simply log out and try to post a comment using the name that displays when you regularly post comments (when you are logged in).</p>
<p>If you would like to change the message, just modify this line:</p>
<pre>wp_die( __(&#039;You cannot post using the name or email of a registered author.&#039;) );</pre>
<p>

	<div style="margin: 10px 0 20px 0; padding: 6px; border: 1px solid #D5D5D5; background: #F3F3F3; color: #777777; font-weight: bold;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif" style="vertical-align: middle; "></a>

	&nbsp; If you have found this page useful, please consider donating. Thanks!

	</div>

	</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/prevent-author-impersonation-in-wordpress-comments/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>WordPress Hook for Entire Page Using Output Buffering</title>
		<link>http://www.dagondesign.com/articles/wordpress-hook-for-entire-page-using-output-buffering/</link>
		<comments>http://www.dagondesign.com/articles/wordpress-hook-for-entire-page-using-output-buffering/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 19:52:05 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[WordPress Hacks and Info]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/?p=212</guid>
		<description><![CDATA[The WordPress plugin API provides a large number of action and filter hooks to make plugin creation easier. While the provided hooks cover just about everything you would need for plugin development, it can occasionally be useful to have a hook that can process the entire html output of WordPress. This article describes a method [...]]]></description>
			<content:encoded><![CDATA[<p>The WordPress plugin API provides a large number of action and filter hooks to make plugin creation easier. While the provided hooks cover just about everything you would need for plugin development, it can occasionally be useful to have a hook that can process the entire html output of WordPress. This article describes a method that can be used to create a &#8216;virtual&#8217; hook which allows processing of everything between the end of the header section, and the footer of the theme, using the output buffering feature of PHP.<span id="more-212"></span></p>
<h3>Plugin Code</h3>
<pre>function callback($buffer) {
&nbsp;&nbsp;// modify buffer here, and then return the updated code
&nbsp;&nbsp;return $buffer;
}
&nbsp;
function buffer_start() { ob_start(&quot;callback&quot;); }
&nbsp;
function buffer_end() { ob_end_flush(); }
&nbsp;
add_action(&#039;wp_head&#039;, &#039;buffer_start&#039;);
add_action(&#039;wp_footer&#039;, &#039;buffer_end&#039;);</pre>
<h3>Explanation</h3>
<p>This plugin code registers two actions &#8211; <strong>buffer_start</strong> and <strong>buffer_end</strong>.</p>
<p><strong>buffer_start</strong> is executed at the end of the header section of the html. The parameter, the <strong>callback</strong> function, is called at the end of the output buffering. This occurs at the footer of the page, when the second registered action, <strong>buffer_end</strong>, executes.</p>
<p>The <strong>callback</strong> function is where you add your code to change the value of the output (the <strong>$buffer</strong> variable). Then you simply return the modified code and the page will be displayed.</p>
<h3>Notes</h3>
<p>Be sure to use unique function names for <strong>buffer_start</strong>, <strong>buffer_end</strong>, and <strong>callback</strong>, so they do not conflict with other functions you may have in plugins.</p>
<p>For more information on output buffering in PHP, visit the PHP page for the <a href="http://us3.php.net/ob_start">ob_start() function</a>.</p>
<p>

	<div style="margin: 10px 0 20px 0; padding: 6px; border: 1px solid #D5D5D5; background: #F3F3F3; color: #777777; font-weight: bold;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif" style="vertical-align: middle; "></a>

	&nbsp; If you have found this page useful, please consider donating. Thanks!

	</div>

	</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/wordpress-hook-for-entire-page-using-output-buffering/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>WordPress 2.3+ Database Structure for Categories</title>
		<link>http://www.dagondesign.com/articles/wordpress-23-database-structure-for-categories/</link>
		<comments>http://www.dagondesign.com/articles/wordpress-23-database-structure-for-categories/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 22:10:05 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[WordPress Hacks and Info]]></category>

		<guid isPermaLink="false">http://www.dagondesign.com/?p=190</guid>
		<description><![CDATA[With the release of WordPress 2.3, there were several major changes to the database structure. Most notably was the new taxonomy schema, which replaced the categories, post2cat, and link2cat tables in favor of a new term based system with three new tables &#8211; terms, term_taxonomy, and term_relationships. While there are plenty of guides on the [...]]]></description>
			<content:encoded><![CDATA[<p>With the release of WordPress 2.3, there were several major changes to the database structure. Most notably was the new taxonomy schema, which replaced the categories, post2cat, and link2cat tables in favor of a new term based system with three new tables &#8211; terms, term_taxonomy, and term_relationships. While there are plenty of guides on the new structure, this is a simple visual guide to the relationships of these tables &#8211; specifically for category handling. This information is really only useful for those who are writing plugins or other code that interface with the database directly, and want a handy reminder of the table relationships.<span id="more-190"></span></p>
<h3>Notes</h3>
<p>The descriptions of the table fields in the reference image below just apply to categories. The taxonomy schema is also used to handle several other objects. </p>
<p>When writing queries to link the tables together, be sure to use the following statement so that the results are limited to category objects:</p>
<pre>(table_prefix)_term_taxonomy.taxnomy = &#039;category&#039;</pre>
<p><center><img src="http://www.dagondesign.com/files/wp-2.3-db-structure-categories.png" alt="WordPress 2.3+ Database Structure for Categories" /></center></p>
<p>Just right-click to save the image.</p>
<p>

	<div style="margin: 10px 0 20px 0; padding: 6px; border: 1px solid #D5D5D5; background: #F3F3F3; color: #777777; font-weight: bold;">

	<a href="http://www.dagondesign.com/donate/"><img src="http://www.dagondesign.com/wp-content/themes/dagondesign3.11/images/donation-button-small.gif" style="vertical-align: middle; "></a>

	&nbsp; If you have found this page useful, please consider donating. Thanks!

	</div>

	</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagondesign.com/articles/wordpress-23-database-structure-for-categories/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
