hugolaporte
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Forms for ACF] Change submit_text for all formsGot it ! Thanks.
Forum: Plugins
In reply to: [Polylang] Redirection qui ne fonctionne plusDans tes Réglages > Général as-tu changé les deux adresses pour des https ?
- This reply was modified 9 years, 3 months ago by hugolaporte.
Forum: Plugins
In reply to: [Advanced Custom Fields (ACF®)] Translate ACF Select choices with polylangI found a solution that worked well for me.
1. Register every choices in your functions.php
<?php pll_register_string("one", "One", "group" ); pll_register_string("two", "Two", "group" ); pll_register_string("three", "Three", "group" ); ?>2. Show the translated value on your theme page
<?php $my_field_name = get_field_object('my_field_name'); //Get the object $value_my_field_name = get_field('my_field_name'); //Get the value pll_e($my_field_name['choices'][$value_my_field_name]); //Translate the selected value ?>3. Go to Settings > Languages > Strings translations and translate.
- This reply was modified 9 years, 3 months ago by hugolaporte.
- This reply was modified 9 years, 3 months ago by hugolaporte.
- This reply was modified 9 years, 3 months ago by hugolaporte.
- This reply was modified 9 years, 3 months ago by hugolaporte.
- This reply was modified 9 years, 3 months ago by hugolaporte.
Forum: Plugins
In reply to: [Advanced Custom Fields (ACF®)] Translate ACF Select choices with polylang+1
Forum: Plugins
In reply to: [Explanatory Dictionary] Updated plugin to 4.1.5 and got this fatal errorI got the same error.
Forum: Hacks
In reply to: AJAX Requests in plugins since wp 3.9Sorry the problem is me 🙂 . I miss the part “wp_ajax_nopriv_my_action” for logged-out users.
Nevermind. I found your pll_get_term() function. So I made this:
$en_cat_array = array(); foreach ($post_categories as $cat){ $en_cat_array[] = pll_get_term($cat, 'en'); }Thanks a lot for your help and great plugin Chouby
Ok I found my solution for custom fields.
$cf = get_post_meta($fr_post_id, 'cf', true); update_post_meta ($post_id, 'cf', $cf);Only need a clue to associate the category with the right translation here:
'post_category' => $post_categoriesForum: Plugins
In reply to: [Polylang] Footer MenusManage Locations is a tab inside the “Appearance > Menus” page.
Maybe because your footer menu is in a widget. If it’s the case, go to “Appearence > Widgets” and find your menu. You can define the language there.
Thanks Chouby! Exactly what I was looking for. I’ve done it like this so far. Just wondering how to retrieve the synchronized categories and synchronized post fields:
$args = array( 'post_type' => 'post', 'orderby' => 'ID', 'order' => 'asc', 'post_status' => 'publish', 'posts_per_page' => -1, ); query_posts($args); while ( have_posts() ) : the_post(); $fr_post_id = get_the_ID(); $post_categories = wp_get_post_categories( $fr_post_id ); $post = array( 'post_title' => get_the_title(), 'post_content' => get_the_content(), 'post_status' => 'publish', 'post_author' => get_the_author(), 'post_category' => $post_categories // HOW TO GET THE SYNCHRONIZED CATEGORIES ? ); global $polylang; $post_id = wp_insert_post($post); $post_en = $polylang->model->set_post_language($post_id, 'en'); $polylang->model->save_translations('post', $post_id, array('fr' => $fr_post_id)); endwhile; wp_reset_query();Forum: Plugins
In reply to: [Polylang] New repertory for my properties in french?Hedley7d, It looks like ‘property’ is a post type slug. I do not recommend that you translate it. But if you really want to do it you can try this :
Permalinks settings: Post name
If you are using a static front page : Yes
Polylang settings :- The language is set from the directory name in pretty permalinks
- Hide URL language information for default language: checked
- Remove /language/ in pretty permalinks
- Media: checked
- All syncronyzed : checked
Forum: Plugins
In reply to: [Polylang] Footer MenusHi, go to “Appearance > Menus > Manage Locations” and define a menu for each language.
If you don’t have a menu for your second language, create a new one.
Forum: Plugins
In reply to: [Polylang] New repertory for my properties in french?Salut. It depends on what represent “property” in your realexpert theme. Is that a Category base? Post type? Category? Tag?
What is the “permalink > settings” that you use ?
And what is the “Settings > Languages > Settings > URL modifications” that you use ?Forum: Plugins
In reply to: [Polylang] Polylang makes my logo disappearCan not see your site. The username/password for your database is wrong.
Could you explain where you uploaded your logo? Theme options? After the activation of polylang you probably had new options to define a language for your logo. If it’s the case, upload a logo for each language that you have and define the proper language on each. Check on your theme documentation if there is something about the theme translation.