Add page parent to results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Add page parent to results

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18784
    Flux
    Flux
    Participant

    Dear agent,

    I’ve got a question:
    I made different pages with the same name but under a different parent page. For example:
    – Education
    — Support

    – Certification
    — Support

    Now, when I search ‘Support’ I get double results saying ‘support’. It would be nice that it would show as: education > support or certification > support

    I see this is on the documentation page search but I can’t find the option and don’t know if this is possible for page hierarchy but I do hope this could be possible.

    Looking forward to your reply,

    Kind regards,
    Dirk

    #18794
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Dirk,

    I believe the easiest solution would be to use a custom code to get the parent post title, then add it to the child post.

    Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!

    This will add the parent page title before the child title in Parent > Child format.

    Best,
    Ernest Marcinko

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


    #18821
    Flux
    Flux
    Participant

    Dear Ernest,

    Thanks for your detailed reply. I’ve tested it and I works.

    I thank you for this fix! 😀

    Kind regards,
    Dirk

    #18826
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.