<?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>portfolio items linking to a post page &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/feed/</link>
		<description></description>
		<lastBuildDate>Sat, 08 Nov 2025 18:20:45 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272343</guid>
					<title><![CDATA[portfolio items linking to a post page]]></title>
					<link>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272343</link>
					<pubDate>Wed, 13 May 2015 09:31:17 +0000</pubDate>
					<dc:creator>michele</dc:creator>

					<description>
						<![CDATA[
						<p>hi &#8211; I wondered if this was possible.<br />
The portfolio item page is not what I need for my design as really want the portfolio items displayed on my portfolio page to go directly through on a click to a page/post.<br />
Maybe its easier if I try and explain this way &#8211; if I have a portfolio page called &#8216;places to eat &amp; drink&#8217; so that underneath visitors to the site could sort by coffee shops, restaurants and hotels say (these would all be child portfolio items from parent &#8216;places to eat &amp; drink&#8217;)  When a visitor clicks on the portfolio item (say coffee shop1 &#8211; which I would also set up as a portfolio item) they would go straight through to say a post page (called coffee shop 1 too &#8211; which I would build as a post or page in itself)  Is this possible? Its just I really don&#8217;t want visitors having to do too many clicks &#8211; if they could choose say a coffee shop and go straight through to it it would be better.<br />
Is there a way to do this?<br />
Many thanks for your ongoing support &#8211; I really do appreciate it.<br />
Michele</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272388</guid>
					<title><![CDATA[Reply To: portfolio items linking to a post page]]></title>
					<link>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272388</link>
					<pubDate>Wed, 13 May 2015 10:59:12 +0000</pubDate>
					<dc:creator>michele</dc:creator>

					<description>
						<![CDATA[
						<p>Aaagh &#8211; I found this article on the forum and thought it would be the answer to what I was asking you above, but when I tried to add the code in my x child functions.php file I managed to break it &#8211; getting an error message &#8211; Parse error: syntax error, unexpected end of file in /home/phil08/public_html/wp-content/themes/x-child/functions.php on line 1. So I went back to the file and deleted the code I added and uploaded to site again, but still getting error message and cant access my site at all. Can you please help?<br />
Michele</p>
<p>This was the code I added and then removed:<br />
I’m sorry, the portfolio items can’t be given page templates and made full width. You can however, create separate pages for each item.</p>
<p>In your portfolio items, you can set a “Project Link” and place a link to the page you created. This is usually meant for linking to an external source</p>
<p>Next, add this to the functions.php of your child theme.</p>
<p>This code will make that portfolio item directly link to the “Project Link” instead of the portfolio item page.</p>
<p>add_filter( &#8216;post_type_link&#8217;, &#8216;x_remap_portfolio_permalink_to_project_link&#8217;, 10, 4);</p>
<p>function x_remap_portfolio_permalink_to_project_link($post_link, $post, $leavename, $sample) {</p>
<p>    if (&#8216;x-portfolio&#8217; == $post-&gt;post_type) {<br />
        $custom = get_post_custom($post-&gt;id);</p>
<p>        if (isset($custom[&#8216;_x_portfolio_project_link&#8217;]) &amp;&amp; $custom[&#8216;_x_portfolio_project_link&#8217;][0]!=&#8221;)<br />
            return $custom[&#8216;_x_portfolio_project_link&#8217;][0];<br />
    }</p>
<p>    return $post_link;<br />
}<br />
EDIT: I’d like to add a bit more info here, as this workaround has been referred to in other topics.</p>
<p>The code above will change the link of the portfolio items. So when you click an item from the portfolio page, it will send you directly to the custom link. This helps if you want a more unique layout that can only be created using a page, or if you want an external link directly.</p>
<p>After adding the code, you should do this:</p>
<p>1. Create your portfolio items.<br />
2. For each portfolio item, create a new page to present the unique layout you would like.<br />
3. After creating a page, view it, and copy the link<br />
3. Edit the portfolio item, and paste the link into the “Custom URL” field.</p>
<p>Now when you view the portfolio page, clicking an item will send you directly to the set URL.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272403</guid>
					<title><![CDATA[Reply To: portfolio items linking to a post page]]></title>
					<link>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272403</link>
					<pubDate>Wed, 13 May 2015 11:13:50 +0000</pubDate>
					<dc:creator>michele</dc:creator>

					<description>
						<![CDATA[
						<p>Ok, so I have managed to get access to my site and all ok &#8211; I unzipped my childxtheme on my computer and uploaded the original funtions.php file to my website , so everything is back to normal 🙂</p>
<p>But, can you still help me with my original question?  Will the above code work to do what I want to do, and if so , could you show me exactly where to place it in the child theme functions.php file to make sure I do it correctly?<br />
Many thanks and sorry for such a long thread of questions.<br />
Michele</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272595</guid>
					<title><![CDATA[Reply To: portfolio items linking to a post page]]></title>
					<link>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272595</link>
					<pubDate>Wed, 13 May 2015 15:05:23 +0000</pubDate>
					<dc:creator>Zeshan</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Michele,</p>
<p>Thanks for writing in!</p>
<p>Do you wish to redirect your single portfolio item page to another URL? If so, you can review this thread: <a href="https://theme.co/x/member/forums/topic/directing-an-item-in-portfolio-to-a-page/#post-36075" rel="nofollow">https://theme.co/x/member/forums/topic/directing-an-item-in-portfolio-to-a-page/#post-36075</a></p>
<p>Thanks!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272615</guid>
					<title><![CDATA[Reply To: portfolio items linking to a post page]]></title>
					<link>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272615</link>
					<pubDate>Wed, 13 May 2015 15:32:42 +0000</pubDate>
					<dc:creator>michele</dc:creator>

					<description>
						<![CDATA[
						<p>Hi I tried to do the above, added the code, built a page called<br />
<a href="http://www.bestofourshire.com/sierrra-farm-test-page/" rel="nofollow">http://www.bestofourshire.com/sierrra-farm-test-page/</a><br />
and then added the custom field code under the portfolio item sierra farm<br />
<a href="http://www.bestofourshire.com/wp-admin/post.php?post=20&#038;action=edit" rel="nofollow">http://www.bestofourshire.com/wp-admin/post.php?post=20&#038;action=edit</a><br />
adding the code x_custom_link and <a href="http://www.bestofourshire.com/sierrra-farm-test-page/" rel="nofollow">http://www.bestofourshire.com/sierrra-farm-test-page/</a></p>
<p>so, when you go to the portfolio page and click on the portfolio item sierra farm it still goes back to the portfolio item as opposed going to the test page I created.  Have I done something wrong?  I need the permalink on the front of  the item on the portfolio page to go directly to another page, not go to the portfolio item first.</p>
<p>Does that make sense?<br />
Michele</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272673</guid>
					<title><![CDATA[Reply To: portfolio items linking to a post page]]></title>
					<link>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272673</link>
					<pubDate>Wed, 13 May 2015 16:24:44 +0000</pubDate>
					<dc:creator>michele</dc:creator>

					<description>
						<![CDATA[
						<p>In other words, I need to find a way of going from here<br />
<a href="http://www.bestofourshire.com/wp-admin/customize.php?return=%2Fwp-admin%2Fpost.php%3Fpost%3D20%26action%3Dedit" rel="nofollow">http://www.bestofourshire.com/wp-admin/customize.php?return=%2Fwp-admin%2Fpost.php%3Fpost%3D20%26action%3Dedit</a><br />
and by pressing the little pink link on front of sierra farm to go to<br />
<a href="http://www.bestofourshire.com/sierrra-farm-test-page/" rel="nofollow">http://www.bestofourshire.com/sierrra-farm-test-page/</a></p>
<p>therefore cutting out the visit to the single portfolio item page.<br />
Is this possible?<br />
Thank you in advance<br />
Michele</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272871</guid>
					<title><![CDATA[Reply To: portfolio items linking to a post page]]></title>
					<link>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272871</link>
					<pubDate>Wed, 13 May 2015 20:25:57 +0000</pubDate>
					<dc:creator>Nabeel A</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Michele,</p>
<p>The Code provided in this post <a href="https://theme.co/x/member/forums/topic/directing-an-item-in-portfolio-to-a-page/#post-36075" rel="nofollow">https://theme.co/x/member/forums/topic/directing-an-item-in-portfolio-to-a-page/#post-36075</a> works just fine. I have tested it on my localhost and it&#8217;s working just as expected. You might have missed something. Try re-pasting the code again carefully in your child theme&#8217;s functions.php file then you will need to create a custom field to add the custom link. Make sure you save the custom field. Once it&#8217;s done it will work properly.</p>
<p>Let us know how this goes!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272904</guid>
					<title><![CDATA[Reply To: portfolio items linking to a post page]]></title>
					<link>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-272904</link>
					<pubDate>Wed, 13 May 2015 21:04:31 +0000</pubDate>
					<dc:creator>michele</dc:creator>

					<description>
						<![CDATA[
						<p>Where do I paste the code &#8211; could you show me incase I am adding it incorrectly?<br />
Do I paste above the existing code or below?<br />
And can you clarify, will this code take me straight from the portfolio page showing all the portfolio items straight to the page that is set up, via the permalink,  without going via the portfolio item page?</p>
<p>thank you<br />
Michele</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-273125</guid>
					<title><![CDATA[Reply To: portfolio items linking to a post page]]></title>
					<link>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-273125</link>
					<pubDate>Thu, 14 May 2015 02:01:31 +0000</pubDate>
					<dc:creator>Friech</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Michele,</p>
<p>Just append that code on the bottom of your child theme&#8217;s <strong>functions.php</strong> file</p>
<p><img decoding="async" src="http://i.imgur.com/9vDB8pQ.jpg" alt="image" /></p>
<p>Then do this on the portfolio&#8217;s custom field </p>
<p><img decoding="async" src="http://i.imgur.com/RVAG3K4.jpg" alt="image" /></p>
<p>Yes, it should directly link to the relative link you assigned on custom field.</p>
<p>Hope this shed some lights. Cheers!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-273248</guid>
					<title><![CDATA[Reply To: portfolio items linking to a post page]]></title>
					<link>https://theme.co/archive/forums/topic/portfolio-items-linking-to-a-post-page/#post-273248</link>
					<pubDate>Thu, 14 May 2015 05:10:42 +0000</pubDate>
					<dc:creator>michele</dc:creator>

					<description>
						<![CDATA[
						<p>Many thanks for clarification &#8211; I will try again and let you know how I get on&#8230; 🙂<br />
Michele</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

