Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

Tagged: 

This topic contains 25 replies, has 2 voices.

Last updated by Andreas W. 1 month, 1 week ago.

Assisted by: Andreas W..

Author Posts
February 16, 2024 at 10:09 am #15310827

axelL-4

Ok, sorry for the misunderstanding. I thought you wanted me to recreate the problem, which in my experience can be very complex and time consuming.

I have installed the Themify Ultra Theme and every other Themify plugin that runs on my site. If you need any other plugins, please let me know.

I look forward to hearing from you!

February 16, 2024 at 2:40 pm #15312106

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

To solve this issue the following code has to be replaced inside \themify-ultra\themify\includes\search-box-result.php on line 3:

if( $query->have_posts()):
    ?>
    <ul class="tf_search_tab">
        <li class="active"><a href="#all"><?php _e('All','themify')?></a></li>
        <?php foreach ( array_unique( $found_types ) as $type): ?>
            <?php
            switch ($type){
                case 'product':
                    $title=__('Shop','themify');
                    break;
                case 'post':
                    $title=__('Blog','themify');
                    break;
                case 'page':
                    $title=__('Page','themify');
                    break;
                default:
                   $type_obj = get_post_type_object( $type );                  
                   $string_name = "[ptb_plugin_options][cpt][" . $type_obj->name . "][singular_label]en";                                    
                    $title = apply_filters( 'wpml_translate_single_string', $type_obj->labels->singular_name, 'admin_texts_ptb_plugin_options', $string_name );
                    $type_obj=null;
                    break;
            }
            ?>
            <li><a href="#<?php echo $type ?>"><?php echo $title; ?></a></li>
        <?php endforeach; ?>
    </ul>

Take note, that this approach will only work if the CPT labels have been registered in English.

Please inform the author of Themify Ultra about this issue, as this compatibility code will need to be implemented directly into the theme.

February 16, 2024 at 4:54 pm #15312581

axelL-4

Thank you so much Andreas! I have shared your solution with Themify. Lets see what they have to say.

February 22, 2024 at 5:11 pm #15335071

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Could you please do me a favor an reinstall the Themify Ultra Theme on our test site?

The compatibility team would like to have a look at the original code of the theme and the currently installed version includes my workaround.

Please leave me a short message on this ticket once you have been able to complete this task.

Best regards
Andreas

February 22, 2024 at 6:22 pm #15335286

axelL-4

I guess since the Ultra Theme was already installed, you wanted me to update the Ultra Theme since there was a new update available? So I deleted the outdated Ultra Theme and reinstalled a fresh and up-to-date version. Is that what you wanted?

I also noticed that many of the Themify plugins are out of date. Do you want me to remove and reinstall them as well?

February 22, 2024 at 6:25 pm #15335318

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Yes, this would be great 🙂

What happened is that I applied my workaround to this installed theme and I do not exactly know how the file looked before I edited it.

The compatibility team is requesting those details.

Please install the latest version of the theme and the Post Type Builder (PTB) plugin.

Once you are done with this, please drop me a short comment on the ticket.

February 22, 2024 at 6:33 pm #15335330

axelL-4

Great, thanks for your quick reply! Now I understand - I was indeed a bit confused as to why you wanted me to reinstall it...

Everything is up to date now. I look forward to hearing about your findings. Have the Themify developers contacted you about this issue?

February 22, 2024 at 6:40 pm #15335339

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Thank you very much!

I have not received feedback from our team regarding our contact with Themify yet, but once they reply to me I will let you know.

February 28, 2024 at 5:49 pm #15355400

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

We informed the theme author about the problem and offered a solution.

Whether and when this solution will be integrated into the theme must be decided by the author.

You can find the errata on the topic here:
https://wpml.org/errata/themify-ultra-search-box-results-cpt-tags-not-translated/

April 2, 2024 at 8:49 am #15471525

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

The author of the Themify Theme provided us with the following feedback:

"The translation for CPT labels in Post Type Builder is done through Post Type Builder > Post Type edit. Under Post Type Builder > Post Type edit, you can choose the language translation input by clicking the flag icon. We’ve confirmed this is not a bug."

Could you please give this a try and let me know in case this does not work out for you?

Best regards
Andreas

April 13, 2024 at 10:58 pm #15515242

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I am following up on this ticket, as I did not hear back from you yet.

Could you please confirm if Themify's suggestion solved the issue for you?

If so, please do not hesitate to mark this ticket as solved.

Best regards
Andreas

The topic ‘[Closed] CPTs remain untranslated in front end in search’ is closed to new replies.