<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<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">
	<channel>
		<title>Support Forum - Topic: Portfolio Categories in WPML</title>
		<link>http://www.kriesi.at/support/topic/portfolio-categories-in-wpml</link>
		<description>Support Forum - Topic: Portfolio Categories in WPML</description>
		<language>en-US</language>
		<pubDate>Wed, 22 May 2013 02:54:46 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.kriesi.at/support/search.php</link>
		</textInput>
		<atom:link href="http://www.kriesi.at/support/rss/topic/portfolio-categories-in-wpml" rel="self" type="application/rss+xml" />

		<item>
			<title>Devin on "Portfolio Categories in WPML"</title>
			<link>http://www.kriesi.at/support/topic/portfolio-categories-in-wpml#post-48410</link>
			<pubDate>Mon, 26 Mar 2012 21:32:20 +0000</pubDate>
			<dc:creator>Devin</dc:creator>
			<guid isPermaLink="false">48410@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hey bbmarketing,&#60;/p&#62;
&#60;p&#62;Thank you for posting the follow ups and fixes! Really helps to have such active users who come back and share what they were able to find and achieve :)&#60;/p&#62;
&#60;p&#62;Regards,&#60;/p&#62;
&#60;p&#62;Devin
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bbmarketing on "Portfolio Categories in WPML"</title>
			<link>http://www.kriesi.at/support/topic/portfolio-categories-in-wpml#post-48171</link>
			<pubDate>Sun, 25 Mar 2012 11:36:53 +0000</pubDate>
			<dc:creator>bbmarketing</dc:creator>
			<guid isPermaLink="false">48171@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Same problem with post/page module in dynamic templates was much easier to solve:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;function post_page($element)&#60;br /&#62;
	{&#60;br /&#62;
		extract($element['saved_value'][0]);&#60;br /&#62;
		$output = &#34;&#34;;&#60;br /&#62;
		switch($dynamic_which_post_page)&#60;br /&#62;
		{&#60;br /&#62;
			case'post': $query_id = $dynamic_post_id; $type ='post'; break;&#60;br /&#62;
			case'page': $query_id = $dynamic_page_id; $type ='page'; break;&#60;br /&#62;
			case'self': $query_id = $this-&#38;gt;post_id;	  $type = get_post_type( $this-&#38;gt;post_id ); break;&#60;br /&#62;
		}&#60;br /&#62;
		//WPML ready&#60;br /&#62;
		if (function_exists('icl_object_id')) $query_id = icl_object_id($query_id, $type, true);&#60;br /&#62;
...&#60;/code&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bbmarketing on "Portfolio Categories in WPML"</title>
			<link>http://www.kriesi.at/support/topic/portfolio-categories-in-wpml#post-48138</link>
			<pubDate>Sat, 24 Mar 2012 22:15:26 +0000</pubDate>
			<dc:creator>bbmarketing</dc:creator>
			<guid isPermaLink="false">48138@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Good news, i got it to work. As i saw later on in helper-templates.php a call like icl_object_id($term_id, 'portfolio_entries', true);&#60;/p&#62;
&#60;p&#62;The type 'portfolio_entries' works for categories, too. The beginning of my dynamic portfolio() function is now like this:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
	function portfolio($element)&#60;br /&#62;
	{&#60;br /&#62;
		extract($element['saved_value'][0]);&#60;br /&#62;
		global $avia_config;&#60;/p&#62;
&#60;p&#62;		$avia_config['portfolio_columns'] = $portfolio_columns;&#60;br /&#62;
		$avia_config['portfolio_item_count'] = $portfolio_item_count;&#60;br /&#62;
		$catArray = explode(',', $portfolio_cats_dynamic);&#60;/p&#62;
&#60;p&#62;		if (function_exists('icl_object_id'))&#60;br /&#62;
	    {&#60;br /&#62;
			foreach ($catArray as $key =&#38;gt; $value ) {&#60;br /&#62;
			    $catArray[$key] = icl_object_id($value, 'portfolio_entries', true);&#60;br /&#62;
	    	}&#60;br /&#62;
	    }&#60;br /&#62;
	$portfolio_cats_dynamic = implode(&#34;,&#34;, $catArray);&#60;br /&#62;
...&#60;br /&#62;
...&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Now i can create a single dynamic templates with portfolios, just assign the categories in my primary language and all the language hustle is fixed automaticly.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Dude on "Portfolio Categories in WPML"</title>
			<link>http://www.kriesi.at/support/topic/portfolio-categories-in-wpml#post-48101</link>
			<pubDate>Sat, 24 Mar 2012 07:38:52 +0000</pubDate>
			<dc:creator>Dude</dc:creator>
			<guid isPermaLink="false">48101@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Yes - the documentation: &#60;a href=&#34;http://wpml.org/documentation/support/creating-multilingual-wordpress-themes/language-dependent-ids/#2&#34; rel=&#34;nofollow&#34;&#62;http://wpml.org/documentation/support/creating-multilingual-wordpress-themes/language-dependent-ids/#2&#60;/a&#62; just mentions ‘post’, ‘page’, ‘post_tag’ or ‘category’. I'd create a feature request thread here: &#60;a href=&#34;http://wpml.org/forums/forum/english-support/&#34; rel=&#34;nofollow&#34;&#62;http://wpml.org/forums/forum/english-support/&#60;/a&#62; and ask them to extend the function.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bbmarketing on "Portfolio Categories in WPML"</title>
			<link>http://www.kriesi.at/support/topic/portfolio-categories-in-wpml#post-48078</link>
			<pubDate>Fri, 23 Mar 2012 23:31:04 +0000</pubDate>
			<dc:creator>bbmarketing</dc:creator>
			<guid isPermaLink="false">48078@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Update: Seems to be a malfunction in &#60;a href=&#34;http://inoplugs.com/wpml&#34;&#62;WPML&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;I was able to set the translated cat-ID manually right after helper-templates.php:470 in $portfolio_cats_dynamic. Worked in the frontend.&#60;br /&#62;
So I tried to do it with icl_object_id() but it always returns the same ID that I pass to it. &#60;/p&#62;
&#60;p&#62;Googling i found that icl_object_id cannot handle custom post types and categories by default. too bad :-/&#60;br /&#62;
&#60;a href=&#34;http://till.klampaeckel.de/blog/archives/167-WPML-icl_object_id-and-custom-post-types.html&#34; rel=&#34;nofollow&#34;&#62;http://till.klampaeckel.de/blog/archives/167-WPML-icl_object_id-and-custom-post-types.html&#60;/a&#62;&#60;br /&#62;
Bad joke that &#60;a href=&#34;http://inoplugs.com/wpml&#34;&#62;WPML&#60;/a&#62; lets me translate these items in the dashboard :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bbmarketing on "Portfolio Categories in WPML"</title>
			<link>http://www.kriesi.at/support/topic/portfolio-categories-in-wpml#post-47810</link>
			<pubDate>Thu, 22 Mar 2012 17:59:54 +0000</pubDate>
			<dc:creator>bbmarketing</dc:creator>
			<guid isPermaLink="false">47810@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;For now I ended up on helper-templates.php:473 where a variable called portfolio_cats_dynamic is used.&#60;/p&#62;
&#60;p&#62;This one is empty when I have a translated page (and listing the cats when I load a page in my primary lang)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bbmarketing on "Portfolio Categories in WPML"</title>
			<link>http://www.kriesi.at/support/topic/portfolio-categories-in-wpml#post-47787</link>
			<pubDate>Thu, 22 Mar 2012 16:36:22 +0000</pubDate>
			<dc:creator>bbmarketing</dc:creator>
			<guid isPermaLink="false">47787@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hello!&#60;/p&#62;
&#60;p&#62;Regarding line 949, this seems to affect the static portfolio page only, not the dynamic template portfolio.&#60;/p&#62;
&#60;p&#62;I will try to trace where the category IDs are lost on the way to the portfolio loop :-)&#60;/p&#62;
&#60;p&#62;Best regards&#60;/p&#62;
&#60;p&#62;Edit: seems that avia_config is empty when calling a translated page on line 8 of loop-portfolio.php ... confusing.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Kriesi on "Portfolio Categories in WPML"</title>
			<link>http://www.kriesi.at/support/topic/portfolio-categories-in-wpml#post-47775</link>
			<pubDate>Thu, 22 Mar 2012 15:49:21 +0000</pubDate>
			<dc:creator>Kriesi</dc:creator>
			<guid isPermaLink="false">47775@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hi! &#60;/p&#62;
&#60;p&#62; Hey!&#60;/p&#62;
&#60;p&#62;Probably because this is already taken care of in includes/helper-templates.php at line 967&#60;br /&#62;
Nevertheless the portfolio is not working 100% fine, and I am at this point not sure why thats the case... &#60;/p&#62;
&#60;p&#62; Regards,&#60;br /&#62;
Kriesi
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bbmarketing on "Portfolio Categories in WPML"</title>
			<link>http://www.kriesi.at/support/topic/portfolio-categories-in-wpml#post-47759</link>
			<pubDate>Thu, 22 Mar 2012 14:34:39 +0000</pubDate>
			<dc:creator>bbmarketing</dc:creator>
			<guid isPermaLink="false">47759@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Well, I was trying to patch this in portfolio-loop, by modifying the includeArray:&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
	//transform CATs for languages&#60;br /&#62;
	if(function_exists('icl_object_id')) {&#60;br /&#62;
		foreach ($includeArray as &#38;amp;$value) {&#60;br /&#62;
			$value = icl_object_id($value,'category',true);&#60;br /&#62;
		}&#60;br /&#62;
	}&#60;br /&#62;
&#60;/code&#62;&#60;br /&#62;
By this I got a warning that the array is empty. How is that possible - there are 3 cat's assigned to the dynamic template.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Kriesi on "Portfolio Categories in WPML"</title>
			<link>http://www.kriesi.at/support/topic/portfolio-categories-in-wpml#post-47562</link>
			<pubDate>Wed, 21 Mar 2012 21:34:02 +0000</pubDate>
			<dc:creator>Kriesi</dc:creator>
			<guid isPermaLink="false">47562@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hey&#60;/p&#62;
&#60;p&#62;I am afaraid the combination of dynamic portfolios + &#60;a href=&#34;http://inoplugs.com/wpml&#34;&#62;WPML&#60;/a&#62; is currently not supported properly. Its a shortcomming in both the theme code and the plugin and I wasnt able til yet to fix this issues.&#60;/p&#62;
&#60;p&#62;Sorry for that, once I have found a way to make all of that work well together an update will be released
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bbmarketing on "Portfolio Categories in WPML"</title>
			<link>http://www.kriesi.at/support/topic/portfolio-categories-in-wpml#post-47515</link>
			<pubDate>Wed, 21 Mar 2012 19:07:13 +0000</pubDate>
			<dc:creator>bbmarketing</dc:creator>
			<guid isPermaLink="false">47515@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hello and first of all thanks for making Corona - great theme!!&#60;/p&#62;
&#60;p&#62;Now to my trouble:&#60;/p&#62;
&#60;p&#62;My page has a portfolio-categorie &#34;hotels&#34; and i want to make it available in 3 languages.&#60;br /&#62;
For &#60;a href=&#34;http://inoplugs.com/wpml&#34;&#62;WPML&#60;/a&#62; and the cat-filter to work proper, I create a translated copy of the hotel-category, too.&#60;/p&#62;
&#60;p&#62;Next I create a dynamic template with portfolio and assign it to all languages of the page. works for the primary language but when i switch to second language, the portfolio is empty. the frontend doesn't recognize that it has to use the translated version of the hotel-category.&#60;/p&#62;
&#60;p&#62;So i wanted to work-around and create dynamic templates for each language - but at this point the template builder just shows me the cat's of the first language ... I cannot select the translated versions of the hotel-category.&#60;/p&#62;
&#60;p&#62;The final question:&#60;/p&#62;
&#60;p&#62;I there a way to generate one single dynamic template which recognizes the different languages of my hotel-category??
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
