• technofrolics

    (@technofrolics)


    Hello. As background, I am a new user of your plugin.
    
    For a variety of reasons, my site often uses Divi Code modules rather than Text modules — even in cases where most of content is just CSS styled text that I hope to be searchable.
    
     If I have a Page or a Post containing simple Text module with content "Text", Relevanssi finds "Text" fine.
    
     However, the equivalent thing in the Code module "Code", Relevanssi fails to find "Code".
    
    (I noticed in the Text module tags of "<!-- wp:paragraph --> <!-- /wp:paragraph -->" and tried adding them manually to the Code module — no help.)
    
    I went into the Relevanssi settings and debugger and WordPress Admin search and:
    
    a) Indexed every possible thing I could.
    
    b) Disabled " Respect exclude_from_search for custom post types".
    
    c) Tried with "Use Relevanssi for admin searches." when Admin searching.
    
    No change in behavior — Admin Search finds "Text" but not "Code".
    
    I went to Relevanssi Debugger to look at post contents. Both "Text" and "Code" are present in database.
    
    I examined the two entries, but could not immediately see the difference between them that Relevanssi might be using to filter out one but not the other.
    
    Questions:
    
    1) Is there something simple-ish I could do to allow text content within Code modules to be searchable in the same way as within Text modules? Automatically doing things "properly" would be best, but even if I could do manually by surrounding text blocks within Code module with some tag would be helpful.
    
    2) Am I correct that Relevanssi is doing some pretty serious pattern matching to remove CSS code from what it is matching, and that that same nice functionality would apply to the Code module as is already confirmed by me to be happening in the Text module?
    
    PS I saw in your prior Forum responses "relevanssi_content_to_index" but am not enough of a coding expert within the context of WP/Divi/Relevanssi to know how I might use it…
    
    Thank you.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Relevanssi indeed automatically removes the [et_pb_code] shortcodes when indexing because usually, the contents can be problematic in indexing.

    There’s a filter hook relevanssi_page_builder_shortcodes that controls which shortcodes are removed. You can use that filter hook to remove [et_pb_code] from the list of removed shortcodes – it’s the first entry in the array – and then Relevanssi will index the code elements.

    Thread Starter technofrolics

    (@technofrolics)

    Thanks much for the super quick response! (Been working on stuff — potentially more to follow, but wanted to thank you prior.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Not finding text content in Divi Theme Code module.’ is closed to new replies.