Title: How to include custom PHP functions?
Last modified: June 7, 2022

---

# How to include custom PHP functions?

 *  Resolved [wordmax](https://wordpress.org/support/users/wordmax/)
 * (@wordmax)
 * [4 years ago](https://wordpress.org/support/topic/how-to-include-custom-php-functions/)
 * Super plugin, thanks! Just wondering how we can use Ad Inserter to add custom
   PHP functions? For example, we would like to remove the code that is inserted
   by Rank Math plugin
 * `<!-- Search Engine Optimization by Rank Math - https://s.rankmath.com/home --
   >`
 * and the recommended code to do so by RankMath is:
 *     ```
       /**
        * Filter to remove the plugin credit notice added to the source.
        *
        */
       add_filter( 'rank_math/frontend/remove_credit_notice', '__return_true' );
       ```
   
 * Can Ad Inserter handle such types of custom PHP functions and if so how do we
   implement it? We would like to use this plugin to add custom PHP functions rather
   than adding another plugin like CodeSnippets ([https://wordpress.org/plugins/code-snippets/](https://wordpress.org/plugins/code-snippets/))
   to do so.
 * Thanks!
    -  This topic was modified 4 years ago by [wordmax](https://wordpress.org/support/users/wordmax/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [4 years ago](https://wordpress.org/support/topic/how-to-include-custom-php-functions/#post-15714615)
 * Yes, you can add the code, for example, in the Header:
    [https://adinserter.pro/documentation/code-editing#php-code](https://adinserter.pro/documentation/code-editing#php-code)
 * [https://adinserter.pro/documentation/header-and-footer-code](https://adinserter.pro/documentation/header-and-footer-code)

Viewing 1 replies (of 1 total)

The topic ‘How to include custom PHP functions?’ is closed to new replies.

 * ![](https://ps.w.org/ad-inserter/assets/icon-256x256.jpg?rev=1502039)
 * [Ad Inserter - Ad Manager & AdSense Ads](https://wordpress.org/plugins/ad-inserter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ad-inserter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ad-inserter/)
 * [Active Topics](https://wordpress.org/support/plugin/ad-inserter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ad-inserter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ad-inserter/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Spacetime](https://wordpress.org/support/users/spacetime/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/how-to-include-custom-php-functions/#post-15714615)
 * Status: resolved