This user has no favorite topics.
Favorite Forum Topics
Forum Topics Created
状态 |
Topic
|
Supporter | Voices | 文章 | Freshness |
---|---|---|---|---|---|
Language urls showing up in main site map
1
2
Started by: xiaoweiX
in: English Support
Problem: /* * WPML Workaround for compsupp-6571 */ add_filter('rank_math/sitemap/entry', 'wpml_compsupp6571_remove_sitemap_entry_from_different_domain', 10, 3); function wpml_compsupp6571_remove_sitemap_entry_from_different_domain ( $url, $type, $object ) { if (! class_exists('SitePress') || apply_filters( 'wpml_setting', false, 'language_negotiation_type' ) != 2 ) { return $url; } $current_language = apply_filters( 'wpml_current_language', NULL ); if ($type == 'post') { $post_language_details = apply_filters( 'wpml_post_language_details', NULL, $object->ID ) ; if ( isset($post_language_details['language_code']) && $post_language_details['language_code'] != $current_language) { return false; } } elseif ($type == 'term') { $args = array('element_id' => $object->term_taxonomy_id, 'element_type' => $object->taxonomy ); $term_language_details = apply_filters( 'wpml_element_language_details', NULL, $args ) ; if (isset($term_language_details->language_code) && $term_language_details->language_code != $current_language) { return false; } } return $url; } After implementing this code, the sitemap should correctly exclude entries from languages other than the current one. We confirmed that the solution works by checking the sitemap at https://staging.newtimeshair.com/product_cat-sitemap1.xml. |
|
3 | 23 | 1 years, 3 months前 | |
product featured image
Started by: xiaoweiX in: English Support |
|
2 | 2 | 1 years, 8 months前 | |
cURL error 28: Operation timed out after 45001 milliseconds
Started by: xiaoweiX in: Chat Support |
|
1 | 2 |
1 years, 8 months前
|
|
get taxonomy translation with API
Started by: xiaoweiX in: English Support |
2 | 3 | 1 years, 9 months前 | ||
Trying to translate the shipping method title provided by this plugin
Started by: xiaoweiX in: Chat Support |
|
1 | 2 |
1 years, 9 months前
|
|
programatically loading a translated taxonomy
Started by: xiaoweiX in: English Support |
|
2 | 2 | 1 years, 9 months前 | |
where does WPML store translated taxonomy data – such as product attribute terms?
Started by: xiaoweiX in: Chat Support |
|
1 | 2 |
1 years, 9 months前
|
|
when I delete a product attribute value in original language, will its translated counterparts be deleted too?
Started by: xiaoweiX in: Chat Support |
|
1 | 2 |
1 years, 9 months前
|
|
wpml slow queries
Started by: xiaoweiX in: English Support |
|
2 | 2 | 1 years, 9 months前 | |
Currency switcher using Javascript
Started by: xiaoweiX in: Chat Support |
|
1 | 2 |
1 years, 9 months前
|
|
Using Javascript to change the currency in WCML
Started by: xiaoweiX in: Chat Support |
|
1 | 2 |
1 years, 9 months前
|
|
Problem with editing the page using Elementor editor in secondary languages
Started by: xiaoweiX in: Chat Support |
|
1 | 2 |
1 years, 9 months前
|
|
large amount of wpml related records in wp_postmeta table
Started by: xiaoweiX in: English Support |
|
2 | 7 | 1 years, 9 months前 | |
database deadlock
Started by: xiaoweiX in: English Support |
|
2 | 4 | 1 years, 10 months前 | |
first menu item is pointing to the wrong site.
Started by: xiaoweiX in: English Support |
|
2 | 7 | 1 years, 11 months前 |