Title: Adding a hook
Last modified: January 12, 2018

---

# Adding a hook

 *  Resolved [jwill4l](https://wordpress.org/support/users/jwill4l/)
 * (@jwill4l)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/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!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/adding-a-hook/#post-9857794)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Indeed, you would have to apply your search/replace to another filter as well.
   I recommend:
 *     ```
       add_filter('tablepress_table_output', 'replace_text_wps');
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [jwill4l](https://wordpress.org/support/users/jwill4l/)
 * (@jwill4l)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/adding-a-hook/#post-9857850)
 * Thanks Tobias!
 * It works perfectly fine.
 * Cheers! 🙂
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/adding-a-hook/#post-9857972)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](https://wordpress.org/support/plugin/tablepress/reviews/#new-post)
   here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding a hook’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/adding-a-hook/#post-9857972)
 * Status: resolved