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

---

# Adding a hook

 *  [jwill4l](https://wordpress.org/support/users/jwill4l/)
 * (@jwill4l)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/adding-a-hook-2/)
 * 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 (I use your plugin, of course), and in
   every basketball player profile, there is info (which I write with the wordpress
   text editor) about trades/transactions where the player has been involved in 
   the past. Like this:
 * – Date: PlayerA traded to TeamB for PlayerB.
 * I’m trying to filter the PlayerA, TeamB, etc text strings to link them to his
   profile. I know you guys give us the option to link the players, but it doesn’t
   work inside the profile info. I’m doing it like this:
 * `'PlayerA' => '<a href="http://mysite.com/playera/"><strong>PlayerA</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 the profile info inserted
   via WordPress editor.
 * I’m assuming I should add another filter changing ‘the_content’ with something
   specific to SportsPress.
 * Could you tell me which word should I replace ‘the_content’ with to make the 
   filter work on Sportspress profile info too?
 * Thanks in advance.
 * Cheers!
    -  This topic was modified 8 years, 5 months ago by [jwill4l](https://wordpress.org/support/users/jwill4l/).

Viewing 1 replies (of 1 total)

 *  [Roch](https://wordpress.org/support/users/rochesterj/)
 * (@rochesterj)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/adding-a-hook-2/#post-9866230)
 * Hi there!
 * Thanks for reaching out and for your kind words.
 * My name is Roch and I’m going to help you with your support issues.
 * As far as I know we don’t have specific hooks for that page, but I’ll leave this
   open to [@brianmiyaji](https://wordpress.org/support/users/brianmiyaji/) from
   our dev team to check.
 * Just one question though, why don’t you use shortcodes? I believe it would be
   a better solution for you, and easier to change in case you need adjustments 
   in the content itself in the future.
 * For example, you can use a shortcode [trade date=”XX” playera=”XX” teama=”XX”
   playerb=”XX” teamb=”XX”]
 * Thanks!

Viewing 1 replies (of 1 total)

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

 * ![](https://ps.w.org/sportspress/assets/icon-256x256.png?rev=1252005)
 * [SportsPress - Sports Club & League Manager](https://wordpress.org/plugins/sportspress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sportspress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sportspress/)
 * [Active Topics](https://wordpress.org/support/plugin/sportspress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sportspress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sportspress/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Roch](https://wordpress.org/support/users/rochesterj/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/adding-a-hook-2/#post-9866230)
 * Status: not resolved