Title: What value should I insert in code
Last modified: December 12, 2022

---

# What value should I insert in code

 *  Resolved [xCelestialx](https://wordpress.org/support/users/samvel45/)
 * (@samvel45)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/what-value-should-i-insert-in-code/)
 * Hello Guys. I just got code from Relevanssi support to make it work proper with
   polylang.
 *     ```
       add_filter( 'relevanssi_content_to_index', 'rlv_polylang_sync', 10, 2 );
       function rlv_polylang_sync( $content, $post ) {
         $language = pll_current_language() === 'en' ? 'fi' : 'en';
         $translated_post_id = pll_get_post( $post->ID, $language );
         if ( $translated_post_id ) {
           $translated_post = get_post( $translated_post_id );
           $content        .= ' ' . $translated_post->post_content;
           $content        .= ' ' . $translated_post->post_title;
         }
         return $content;
       }
       ```
   
 * So how value will look like if I want to add row ` $content .= ‘ ‘ . $translated_post-
   >post_title; to make code count some custom fields and replace post_title with
   that value(the custom field ID is ‘occupation’). Thanks in advance.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwhat-value-should-i-insert-in-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * (@rilwis)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/what-value-should-i-insert-in-code/#post-16285539)
 * Hi [@samvel45](https://wordpress.org/support/users/samvel45/) ,
 * Would you mind asking Relevanssi team for help? I’m not clear about your issue
   and you were asking Relevanssi before, so it’s best to ask them to continue to
   support.
 *  Thread Starter [xCelestialx](https://wordpress.org/support/users/samvel45/)
 * (@samvel45)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/what-value-should-i-insert-in-code/#post-16285680)
 * Thanks for attention. Maybe you dont got question right.The thing is I ask for
   meta box value. For example post_title is core wordpress value to call post title.
   So I ask what is metabox plugin’s call value. Is it get_rwmb or what is that?
   There is nothing related to relevanssi in this question, I just ask is there 
   any default field key,value or something like post_title or post_excerpt in metabox,
   but for certain field.
 *  Plugin Author [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * (@rilwis)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/what-value-should-i-insert-in-code/#post-16285703)
 * If you want to get value of custom fields created by Meta Box, please see this
   docs:
 * [https://docs.metabox.io/displaying-fields-with-code/](https://docs.metabox.io/displaying-fields-with-code/)
 *  Thread Starter [xCelestialx](https://wordpress.org/support/users/samvel45/)
 * (@samvel45)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/what-value-should-i-insert-in-code/#post-16286337)
 * Thanks. According to this link rwmb_meta should work, but it doesnt. Adding id
   to that not only dont work, but disables search indexing. Maybe there is other
   key similar to that that can work?
 *  Plugin Author [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * (@rilwis)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/what-value-should-i-insert-in-code/#post-16287675)
 * Using rwmb_meta() is correct. I guess it depends on what field you want to get
   data for and for what post.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘What value should I insert in code’ is closed to new replies.

 * ![](https://ps.w.org/meta-box/assets/icon-128x128.png?rev=1100915)
 * [Meta Box](https://wordpress.org/plugins/meta-box/)
 * [Support Threads](https://wordpress.org/support/plugin/meta-box/)
 * [Active Topics](https://wordpress.org/support/plugin/meta-box/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/meta-box/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/meta-box/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/what-value-should-i-insert-in-code/#post-16287675)
 * Status: resolved