• Resolved kotkotan

    (@kotkotan)


    Hi, I’m using native Oxygen Builder dynamic fields to show date in the posts like [oxygen data=’date’]. Relevanssi can’t show results when I’m seeking dates, for example “02.11.2021” or “02.11”, etc…

    I think all settings is correct:
    Custom fields – some – ct_builder_shortcodes
    Index is rebuilded
    Decimal separators – Keep

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mikko Saari

    (@msaari)

    At the moment Relevanssi can’t index the dynamic data tags. Quite the contrary, Relevanssi removes them before indexing, because if they are not removed, the post content isn’t indexed correctly. Even if the [oxygen data="date"] tag would remain, it’s not a real shortcode that would get expanded when indexing.

    If indexing the post date is important, you can do that in other ways. If it’s just the post publication date, this snippet does that:

    add_filter( 'relevanssi_content_to_index', 'rlv_index_post_date' );
    function rlv_index_post_date( $content ) {
      return $content . ' ' . get_the_date( 'j.n.Y' );
    }
    Thread Starter kotkotan

    (@kotkotan)

    Ii will be excellent if I can search by dates.
    Byt where to insert that code?

    Plugin Author Mikko Saari

    (@msaari)

    I’m not sure what’s the best place in Oxygen; I’ve used Code Snippets with Oxygen myself.

    Thread Starter kotkotan

    (@kotkotan)

    Many thanks for your help! it is working now!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Oxygen Builder Dynamic data not working’ is closed to new replies.