Results page and Custom URL

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Results page and Custom URL

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

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #12775
    amitnema
    amitnema
    Participant

    Hi,

    Thank you very much for the great plugin. It really works well. I am trying to create a user search website for my classmates.

    I am having difficulties in getting the search output on the results page or to a custom URL. The live search and redirect to first match result option setting on ‘Logic and Behavior’ works perfectly. However, if I select the options of results page, the output is a post like page on which clickable search results appear but on clicking on the search results, the link is redirected incorrectly. Also, the custom URL displays non-clickable result output.

    Here are few search words for testing: Tennis, Columbia Business School, Williamsburg.

    I have attached a detail document with the desired output of the results layout and the current outputs of the results page. Please let me know how I can implement the results page as shown in the attachment. Thanks in advance!

    Best,
    Amit

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

    Hi Amit,

    Thank you very much for your kind words!

    It looks like the results override is working only partially there. The plugin is able to display the results on the results page, but somehow the URLs are not going through. Can you please also provide temporary FTP access? I will have to debug through the plugin and the theme code to see why is that happening.

    The results page layout however is fully controlled by the theme you are currently using. The plugin can only replace the results from the default search, but the layout is controlled by the theme. Usually the search.php file is handling the output, in the currently active theme directory.

    Best,
    Ernest Marcinko

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


    #12794
    amitnema
    amitnema
    Participant
    You cannot access this content.
    #12796
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Amit,

    Thank you very much, I was able to find and fix the issue. The links on the results page should be okay now. I’m including this patch in the upcoming update as well, so you don’t have to worry about it anymore.

    Best,
    Ernest Marcinko

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


    #12797
    amitnema
    amitnema
    Participant

    Hi Ernest,

    Thanks. Does this fix also resolve the custom URL issue? I would like to display the results as per the attachment in my first message. I have configured the results page by using your plugin shortcodes on http://www.smartwords.co/results/ ‎. Sending the attachment again.

    Best,
    Amit

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

    Hi Amit,

    That’s not exactly related. It’s not possible in WordPress to redirect the results to a certain page, it works differently. What you can do is change the search URL, but the resolver (search.php file in the theme directory) stay the same. You will have to add some extra code, so wordpress knows how to resolve it. Here is a tutorial: http://wpengineer.com/2258/change-the-search-url-of-wordpress/

    It details 2 different methods. Once that is done, you should make a search.php file in the theme directory, as it will be responsible for printing the results. If that is not present, then the index.php is used. Please refer to: Template Hierarchy

    After the redirection is working, and the handler is displaying the results, then you can change the URL to a custom url on the Ajax Search Pro back-end.

    If you are not too experienced with WordPress, I would suggest asking someone. And don’t forget to have back-ups of everything, before you start editing theme files, just in case.

    Best,
    Ernest Marcinko

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


    #12800
    amitnema
    amitnema
    Participant
    You cannot access this content.
    #12837
    amitnema
    amitnema
    Participant
    You cannot access this content.
    #12847
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Amit,

    The reason why there are no results for thos items is because they are not stored as attachments, but as a custom post type ‘um_docs’: https://i.imgur.com/dS1vHen.png

    When I selected that post type, searching for ‘XYZCBS’ yielded the result as it shoud. Content of the documents are however not searchable, and very possibly it won’t be possible in the near future. There is something in development, but there are many issues regarding indexing .pdf files correctly.

    One other problem is that the post type URL for the downloads appears to be returned incorrectly, so WordPress returns an URL to a page which does not seem to be exist. I’ve added the following custom code to the bottom of the functions.php file in your theme directory to resolve that:

    I will leave it here for future reference.

    Best,
    Ernest Marcinko

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


    #12955
    amitnema
    amitnema
    Participant
    You cannot access this content.
    #12963
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Amit,

    I completely forgot about the results page override. I’ve made an addition, so the results page URLs are overwritten as well. So the previous code is changed to:

    It should link to the correct downloads now.

    Best,
    Ernest Marcinko

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


    #12980
    amitnema
    amitnema
    Participant
    You cannot access this content.
    #12994
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Amit,

    The plugin does not affect that page layout in any way. I’m not sure how you made that page template, but there is a chance that it’s not programmed correctly. The plugin only pushes the results towards the template, the layout and the elements are all printed by the theme – the plugin cannot affect that.

    If there are missing elements, links etc.. it is probably due to a programatical error within the newly created template file.

    Best,
    Ernest Marcinko

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


    #13000
    amitnema
    amitnema
    Participant
    You cannot access this content.
    #13030
    amitnema
    amitnema
    Participant
    You cannot access this content.
Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.