• Resolved Dennis Bareis

    (@dbareis)


    Hi,

    Using a plugin or the “search_metadata()” function you can make standard wordpress search PODS custom fields.

    My issue is with the search results only containing the title followed by “CONTINUE READING“.

    I thought the code from “here” and “here” was the solution for this but the function is not called UNTIL you click on search results and even then the is_search() and is_pod() is never true.

    I have seen other code for “the_excerpt” but I’m guessing that is just a variation on this code (both post content & excerpt are supposed to display in the results”.

    To clarify, I have no post content or excerpt (although I have tried the latter), I wish to dynamically generate the text for the excerpt or whatever displays. Otherwise, I’ll have to fill in the excerpt when saving the pod.

    Anyone got this working?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Did you check whether you are actually in a look? These “is_##” functions only work inside the loop. It could be a theme issue if it uses the loop differently in a search page.

    it could also be thet the_content or the_excerpt is not used.

    Cheers, Jory

    Thread Starter Dennis Bareis

    (@dbareis)

    @keraweb Thanks for the response.

    I’m assuming “loop”, the code was from your PODs website. In any case I got it working just not the way I wanted:

    Add Excerpt to pod supports.

    Copied and modified code to fix it’s issues (possibly also on your website) to programmatically fill in the Excerpt field after the pod is saved:

    e.g. WordPress won’t let me insert code (by keyboard or mouse).

    Thread Starter Dennis Bareis

    (@dbareis)

    The code to search custom fields and display automatically generated excerpt is here: https://dennis2centsworth.blogspot.com/2023/05/enable-wordpress-to-search-custom.html

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search Results for PODS only Shows Post Title & CONTINUE READING’ is closed to new replies.