Trying to exclude CPT from search results and include shortcode content in index

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Trying to exclude CPT from search results and include shortcode content in index

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 6 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #14268
    davisad
    davisad
    Participant

    I tried excluding the CPT from the Index Table (General Options), but it still displays it as a search result link. The CPT is utilized to add content that is displayed through shortcode. The CPT’s settings are set to Publicly Queryable = False and Exclude from Search = True. When I click on the search result it redirects to the homepage since the CPT doesn’t have an actual page/post to display content. For example: Specialized Mortgages.

    On the other side, the content of the shortcode needs to be read as content for the page it resides. For example: “Specialized loan programs” is part of the content of the page “Conventional Mortgages”.

    Are there possible solutions for these issues? Please advise. Thank you!

    Attachments:
    You must be logged in to view attached files.
    #14271
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Thank you for the proper details, it helps me a lot!

    The item highlighted on the screenshot is not actually a custom post type result, but it’s a category. I have also found another issue, where the index table engine was not choosen to be used. So, what I did was the following:
    – disabled the search in categories: https://i.imgur.com/oVYTVFt.png
    – enabled the index table: https://i.imgur.com/FKY6Khf.png

    I believe this is what you were looking for, and I’m getting the following results now for ‘specialized’ keywords: https://i.imgur.com/Zqm8t6y.jpg

    I hope this helps!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.