Title: apply_filter
Last modified: January 20, 2022

---

# apply_filter

 *  Resolved [madeforbrowser](https://wordpress.org/support/users/madeforbrowser/)
 * (@madeforbrowser)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/apply_filter/)
 * Hi, if use custom fields and apply the_content-filter to them, all translations
   break and the main page content is shown instead of the field content. Can u 
   help?

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

 *  Plugin Author [sbouey](https://wordpress.org/support/users/sbouey/)
 * (@sbouey)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/apply_filter/#post-15271595)
 * Hi,
 * Do you use ACF custom fields ?
    if in it you use the_content() it will probably
   make an infinite look can you use the get_the_content() filter. in this case 
   it’s not passed to Falang
 * Stéphane
 *  Thread Starter [madeforbrowser](https://wordpress.org/support/users/madeforbrowser/)
 * (@madeforbrowser)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/apply_filter/#post-15271620)
 * Hi yes, i i now know, that it is caused by the_content filter. If i use the_excerpt
   as filter, it works as expected and returns html. the get_the_content filter 
   works, too, but the html is broken..
 *  Plugin Author [sbouey](https://wordpress.org/support/users/sbouey/)
 * (@sbouey)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/apply_filter/#post-15271772)
 * The get_the_content is not filtered by Falang , do you know why it’s broken ?
   
   you can contact me directly too (faboba.com contact form)
 *  Thread Starter [madeforbrowser](https://wordpress.org/support/users/madeforbrowser/)
 * (@madeforbrowser)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/apply_filter/#post-15271863)
 * broken is a big word, i is just not returned as html. (The ul and li-Elements
   are not present) but the content is correctly returned.
    -  This reply was modified 4 years, 4 months ago by [madeforbrowser](https://wordpress.org/support/users/madeforbrowser/).
 *  Plugin Author [sbouey](https://wordpress.org/support/users/sbouey/)
 * (@sbouey)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/apply_filter/#post-15272885)
 * The problem was due to the loop for this display
 *     ```
        $menschen = get_posts(array('post_type'=>'mensch','posts_per_page'=>1000,'post_status'=>'publish'));
         foreach($menschen as $mensch):
       ....
        endforeach;
       ```
   
 * the filter the_content load the global post
 * you have to do this
 *     ```
       $menschen = get_posts(array('post_type'=>'mensch','posts_per_page'=>1000,'post_status'=>'publish'));
         foreach($menschen as $mensch):
   
          global $post;
          $post = get_post($mensch->ID);
          setup_postdata($post);
       .....
       .....
        wp_reset_postdata();
       endforeach;
       ```
   
 * Best regards,
    Stéphane
 *  Thread Starter [madeforbrowser](https://wordpress.org/support/users/madeforbrowser/)
 * (@madeforbrowser)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/apply_filter/#post-15272951)
 * Thank’s a lot. now it works exactly as expected 🙂

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

The topic ‘apply_filter’ is closed to new replies.

 * ![](https://ps.w.org/falang/assets/icon-256x256.png?rev=2351566)
 * [Falang multilanguage for WordPress](https://wordpress.org/plugins/falang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/falang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/falang/)
 * [Active Topics](https://wordpress.org/support/plugin/falang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/falang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/falang/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [madeforbrowser](https://wordpress.org/support/users/madeforbrowser/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/apply_filter/#post-15272951)
 * Status: resolved