Search code examples
wordpresscontact-form-7

Where do I put hooks for Contact Form 7 on Wordpress?


I'm a complete Wordpress Newbie and I'm confused on exactly how hooks work. I've been trying to use Contact Form 7 to send information to an external database, and so far I've found a plugin that seems to do exactly that. But where exactly should I be putting this code?


Solution

  • In WordPress, you can add a hook or filter in two ways.

    1. Create your own plugin and add your code so whenever the site load or hook call the code will be executed.

    For example, the link you have added plugin.

    1. You can add the same code in your theme file function.php

    Both option has it prons and crons.