<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Custom Post Type Permalinks &#8211; Part 2</title>
	<atom:link href="http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2/feed" rel="self" type="application/rss+xml" />
	<link>http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2</link>
	<description>Dynamic WordPress Theme</description>
	<lastBuildDate>Sun, 08 Jan 2012 23:20:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Amanda</title>
		<link>http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#comment-9560</link>
		<dc:creator>Amanda</dc:creator>
		<pubDate>Wed, 21 Dec 2011 22:03:55 +0000</pubDate>
		<guid isPermaLink="false">http://shibashake.com/wordpress-theme/?p=6451#comment-9560</guid>
		<description>Sorry, I wrote too soon! I saw you already answered it in the previous comments and that worked for me too. Thanks again for the great info!</description>
		<content:encoded><![CDATA[<p>Sorry, I wrote too soon! I saw you already answered it in the previous comments and that worked for me too. Thanks again for the great info!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amanda</title>
		<link>http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#comment-9559</link>
		<dc:creator>Amanda</dc:creator>
		<pubDate>Wed, 21 Dec 2011 21:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://shibashake.com/wordpress-theme/?p=6451#comment-9559</guid>
		<description>Thanks for the info! It worked great to change the permalinks on my custom post type, but I am getting a 404 when I try to view the post? Is there something I&#039;m missing? I&#039;ve tried saving the Permalinks Settings Page, but that hasn&#039;t done anything. Thanks in advance!</description>
		<content:encoded><![CDATA[<p>Thanks for the info! It worked great to change the permalinks on my custom post type, but I am getting a 404 when I try to view the post? Is there something I&#8217;m missing? I&#8217;ve tried saving the Permalinks Settings Page, but that hasn&#8217;t done anything. Thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ShibaShake</title>
		<link>http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#comment-8124</link>
		<dc:creator>ShibaShake</dc:creator>
		<pubDate>Tue, 08 Nov 2011 19:24:36 +0000</pubDate>
		<guid isPermaLink="false">http://shibashake.com/wordpress-theme/?p=6451#comment-8124</guid>
		<description>Add in a unique slug.
http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#conflict</description>
		<content:encoded><![CDATA[<p>Add in a unique slug.<br />
<a href="http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#conflict" rel="nofollow">http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#conflict</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Removing taxonomy base using WP rewrite &#124; SeekPHP.com</title>
		<link>http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#comment-7987</link>
		<dc:creator>Removing taxonomy base using WP rewrite &#124; SeekPHP.com</dc:creator>
		<pubDate>Sat, 05 Nov 2011 00:00:24 +0000</pubDate>
		<guid isPermaLink="false">http://shibashake.com/wordpress-theme/?p=6451#comment-7987</guid>
		<description>[...] http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2 (Good introduction) [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2" rel="nofollow">http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2</a> (Good introduction) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rafal Jaskolski</title>
		<link>http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#comment-7927</link>
		<dc:creator>Rafal Jaskolski</dc:creator>
		<pubDate>Wed, 02 Nov 2011 12:48:50 +0000</pubDate>
		<guid isPermaLink="false">http://shibashake.com/wordpress-theme/?p=6451#comment-7927</guid>
		<description>Hi :)

great thanks for this tutorial. It works for me, but....

when I set rewrite as &quot;%category%&quot; im my post custom type there is conflict with pemalink for standard post.

How can I solve this?</description>
		<content:encoded><![CDATA[<p>Hi <img src='http://shibashake.com/wordpress-theme/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>great thanks for this tutorial. It works for me, but&#8230;.</p>
<p>when I set rewrite as &#8220;%category%&#8221; im my post custom type there is conflict with pemalink for standard post.</p>
<p>How can I solve this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giuseppina</title>
		<link>http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#comment-7329</link>
		<dc:creator>Giuseppina</dc:creator>
		<pubDate>Sun, 09 Oct 2011 13:00:51 +0000</pubDate>
		<guid isPermaLink="false">http://shibashake.com/wordpress-theme/?p=6451#comment-7329</guid>
		<description>Hello there, thanks for your job, I have set a permalink structure for my custom type &#039;spartiti&#039; in this way:
/%year%/%monthnum%/%day%/%postname%/
but I would like to have my archive for this custom post type in this way:

mywebsite/spartiti

Is this possible?
Thank you</description>
		<content:encoded><![CDATA[<p>Hello there, thanks for your job, I have set a permalink structure for my custom type &#8216;spartiti&#8217; in this way:<br />
/%year%/%monthnum%/%day%/%postname%/<br />
but I would like to have my archive for this custom post type in this way:</p>
<p>mywebsite/spartiti</p>
<p>Is this possible?<br />
Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobias</title>
		<link>http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#comment-7097</link>
		<dc:creator>Tobias</dc:creator>
		<pubDate>Fri, 30 Sep 2011 01:09:32 +0000</pubDate>
		<guid isPermaLink="false">http://shibashake.com/wordpress-theme/?p=6451#comment-7097</guid>
		<description>Works great, thanks a billion!!! I modified it slightly for a custom post that I wanted to display like &lt;code&gt;/books/%post_id%/%postname%&lt;/code&gt; so I was able to remove much of the code, and it looks like this:

&lt;code&gt;
function BookPermalink( $permalink, $post_id, $leavename )
{
	$post = get_post( $post_id );
	
	// Don&#039;t rewrite unless it&#039;s published
	if ( &#039;&#039; != $permalink &amp;&amp; !in_array( $post-&gt;post_status, array(&#039;draft&#039;, &#039;pending&#039;, &#039;auto-draft&#039;) ) )
	{
	
		// These are the things we&#039;ll look for
		$rewrite_old = array(
			&#039;%post_id%&#039;,
			$leavename? &#039;&#039; : &#039;%pagename%&#039;,
			$leavename? &#039;&#039; : &#039;%postname%&#039;
		);
		
		// And here we decide what to replace them with
		$rewrite_new = array(
			$post-&gt;ID,
			$post-&gt;post_name,
			$post-&gt;post_name
		);
		
		// Now do the replacing
		$permalink = str_replace($rewrite_old, $rewrite_new, $permalink);
		
	}
	
	return $permalink;
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Works great, thanks a billion!!! I modified it slightly for a custom post that I wanted to display like <code>/books/%post_id%/%postname%</code> so I was able to remove much of the code, and it looks like this:</p>
<p><code><br />
function BookPermalink( $permalink, $post_id, $leavename )<br />
{<br />
	$post = get_post( $post_id );</p>
<p>	// Don't rewrite unless it's published<br />
	if ( '' != $permalink &amp;&amp; !in_array( $post-&gt;post_status, array('draft', 'pending', 'auto-draft') ) )<br />
	{</p>
<p>		// These are the things we'll look for<br />
		$rewrite_old = array(<br />
			'%post_id%',<br />
			$leavename? '' : '%pagename%',<br />
			$leavename? '' : '%postname%'<br />
		);</p>
<p>		// And here we decide what to replace them with<br />
		$rewrite_new = array(<br />
			$post-&gt;ID,<br />
			$post-&gt;post_name,<br />
			$post-&gt;post_name<br />
		);</p>
<p>		// Now do the replacing<br />
		$permalink = str_replace($rewrite_old, $rewrite_new, $permalink);</p>
<p>	}</p>
<p>	return $permalink;<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ShibaShake</title>
		<link>http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#comment-7061</link>
		<dc:creator>ShibaShake</dc:creator>
		<pubDate>Wed, 28 Sep 2011 22:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://shibashake.com/wordpress-theme/?p=6451#comment-7061</guid>
		<description>What is $event_structure and $place_structure?</description>
		<content:encoded><![CDATA[<p>What is $event_structure and $place_structure?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven</title>
		<link>http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#comment-6998</link>
		<dc:creator>Steven</dc:creator>
		<pubDate>Sun, 25 Sep 2011 15:06:11 +0000</pubDate>
		<guid isPermaLink="false">http://shibashake.com/wordpress-theme/?p=6451#comment-6998</guid>
		<description>Hi,

I am having problems with creating this for two CPT,
$wp_rewrite-&gt;add_permastruct(&#039;event&#039;, $event_structure, false);
$wp_rewrite-&gt;add_permastruct(&#039;place&#039;, $place_structure, false);

They seem to cancel each other out, if i comment one out the other will work but not both, do u have any advice?

Steven</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I am having problems with creating this for two CPT,<br />
$wp_rewrite-&gt;add_permastruct(&#8216;event&#8217;, $event_structure, false);<br />
$wp_rewrite-&gt;add_permastruct(&#8216;place&#8217;, $place_structure, false);</p>
<p>They seem to cancel each other out, if i comment one out the other will work but not both, do u have any advice?</p>
<p>Steven</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ShibaShake</title>
		<link>http://shibashake.com/wordpress-theme/custom-post-type-permalinks-part-2#comment-6958</link>
		<dc:creator>ShibaShake</dc:creator>
		<pubDate>Fri, 23 Sep 2011 18:04:50 +0000</pubDate>
		<guid isPermaLink="false">http://shibashake.com/wordpress-theme/?p=6451#comment-6958</guid>
		<description>Yes this is a premalink conflict issue. Try adding a unique keyword to your permalink structure, e.g.

/my-unique-keyword/%ean%/%game%</description>
		<content:encoded><![CDATA[<p>Yes this is a premalink conflict issue. Try adding a unique keyword to your permalink structure, e.g.</p>
<p>/my-unique-keyword/%ean%/%game%</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 13/27 queries in 0.108 seconds using disk: basic
Object Caching 445/476 objects using disk: basic

Served from: shibashake.com @ 2012-01-08 18:09:15 -->
