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

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-82844</guid>
					<title><![CDATA[Link portfolio to external url]]></title>
					<link>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-82844</link>
					<pubDate>Tue, 12 Aug 2014 14:32:12 +0000</pubDate>
					<dc:creator>Dave K</dc:creator>

					<description>
						<![CDATA[
						<p>I&#8217;m looking to link the portfolio view (when it shows a category layout) so that when an image or the title is clicked, instead of going to a single portfolio page, it goes to an external URL that is pulled from the project link field.</p>
<p>Any help would be appreciated.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-82847</guid>
					<title><![CDATA[Reply To: Link portfolio to external url]]></title>
					<link>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-82847</link>
					<pubDate>Tue, 12 Aug 2014 14:38:49 +0000</pubDate>
					<dc:creator>Mrinal</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Dave, </p>
<p>Thanks for writing in! </p>
<p>To do so, Add the following codes to the functions.php of your <a href="http://theme.co/x/member/kb/how-to-setup-child-themes/" title="Child Themes" target="_blank" rel="nofollow">child theme</a>.</p>
<p>This code will make that portfolio item directly link to the &#8220;Project Link&#8221; instead of the portfolio item page.</p>
<pre><code>add_filter( &#039;post_type_link&#039;, &#039;x_remap_portfolio_permalink_to_project_link&#039;, 10, 4);

function x_remap_portfolio_permalink_to_project_link($post_link, $post, $leavename, $sample) {

    if (&#039;x-portfolio&#039; == $post-&gt;post_type) {
        $custom = get_post_custom($post-&gt;id);

        if (isset($custom[&#039;_x_portfolio_project_link&#039;]) &amp;&amp; $custom[&#039;_x_portfolio_project_link&#039;][0]!=&#039;&#039;)
            return $custom[&#039;_x_portfolio_project_link&#039;][0];
    }

    return $post_link;
}</code></pre>
<p>Now when you view the portfolio page, clicking an item will send you directly to the set URL. </p>
<p>Have a nice day, Cheers! </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-82852</guid>
					<title><![CDATA[Reply To: Link portfolio to external url]]></title>
					<link>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-82852</link>
					<pubDate>Tue, 12 Aug 2014 14:43:59 +0000</pubDate>
					<dc:creator>Dave K</dc:creator>

					<description>
						<![CDATA[
						<p>Amazing! Thanks for the quick response!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-82855</guid>
					<title><![CDATA[Reply To: Link portfolio to external url]]></title>
					<link>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-82855</link>
					<pubDate>Tue, 12 Aug 2014 14:44:27 +0000</pubDate>
					<dc:creator>Cousett</dc:creator>

					<description>
						<![CDATA[
						<p>Glad we were able to help. 🙂 Have a nice day. </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-83352</guid>
					<title><![CDATA[Reply To: Link portfolio to external url]]></title>
					<link>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-83352</link>
					<pubDate>Tue, 12 Aug 2014 23:23:28 +0000</pubDate>
					<dc:creator>Timothy H</dc:creator>

					<description>
						<![CDATA[
						<p>I am wondering: after adding your code to functions.php it works as advertised; however, how do I tell it to open the links in a new page/tab?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-83440</guid>
					<title><![CDATA[Reply To: Link portfolio to external url]]></title>
					<link>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-83440</link>
					<pubDate>Wed, 13 Aug 2014 03:25:12 +0000</pubDate>
					<dc:creator>Paula S</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Timothy, </p>
<p>You can edit the URL by going to Dashboard &gt; Portfolio &gt; Select Portfolio Item then scroll down to the Project Link area at the bottom. </p>
<p>Hope that helps!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-84532</guid>
					<title><![CDATA[Reply To: Link portfolio to external url]]></title>
					<link>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-84532</link>
					<pubDate>Thu, 14 Aug 2014 14:23:58 +0000</pubDate>
					<dc:creator>MatthieuH</dc:creator>

					<description>
						<![CDATA[
						<p>Oh yeah, great great feature, exactly what I needed.</p>
<p>But you didn&#8217;t quite answer Timothy question, which is the same problem I am having&#8230;<br />
How can we add a &#8220;target=&#8221;_blank&#8221; to the link?</p>
<p>Thanks !</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-84535</guid>
					<title><![CDATA[Reply To: Link portfolio to external url]]></title>
					<link>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-84535</link>
					<pubDate>Thu, 14 Aug 2014 14:26:36 +0000</pubDate>
					<dc:creator>Kosher K</dc:creator>

					<description>
						<![CDATA[
						<p>Hey Alex,</p>
<p>You can do it something like this</p>
<pre><code>(function($){ 
	$(&#039;.ahref-class-here&#039;).attr(&#039;target&#039;, &#039;_blank&#039;);
})(jQuery)</code></pre>
<p>Just change <code>.ahref-class-here</code> to the class of your link</p>
<p>Cheers</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-134411</guid>
					<title><![CDATA[Reply To: Link portfolio to external url]]></title>
					<link>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-134411</link>
					<pubDate>Wed, 29 Oct 2014 14:29:33 +0000</pubDate>
					<dc:creator>MatthieuH</dc:creator>

					<description>
						<![CDATA[
						<p>Sorry to revive this topic, but I couldn&#8217;t really fix it&#8230;</p>
<p>Where should I add this code? Can I add it in the portfolio parent page?<br />
If so, I cannot make it work&#8230;</p>
<p>Here is how I&#8217;m using it:</p>
<pre><code> (function($){ 
	$(&#039;.entry-thumb&#039;).attr(&#039;target&#039;, &#039;_blank&#039;);
})(jQuery)</code></pre>
<p>Also, if I could apply it only to &#8220;.page-id-12826 .x-iso-container-portfolio a&#8221; would be better&#8230;</p>
<p>Thanks guys</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-134656</guid>
					<title><![CDATA[Reply To: Link portfolio to external url]]></title>
					<link>https://theme.co/archive/forums/topic/link-portfolio-to-external-url/#post-134656</link>
					<pubDate>Wed, 29 Oct 2014 21:13:45 +0000</pubDate>
					<dc:creator>Nabeel A</dc:creator>

					<description>
						<![CDATA[
						<p>Hey Alex,</p>
<p>You will need to add the above jQuery code via <strong>Appearance &gt; Customize &gt; Custom &gt; Javascript</strong>. Let us know how this goes!</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

