• Hi there…first of all, LOVE this plugin, absolutely awesome to work with right out of the box.

    Everything is working great for me using some Custom Post Types and Custom Fields (which were created using Custom Field Template plugin).

    The search results are returned when there is a hit within the custom field of my post types, but the only problem is there is no snippet! Snippets work for regular posts (naturally) and for page results, but not for custom fields, I just get the infamous three dots.

    I know its finding the individual words because when I use %total%, I can see how many hits it saw. But it won’t create the snippet (Custom Snippets is turned on).

    Any idea why this could be?

Viewing 6 replies - 31 through 36 (of 36 total)
  • Yes, you should, sorry about that.

    Hopefully its fine now…
    https://pastebin.com/iARLM1yG

    Can one of you tell me where this piece of code is supposed to go? Is it in the search page? a file in the plugin? where?

    Thanks

    Plugin Author Mikko Saari

    (@msaari)

    In functions.php.

    @ekajatik: The pasted code defines a filter (add_filter('relevanssi_excerpt_content', 'my_relevanssi_excerpt_content', 10, 3)). WordPress is looking for filters in plugins and in the theme’s function.php.

    Phew, this thread helped me out a lot. Thank you to David for your pastebin and msaari for your awesome plugin. This should be folded into the wp core, me thinks… ??

    Cheers,
    matt

    There’s a lot of great info here.. thanks fellas. Out of curiousity, has anyone here used Elliot Condon’s advanced custom fields. I’m using the ‘Repeater Field’ heavily and working on a solution to return the context specifically of an element in the ‘Repeater Field’ array that is the context of the hit.

    Any thoughts?

Viewing 6 replies - 31 through 36 (of 36 total)
  • The topic ‘Snippets not created from Custom Fields?’ is closed to new replies.