Support » Plugin: Relevanssi - A Better Search » Set excerpt length

  • Resolved teeli



    Is it possible to set Relevanssi’s excerpt length through a function (or action, filter …)?

    I have website using Relevanssi and it has a mobile version using a separate mobile theme. I’d like the excerpt to be shorter on the mobile site than it is on the main site, instead of the same global setting for both themes.

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


    Yes, you can use the pre_option_relevanssi_excerpt_length and pre_option_relevanssi_excerpt_type filters. There’s no builtin filter hook in Relevanssi, but you can use the pre_option filters with any option in WordPress, it’s a very powerful feature.

Viewing 1 replies (of 1 total)
  • The topic ‘Set excerpt length’ is closed to new replies.