I am using ajax to load a custom search for a custom table filled with old data from another website in my wordpress database.

The search loads everything fine.

But there are old entries which were linked to their own glossary pages which of course don't work any longer. So I would like to just click on such a word and load the correct content from the database with ajax - like a glossary.

How could I change the links to use my ajax search and show up as the other search results in the same place?

the links look like search_url/wood

I am using:

wp_localize_script( 'search', 'this_ajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );

Would this something I can do in wordpress or would it be some jquery magic?

Thanks! AD

1 Answer 1


I just needed to create a second function in js defining what to do with a linked word.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.