Title: Elementor rendered content
Last modified: October 18, 2024

---

# Elementor rendered content

 *  [leopoldpepichoc](https://wordpress.org/support/users/leopoldpepichoc/)
 * (@leopoldpepichoc)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/elementor-rendered-content/)
 * Hi,
 * i’m using Elementor to edit my content on my website. But in some specific pages
   I load custom model to display recurring datas.
   I need the content displayed 
   in these pages indexed as well (in fact i need to index content as it’s displayed
   on front).I tried to replace the content indexed with the content displayed by
   Elementor.
 *     ```wp-block-code
       add_filter('relevanssi_content_to_index', 'clean_elementor_content_for_relevanssi', 10, 2);function clean_elementor_content_for_relevanssi($content, $post){   // Check if Elementor is active and the post is built with Elementor    if (did_action('elementor/loaded') && \Elementor\Plugin::$instance->documents->get($post->ID)->is_built_with_elementor()) {        // Get the fully rendered Elementor content**BUG if I return dummy data there it's working (even when i return the $cleaned_content text when I log it **        $elementor_content = \Elementor\Plugin::$instance->frontend->get_builder_content($post->ID, true);**BUG if i return dummy data there it's NOT (nothing indexed for the post when using debugging tool) working **        // Clean the content by extracting only the visible text        $cleaned_content = extract_visible_text($elementor_content);        // Return the cleaned content for Relevanssi to index        return $cleaned_content;    }    // If not built with Elementor, return the original content    return $content;}
       ```
   
 * Do you have an idea what’s going on ?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/elementor-rendered-content/#post-18081953)
 * Sorry, but no idea. You’re using the filter correctly but I don’t know anything
   about the Elementor side of this. Perhaps Elementor support forums would be a
   better place to ask?

Viewing 1 replies (of 1 total)

The topic ‘Elementor rendered content’ is closed to new replies.

 * ![](https://ps.w.org/relevanssi/assets/icon-256x256.png?rev=3529670)
 * [Relevanssi - A Better Search](https://wordpress.org/plugins/relevanssi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/relevanssi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/relevanssi/)
 * [Active Topics](https://wordpress.org/support/plugin/relevanssi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/relevanssi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/relevanssi/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/elementor-rendered-content/#post-18081953)
 * Status: not resolved