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

Result Links to Pages with Permalinks Not Working

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Result Links to Pages with Permalinks Not Working

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11373
    sschochsschoch
    Participant

    I am using the multisearch feature to return search results for two sites–site A, which contains the search box, and site B. Permalinks for site A are set to Post name. This is required by one of the other plugins I am using. Permalinks for site B are set to Default (page ID).

    The search successfully returns results from both sites. When I click links in the results for site A, they work fine; however, when I click links in the results from site B, they just go to site B’s home page. For example, when I click a result with the page name “Working with Themes,” it goes to this URL:

    [Help site path]/sample-page/00phoenix-working-with-themes/

    The correct URL is [Help site path]/?page_id=4093

    If I change site A’s permalink settings to Default (page ID), everything works fine; however, I am unable to do this because of the other plugin that requires Post name for permalinks.

    Please advise.

    #11401
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Interesting, looks like WordPress returns urls depending on how the currently active site is configured. This might be a core bug, as the get_permalink($id) call is used by ajax search pro to always get the correct links.

    I believe the best solution is to create filter to change the permalink in the results if the [Help site path] is detected in the URL pattern. I would recommend trying this code:

    Change the $url variable value to the help site url. If it’s detected in the final url, this snippet will try to change it to the regular non-permalink URL.
    I haven’t had a chance to test this code, so please be careful when editing the files.

    #11417
    sschochsschoch
    Participant

    Hi, Ernest:

    It worked! THANK YOU! I am pleasantly surprised at your helpful and PROMPT response. So appreciate your time.

    Regards, Stephanie

    #11418
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Result Links to Pages with Permalinks Not Working’ is closed to new replies.