Adding a hook
-
Hi there.
Once again, thanks for your awesome job! Your plugin saves my life everyday.
So, I want to give more navegability to my website. To do so, I’m adding a filter that replaces specific words with links to pages of my site which have content related to these specific words. So, instead of linking every word manually, I’m making it automatic, so to speak.
My site has basketball players profiles, and tables with the names of those basketball players, like this:
Player Name | Info | More Info
I’m trying to filter the Player Name text string to link it to his profile. Like this:
'Example' => '<a href="http://mysite.com/example/"><strong>example</strong></a>'And adding this filter (replace_text_wps is my handmade function to replace each word):
add_filter('the_content', 'replace_text_wps');Works perfectly fine everywhere on the site except on tablepress generated tables.
I’m assuming I should add another filter changing ‘the_content’ with something specific to tablepress.
Could you tell me which word should I replace ‘the_content’ with to make the filter work on Tablepress tables too?
Thanks in advance.
Cheers!
The topic ‘Adding a hook’ is closed to new replies.