• Resolved naturfreundeschweiz

    (@naturfreundeschweiz)


    We have the problem that only “normal” posts are showing up in the search results. So no sites and no custom post types. Search example: https://naturfreunde.ch/?s=%C3%A4mmital
    A custom post type should show up there.

    The posts DO show up with an admin search. On the frontend search page I do not see an error in the console. The Qury Monitor does seem to return a normal query but nothing shows up.

    SELECT DISTINCT(relevanssi.doc), relevanssi.*, relevanssi.title * 5 + relevanssi.content * 1 + relevanssi.comment * 0.75 + relevanssi.tag * 0.75 + relevanssi.link * 0 + relevanssi.author + relevanssi.category * 0.75 + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf
    FROM wp_relevanssi AS relevanssi
    WHERE (relevanssi.term LIKE 'aemmital%'
    OR relevanssi.term_reverse LIKE CONCAT(REVERSE('aemmital'), '%'))

    I tried to add

    var_dump( $posts );
    exit();

    to the search.php file but I do not see any results – or I’m looking in the wrong plance. Do you have any idea what it could be?

    Thank you in advance.

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

    (@msaari)

    There are no post type restrictions in the query, so it should work. Have you set Relevanssi to index the custom post types? If you look at a custom posts in the Relevanssi debugger, are they indexed well?

    Thread Starter naturfreundeschweiz

    (@naturfreundeschweiz)

    Thank you for the fast answer! And sorry I forgote to write that. Yes the custom post types as well as pages are indexed and notexcluded from search (see screenshot 1). I also rebuild the index which worked flawlessly but the search results don’t change.

    The posts do show up correctly in the Relevanssi Debugger (see screenshot 2). This is the post I was expecting to see in my search above.

    Plugin Author Mikko Saari

    (@msaari)

    Since the Relevanssi admin search works as expected, the problem is in the theme, likely. Which theme are you using? What does the search results template file look like?

    Thread Starter naturfreundeschweiz

    (@naturfreundeschweiz)

    I’m terribly sorry – as you probably already thought the error lies with us. An experimental code snipped we used did a) not work and b) was pushed to the live site which it should not have.

    Thank you very, very much for your support and your time! I will leave a positive review which is the least I can do =)

    Plugin Author Mikko Saari

    (@msaari)

    Thanks for the review!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sites and custom post types do not show up in results’ is closed to new replies.