Questo utente non ha argomenti preferiti.
Argomenti del forum preferiti
Argomenti del forum creati
Stato |
Argomento
|
Sostenitore | Voci | Post | Freschezza |
---|---|---|---|---|---|
WP Query post from one language on another
Iniziato da: jackc-12
in: English Support
Problem: wpml_switch_language function within a filter to list posts from the default language on a page translated to another language, and can't get the wpml_switch_language to work. Solution: wpml_switch_language action hook must be used with the pre_get_posts WordPress hook. This means that you should integrate the language switch into the query modification process. Here's how you can do it: 1. Use the pre_get_posts hook to modify the query before it runs. do_action('wpml_switch_language', 'all') to switch the language. For more details and usage examples, you can refer to the following documentation: Additionally, there are alternative approaches you can consider, such as: |
|
2 | 2 | 1 anno, 7 mese fa | |
Homepage translations not in sitemap
Iniziato da: jackc-12 in: English Support |
|
2 | 2 | 1 anno, 8 mese fa | |
Migrating from Polylan
Iniziato da: jackc-12 in: English Support |
2 | 2 | 1 anno, 9 mese fa | ||
WPML chat support ticket by jackc-12 – 1671115780
Iniziato da: jackc-12 in: Chat Support |
|
1 | 2 |
2 anno, 6 mese fa
|