Support » Plugin: WP FullText Search - The Power of Indexed Search » Custom Post Types not returned in search results

  • Resolved gary-SA

    (@garysharpahead)


    Hi,

    Love the search plugin, however, we’ve got 2 issues that we’re hoping you can help with.

    1. It doesn’t return results from any of our Case Studies, which are using a Custom Post Type.

    2. We’d applied a password to certain ‘sensitive’ PDFs, which before your most recent plugin update worked fine, however, we’ve noticed now anyone can open them without using the password.

    Many thanks in advance for any help.

    Gary

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 33 total)
  • Plugin Author Epsiloncool

    (@epsiloncool)

    Hi @garysharpahead
    Sometimes themes may limit the main WP_Query() request with post and page types only. In this case, you may check if the search works in WPFTS Sandbox (search test). Also, you can check if the particular custom-type post is indexed as well (using first input in Sandbox).

    According to password-protected PDFs it’s not very clear how it is linked with WPFTS. Yes, the plugin may publish direct URL to PDF files, but in case your protector is good, this URL should not show PDF directly for guests (redirecting to login page for example). Also you can switch title link to the attachment page instead, and then apply protection on this page.

    Hope this helps.

    gary-SA

    (@garysharpahead)

    Hi and thanks for getting back to me.

    We’re using Avada as the theme.

    As you suggested I’ve checked if the search works in Sandbox.

    I put the post ID of one of the Custom Post Types in the Index Tester and that returned a load of code from the post, it’s file attachment and it’s excerpt. So that seemed to be working.

    Secondly, I used a search term from that specific custom post in the Search Tester and it returned the post at the top of the list with 174% relevance.

    So all seems to be working well within the Sandbox area, but not on the frontend of the site.

    Any ideas?

    Many thanks,

    Gary

    Plugin Author Epsiloncool

    (@epsiloncool)

    Hi @garysharpahead
    I would propose to disable all plugins excerpt WPFTS and try frontend search to test if any plugin conflicting with WPFTS. If this not helps, then the Avada theme does something with wp_query() parameters.

    I will look for the Avada theme copy here and check it out. Thanks!

    gary-SA

    (@garysharpahead)

    Ok so I’ve deactivated all other plugins and the WPFTS still doesn’t show the desired results on the frontend.

    You had any joy with Avada on your end?

    Plugin Author Epsiloncool

    (@epsiloncool)

    Hi @garysharpahead

    I found the Avada theme code, checked it and I see lots of search options that can be justified in Theme Settings. Can not run the Avada theme live on my dev server, but
    what I can recommend is to disable the Avada integrated search option at all (if it is possible). There is a list of search post types somewhere in Avada Theme Settings, you need to include your custom post type there.

    For PDF: please go to WPFTS Settings, the tab Search & Output, scroll down to STEP #5 and disable these 2 checkboxes
    https://e-wm.org/i/E20200410-021639-001.png

    It will force WPFTS Pro to use attachment page links instead of direct PDF links. And thus your PDF protection will work.

    Let me know if it helps. Thank you!

    gary-SA

    (@garysharpahead)

    Hi

    So, I tried your suggestions. In Avada you can switch off the search limiter so it will basically search all pages, posts and custom posts etc. However, when I do this with your FullText Search plugin active it only seems to return PDFs in the search results, but when I deactivate your plugin it shows the custom post types, but obviously no PDFs. Any ideas?

    Also your solution for having the protected PDFs going to their attached page…they only seem to go to a 404 error page?

    many thanks

    Gary

    Plugin Author Epsiloncool

    (@epsiloncool)

    Hi @garysharpahead

    Please could you send me your email to info[-a-]fulltextsearch.org? I will send you a pre-release version of the WPFTS Pro with the fix we made. It should solve this issue with the Avada theme.

    Thank you!

    • This reply was modified 6 months, 1 week ago by Epsiloncool.
    gary-SA

    (@garysharpahead)

    I’ve sent over my email address.

    Does this pre release version fix both issues?

    Thanks

    Gary

    gary-SA

    (@garysharpahead)

    Also, and I don’t know if this is possible. Is there a way to exclude certain PDFs? Say for example any that had the word Manual, for example, training-02387873-manual.pdf

    Many thanks,

    Gary

    Plugin Author Epsiloncool

    (@epsiloncool)

    Hi, Gary

    It fixes the issue with not showing PDF with custom posts in search results.

    I can not repeat the problem with attachment pages – it works on my dev host. May you give me an example (a set of steps to follow) on your host so I can repeat this problem?


    For excluding some posts or attachments from the search it is better to use filtering on the search stage (not indexing). For this case I would recommend to add some tags/categories for those PDFs which should be shown in results (or otherwise, excluded from the search) and then set up a parameter to WP_Query to refine a search.

    gary-SA

    (@garysharpahead)

    Hi Epsiloncool,

    I’ve uploaded the pre-release version and it’s fixed the issue of custom posts not showing in Avada, which is great. So thanks.

    However, I’m still getting a 404 when I click on any of the PDFs in the search results. That’s with the ‘Direct Download Link’ and ‘Link Title to File Download’ switched off as suggested.

    Any ideas?

    Many thanks,

    Gary

    Plugin Author Epsiloncool

    (@epsiloncool)

    Hi Gary
    At least I should understand why it happens. May I see it somehow?

    I have installed the Avada theme on my dev server and try with these options switched off. Attachment page links work as expected, so I am sure it’s something around 3rd party plugins or theme config.

    You can see my dev server here: http://test1.fulltextsearch.org/?s=coffee

    Also, I could check what happens on your server via FTP and WP Admin, but I will need access.

    Plugin Author Epsiloncool

    (@epsiloncool)

    Hi @garysharpahead

    Do you have any solution for this? If not, you can give me more information so I can help you.

    Thanks!

    gary-SA

    (@garysharpahead)

    Hi Epsiloncool,

    What I’ve done is switch the ‘Direct Download Link’ and ‘Link Title to File Download’ checkboxes back on as the client is happy for them to open directly now.

    They just require the files to be password protected, which we can do individually on each file.

    Thanks for all your help. Fingers crossed that’s sorted everything now.

    cheers,

    Gary

    Plugin Author Epsiloncool

    (@epsiloncool)

    Ok, Gary, thank you!

    Be safe.

Viewing 15 replies - 1 through 15 (of 33 total)
  • You must be logged in to reply to this topic.