This user has no favorite topics.
Favorite Forum Topics
Forum Topics Created
| Status |
Topic
|
Supporter | Voices | Posts | Freshness |
|---|---|---|---|---|---|
|
Split: The web server reported a bad gateway error
Started by: johnH-55 in: English Support |
|
0 | 13 | 1 month ago | |
|
WPML Menu Sync never completing
1
2
3
Started by: johnH-55
in: English Support
Problem: Solution: get_menus_tree function in the sitepress-multilingual-cms/inc/wp-nav-menus/menus-sync.php file. The suggested code adjustment involves using transients to store menu data temporarily, which helps in managing the load during synchronization. Here is the code snippet provided: function get_menus_tree() {
global $sitepress, $wpdb;
$menus = $wpdb->get_results(
$wpdb->prepare(
"
SELECT tm.term_id, tm.name FROM {$wpdb->terms} tm
JOIN {$wpdb->term_taxonomy} tx ON tx.term_id = tm.term_id
JOIN {$wpdb->prefix}icl_translations tr ON tr.element_id = tx.term_taxonomy_id AND tr.element_type='tax_nav_menu'
WHERE tr.language_code=%s
",
$sitepress->get_default_language()
)
);
if ( $menus ) {
foreach ( $menus as $menu ) {
$menuproc = get_transient("menu_term_id". $menu->term_id );
if (empty($menuproc)) {
$this->menus[$menu->term_id] = array(
'name' => $menu->name,
'items' => $this->get_menu_items($menu->term_id, true),
'translations' => $this->get_menu_translations($menu->term_id),
);
set_transient("menu_term_id". $menu->term_id, $this->menus[$menu->term_id] );
} else {
$this->menus[$menu->term_id] = $menuproc;
}
}
$this->add_ghost_entries();
$this->set_new_menu_order();
}
}We advised the client to implement this change on a staging site first to ensure everything functions correctly without disrupting the live site. If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, please visit our known issues page and check for any updates. We also recommend ensuring that you have the latest versions of themes and plugins installed. If the problem persists, do not hesitate to open a new support ticket. |
|
0 | 33 | 1 month, 1 week ago | |
|
Delete media translation
Started by: johnH-55
in: English Support
Problem: Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem continues, please open a new support ticket. |
|
0 | 4 | 3 months, 3 weeks ago | |
|
SyntaxError: Failed to execute ‘json’ on ‘Response’: Unexpected end of JSON input
Started by: johnH-55
in: English Support
Problem: If this solution does not resolve the issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket at WPML support forum for further assistance. |
|
0 | 6 | 4 months ago | |
|
Translate URL in custom post type content
Started by: johnH-55 in: English Support |
|
1 | 7 | 8 months, 2 weeks ago | |
|
import XLIFF files
Started by: johnH-55 in: English Support |
|
1 | 8 | 10 months, 3 weeks ago | |
|
Custom link description translation
Started by: johnH-55 in: English Support |
|
0 | 9 | 11 months, 2 weeks ago | |
|
String translation for homepage at cs-CZ not working, while other pages and homepages in other langu…
Started by: johnH-55 in: English Support |
|
0 | 4 | 1 year, 2 months ago | |
|
Managing relations and structure update when EN-US -> FR-FR (translation) -> FR-BE (duplicate)
Started by: johnH-55 in: English Support |
|
0 | 9 | 1 year, 3 months ago | |
|
WPML Media Translation
1
2
Started by: johnH-55
in: English Support
Problem: apply_filters('wpml_object_id', $mediaID, 'attachment', true); function to ensure that the media ID is correctly translated, which should resolve the issue with the inactive button and the incorrect display of images. Here is a step-by-step guide: apply_filters function to get the translated media ID. If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum for further assistance. |
|
1 | 17 | 1 year, 3 months ago | |
|
I need to retrieve posts in different language than current
Started by: johnH-55
in: English Support
Problem: get_terms function returns terms from all WPML languages instead of just the desired one. get_terms returns terms only for the desired WPML language, follow these steps: do_action('wpml_switch_language', $language_code) function to switch to the desired language. get_terms call to filter by the desired language using apply_filters('wpml_object_id', $term->term_id, 'category', true, $language_code). function get_terms_for_language($taxonomy, $language_code) {<br /> if (function_exists('apply_filters')) {<br /> do_action('wpml_switch_language', $language_code);<br /> $terms = get_terms(array(<br /> 'taxonomy' => $taxonomy,<br /> 'hide_empty' => false,<br /> ));<br /> $filtered_terms = array();<br /> foreach ($terms as $term) {<br /> $translated_term_id = apply_filters('wpml_object_id', $term->term_id, $taxonomy, true, $language_code);<br /> if ($translated_term_id) {<br /> $translated_term = get_term($translated_term_id, $taxonomy);<br /> if ($translated_term) {<br /> $filtered_terms[] = $translated_term;<br /> }<br /> }<br /> }<br /> return $filtered_terms;<br /> } else {<br /> return get_terms(array(<br /> 'taxonomy' => $taxonomy,<br /> 'hide_empty' => false,<br /> ));<br /> }<br />}<br /><br />// Example usage<br />$site_id = 2; // en-CA site<br />$locale = 'en_CA';<br />$taxonomy = 'category'; // Example taxonomy<br />$language_code = 'en';<br /><br />switch_to_blog($site_id);<br />switch_to_locale($locale);<br /><br />$terms = get_terms_for_language($taxonomy, $language_code);<br /><br />restore_current_blog();For further details, refer to the WPML documentation. If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at our support forum. |
|
2 | 2 | 1 year, 11 months ago | |
|
Menu sync not working correctly
Started by: johnH-55 in: English Support |
|
1 | 2 |
2 years, 1 month ago
|