Due to the large volume of support requests, at the moment there is a waiting time of more than 24 hours. We apologize for the inconvenience this causes. We do not have any recurring unknown issues so we encourage you to please search the forum for other support topics that might be helpful and to review our documentation and look at our errata page for known issues. A supporter will respond to you as soon as possible.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 14 replies, has 2 voices, and was last updated by  Michele 4 years, 11 months ago. The support staff assigned to this topic is Harshad.

Author Posts
Author Posts
March 27, 2013 at 6:37 pm #115401



I recently encountered an issue in the visualization of portfolio items in my theme somewhat related to WPML.

Since it looks like a very theme-specific issue (Kriesi's Flagship theme, developed using the Avia Framework), I already asked for help in the theme developer's support forum ( hidden link ).

I understand it's not you problem to guarantee theme compatibility, but I hoped you could maybe give some hints or ideas to try and solve this issue.

Basically, the theme makes some pages retrieve portfolio items filtered by category, and displays them in a grid style (like this: hidden link ).
For some reason, the moment I enable the WPML plugin, these views stop working since (I suppose) the page can't find the portfolio items.

You could try to have a look at the other support forum (linked above) to understand better.

If you could give me some hints I'd really appreciate that, otherwise I completely understand: this is not your business after all..


March 27, 2013 at 9:22 pm #115419


Dear Michele,

Can you please attach a screenshot, how you are adding portfolio items?

March 28, 2013 at 8:56 am #115485


Of course, you can find them as attachements.

March 28, 2013 at 1:42 pm #115585


Dear Michele,

The strings that are part of the options that the plugins or themes save in the wp_options table.

When themes and plugins use get_option, they read values from the wp_options table. WPML can filter these calls and provide translation to the values of these options.

For this you can create a language configuration file, which tells WPML which Admin texts you want to translate.


March 28, 2013 at 2:14 pm #115598


Thanks, this looks really relevant.

Would you be able to translate this into a practical action for me? 🙂
I also asked in the theme's support forum, as they could have the complementary information.

March 28, 2013 at 7:06 pm #115652


Dear Michele,

I have sent you email with a file attached, please follow the steps below:

1) Upload the attached file to wordpress root folder
2) This file will create a code for wpml-config.xml file.
3) Then execute the file using hidden link;
4) Copy the code to your wpml-config.xml file
5) Upload the wpml-config.xml file to your themes root folder.

Note :: Replace <option_name> with actual option_name used by your theme.

April 3, 2013 at 8:15 am #116661


Dear Harshard,

I asked the theme developers and they guess the <option_name> should be current_theme (hidden link)
Trying to use that option into the create_wpml_config.php file gives this output:

<key name="current_theme">
Warning: Invalid argument supplied for foreach() in /htdocs/public/www/create_wpml_config.php on line 23 </key>

However, Nick on the other forum is asking:
<blockquote cite="Nick on Kriesi support forum">Ask Harshad if the php file he sent you accepts: (a) transient option fields and whether they should be added

He also gave me this file (http://pastebin.com/1jRS8XWh) to try to replace the theme's original xml file, but it doesn't work 🙁

April 3, 2013 at 3:31 pm #116801


Dear Michele,

The pastebin url is not working at my side, can you email me the file to my email address?

Also can you please send me your ftp and wp-admin details, I will try to execute the file and create code.

April 5, 2013 at 2:25 pm #117314


Dear Harshard,

I sent you an email with the details you asked for.
In the mean time, the latest xml I generated (hidden link ) activated a lot of new strings in the WPML > String translation menu.

I tried translating the item that seems nearer to my problem, which is an item named "[avia_options_flagship][avia]portfolio-slug", whose string is "prodotto" (italian for "product"), that is the one I placed into my theme options (see screenshot in the previous post). However, I can't see how this could solve the issue and in fact it doesn't.

What is your expectations about what to do next?

I will now try not to touch anything else so you can see everything with your own eyes via FTP and wp-admin.

April 6, 2013 at 7:20 am #117459


Dear Michele,

I have checked the file and code seems to be correct, I went to WPML -> String Translation, enabled "Disable auto-register string" option, deleted the "Prodotto" translation and translated it again.

Can you please check if its now displaying the translated text on website front?

April 6, 2013 at 8:37 am #117462


Dear Harshad,

I'm not sure where exactly I should check to see if the translated text is displayed correctly.
Certainly, this fix did not solve the portfolio display issue.

You could also see it yourself by going to pages like:
hidden link (translated into hidden link )
hidden link (tr. into hidden link )
hidden link (tr. into hidden link )
and trying deactivating WPML.

April 6, 2013 at 11:22 am #117468


Dear Michele,

Did you translate the portfolio categories from Portfolio Items -. Portfolio categories.

If yes, then you will have to search for category id's from string translation and add the translated English Category id in wpml -> string translation.

April 10, 2013 at 8:09 pm #118377


Dear Harshad,

I took a step back.
You can see how I proceeded in the Kriesi support forum here: hidden link.

Since a fresh install shows no compatibility problem between Flagship theme and WPML, I decided to understand when things broke for me in the first place.

So I reverted to the original DB backup that I made before even starting the migration from qTranslate to WPML, when everything was working fine.

I used a plugin (your qTranslate importer with WPML disabled) to clean wp_posts content from qTranslate junk.

FYI, qTranslate simply translates content using this structure:

<!--:it-->Some text in Italian<!--:--><!--:en-->Some text in English<!--:-->

and selectively displays the right content based on the language you choose. I discovered later that this approach is too basic and does not allow for a complete translation of a website based on the Flagship theme.
The cleaning was simple. After that, I checked all around the wp-admin for stuff that still had the qTranslate syntax, and in the end I directly searched the database to find any occurrence of the :it/:en structure and fixed them manually. Also, I deleted the freshly created entries in the wp_postmeta table that assigned a _qt_cleaned meta information to all the posts that were cleaned.

At this point, my DB looks fine, or at least there is a perfectly reasonable number of records and the ones I can understand make sense.

Here, I activate WPML. Just activate it. It means it just creates a bunch of db tables but doesn't actually do anything to the functionality of the site (i.e. the portfolio display works).
--> I made a DB backup here

Now, I start the setup. Which means I open WPML settings in the admin area and it asks me which is the main language. Italian is already selected, and I click "Next".

BAM! Now, and from now on, the portfolio display is broken.
--> Second DB backup here

I ran a diff software to see what changes. At this point, my knowledge is no longer enough to understand what is getting broken, but I hope someone else's could be.
You can download the diff "report" along with the two DB exports (just before and just after the key moment) here: hidden link (I'm now going to email you this, too)

Please, I'd like to have your opinion on this. I think this is as deep as I can get trying diagnosing the problem.



April 15, 2013 at 3:57 am #119211


Dear Michele,

Sorry for delay, I have checked your DB, when you do a clean install are contents will get clubbed into Default language, So in your case if its Italian, All posts.pages/categories will be displayed only when you select Italian on frontend.

I suggest you to re-run the importer script, And wait until you see the screen attached in screenshot.

Please follow the steps given in below link

May 7, 2013 at 6:48 pm #125569


Thanks Harshad,

The first time I ran the importer I saw that screen, and I also copied the content into the .htaccess file.
It was still problematic.

However, thanks for your support.
The client and I decided to go online with Italian only for the moment, and review later the possibility of adding the second language. For that, we'll probably make a fresh install and do "all" from scratch.