<?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>BlueOwlCreative  &#187;  Topic: portfolio_item preview doesn&#039;t work</title>
		<atom:link href="http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/feed/" rel="self" type="application/rss+xml" />
		<link>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/feed/</link>
		<description></description>
		<pubDate>Fri, 17 Jul 2026 12:21:12 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.5.3-5249</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31066</guid>
					<title><![CDATA[portfolio_item preview doesn&#039;t work]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31066</link>
					<pubDate>Thu, 23 Feb 2017 17:01:44 +0000</pubDate>
					<dc:creator>drunkfox</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there.</p>
<p>I&#8217;m not sure this issue is related with your theme, but if I switch to WP default theme there is not any Portfolio to check&#8230;<br />
If I deactivate the plugins the error is still there.</p>
<p>The issue is this:<br />
When creating a new portfolio item or editing a draft of it the preview function works fine. If you change the portfolio item from published to draft and save it the preview function works again.</p>
<p>But as long as the post status is &#8220;published&#8221; the portfolio item preview give me an error 404.</p>
<p>In the past, when I created my website, I changed the word &#8220;Portfolio&#8221; to &#8220;Outdoor&#8221;, as you can see in the code below:</p>
<pre><code>add_action(&#039;init&#039;, &#039;boc_custom_types&#039;);
function boc_custom_types() {
	register_post_type(
		&#039;portfolio&#039;,
		array(
			&#039;labels&#039; =&gt; array(
				&#039;name&#039; =&gt; &#039;Portfolio&#039;,
				&#039;singular_name&#039; =&gt; &#039;Portfolio&#039;
			),
			&#039;public&#039; =&gt; true,
			&#039;has_archive&#039; =&gt; true,
			&#039;rewrite&#039; =&gt; array(&#039;slug&#039; =&gt; &#039;outdoor&#039;),
			&#039;supports&#039; =&gt; array(&#039;title&#039;, &#039;editor&#039;, &#039;thumbnail&#039;),
			&#039;can_export&#039; =&gt; true,
			&#039;show_in_nav_menus&#039; =&gt; true,
		)
	);</code></pre>
<p>An example: I saw that the 404 page take me to this URL:</p>
<p><a href="https://www.guidedolomiti.com/outdoor/arrampicata-su-roccia/?preview_id=22521&#038;preview_nonce=5e6e509d6d&#038;post_format=gallery&#038;_thumbnail_id=22582" rel="nofollow">https://www.guidedolomiti.com/outdoor/arrampicata-su-roccia/?preview_id=22521&#038;preview_nonce=5e6e509d6d&#038;post_format=gallery&#038;_thumbnail_id=22582</a></p>
<p>I realize that if I deleted all the letters after preview_id=xxx the preview works fine (<a href="https://www.guidedolomiti.com/outdoor/arrampicata-su-roccia/?preview_id=22521" rel="nofollow">https://www.guidedolomiti.com/outdoor/arrampicata-su-roccia/?preview_id=22521</a>)</p>
<p>Have you any idea about how to solve this?<br />
Thank you.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31071</guid>
					<title><![CDATA[Reply To: portfolio_item preview doesn&#039;t work]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31071</link>
					<pubDate>Fri, 24 Feb 2017 16:09:50 +0000</pubDate>
					<dc:creator>BlueOwl</dc:creator>

					<description>
						<![CDATA[
						<p>Hi,</p>
<p>Can you add this to your functions.php and try again:</p>
<pre><code>// Register the Custom Templates for the Custom Post Type Portfolio
function boc_cpt_post_types( $post_types ) {
	$post_types = array();
	$post_types[] = &#039;portfolio&#039;;
	return $post_types;
}
add_filter( &#039;cpt_post_types&#039;, &#039;boc_cpt_post_types&#039; );</code></pre>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31072</guid>
					<title><![CDATA[Reply To: portfolio_item preview doesn&#039;t work]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31072</link>
					<pubDate>Fri, 24 Feb 2017 18:05:53 +0000</pubDate>
					<dc:creator>drunkfox</dc:creator>

					<description>
						<![CDATA[
						<p>Thanks.<br />
Probably there is an error in your code. After added it in functions.php the website doesn&#8217;t work, and the browser shows this error:<br />
<strong>Parse error: syntax error, unexpected &#8216;return&#8217; (T_RETURN)</strong></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31075</guid>
					<title><![CDATA[Reply To: portfolio_item preview doesn&#039;t work]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31075</link>
					<pubDate>Sat, 25 Feb 2017 15:51:54 +0000</pubDate>
					<dc:creator>BlueOwl</dc:creator>

					<description>
						<![CDATA[
						<p>Hmm, strange, again I will need some ftp + dashboard access&#8230; in a private reply pls. <img src="http://blueowlcreative.com/support_wp/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31080</guid>
					<title><![CDATA[Reply To: portfolio_item preview doesn&#039;t work]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31080</link>
					<pubDate>Sun, 26 Feb 2017 07:16:16 +0000</pubDate>
					<dc:creator>drunkfox</dc:creator>

					<description>
						<![CDATA[
						This reply has been marked as private.						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31083</guid>
					<title><![CDATA[Reply To: portfolio_item preview doesn&#039;t work]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31083</link>
					<pubDate>Sun, 26 Feb 2017 07:18:42 +0000</pubDate>
					<dc:creator>drunkfox</dc:creator>

					<description>
						<![CDATA[
						This reply has been marked as private.						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31093</guid>
					<title><![CDATA[Reply To: portfolio_item preview doesn&#039;t work]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31093</link>
					<pubDate>Tue, 28 Feb 2017 16:02:30 +0000</pubDate>
					<dc:creator>BlueOwl</dc:creator>

					<description>
						<![CDATA[
						<p>Is some cache on? Nothing I add to your child theme does anything&#8230;<br />
I thing I disabled what I though was cache &#8211; WP rocket or smth&#8230;?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31098</guid>
					<title><![CDATA[Reply To: portfolio_item preview doesn&#039;t work]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31098</link>
					<pubDate>Tue, 28 Feb 2017 16:27:18 +0000</pubDate>
					<dc:creator>drunkfox</dc:creator>

					<description>
						<![CDATA[
						This reply has been marked as private.						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31101</guid>
					<title><![CDATA[Reply To: portfolio_item preview doesn&#039;t work]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31101</link>
					<pubDate>Tue, 28 Feb 2017 18:43:04 +0000</pubDate>
					<dc:creator>BlueOwl</dc:creator>

					<description>
						<![CDATA[
						<p>Ok, thanks, can you try again now?<br />
I added this to your functions.php:</p>
<pre><code>// Fix Preview of custom post type
function boc_remove_post_format_parameter( $url ) {      
	$url = remove_query_arg( &#039;post_format&#039;, $url );   
	return $url;
}
add_filter( &#039;preview_post_link&#039;, &#039;boc_remove_post_format_parameter&#039;, 9999 );</code></pre>
<p>What it does is it removes the &#8220;post_format&#8221; parameter from the URL when previewing that seems to break the preview&#8217;s permalink. <img src="http://blueowlcreative.com/support_wp/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31105</guid>
					<title><![CDATA[Reply To: portfolio_item preview doesn&#039;t work]]></title>
					<link>http://blueowlcreative.com/support_wp/forums/topic/portfolio_item-preview-doesnt-work/#post-31105</link>
					<pubDate>Wed, 01 Mar 2017 06:08:34 +0000</pubDate>
					<dc:creator>drunkfox</dc:creator>

					<description>
						<![CDATA[
						<p>Thank you very much, it works perfectly!<br />
Have you any idea about why previewing breaks the preview’s permalink?<br />
Ciao.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

