This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Add page parent to results

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18784
    FluxFlux
    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 MarcinkoErnest 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.

    #18821
    FluxFlux
    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 MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.