تخطي الملاحة

Open

Topic Tags: Compatibility

Overview of the issue

When using the Themify Ultra theme alongside the Post Type Builder (PTB) and performing a search through the top header search form, the dynamically displayed Custom Post Type (CPT) tags in the search results are not appearing translated.

Workaround

Please, make sure of having a full backup of your site before proceeding.

  • Open …/wp-content/themes/themify-ultra/themify/includes/search-box-result.php file.
  • Look for line 3.
  • Replace this:
                        $title=$type_obj->labels->singular_name;
    
  • With:
                        $wpml_default_lang = apply_filters('wpml_default_language', NULL );
                        $wpml_cpt_name = $type_obj->name;
                        $title= get_option('ptb_plugin_options')['cpt'][$wpml_cpt_name]['singular_label'][$wpml_default_lang];
    

2 ردود إلى “Themify Ultra - Search Box Results CPT Tags Not Translated”

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

    • Thanks for the heads up. It seems that you need to activate first the languages in Post Type Builder > Settings > Enabled Languages for that purpose.

ترك رد

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

يمكنك استخدام هذه العلامات:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>