Title: PHP Function OR Shortcode
Last modified: December 3, 2020

---

# PHP Function OR Shortcode

 *  Resolved [kogostudio](https://wordpress.org/support/users/kogostudio/)
 * (@kogostudio)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-function-or-shortcode/)
 * Hi Igor,
 * So I’m manually inserting ads via the theme hooks, wondering which method would
   you recommend to insert the block on the hook PHP Function OR Shortcode? And 
   yes I have a good amount of traffic.
    _(and I see that Shortcodes IGNORE individual
   post/page exceptions!, where i need exceptions too)_

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

 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-function-or-shortcode/#post-13740463)
 * This mainly depends on your needs/preferences.
 * Shorcodes can check exceptions:
    [https://adinserter.pro/documentation/manual-insertion#shortcodes](https://adinserter.pro/documentation/manual-insertion#shortcodes)
 * `[adinserter block="BLOCK_NUMBER" check="exceptions"]`
 * The most flexible approach is by using custom hooks:
    [https://adinserter.pro/documentation/plugin-settings#custom-hooks](https://adinserter.pro/documentation/plugin-settings#custom-hooks)
 *  Thread Starter [kogostudio](https://wordpress.org/support/users/kogostudio/)
 * (@kogostudio)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-function-or-shortcode/#post-13740495)
 * Thanks for the instant reply,
 * I’m after the fast-rendering/performance (less resource consuming) and most reliable
   approach. Which one is it then?
 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-function-or-shortcode/#post-13740499)
 * Custom hook (automatic insertion).
 *  Thread Starter [kogostudio](https://wordpress.org/support/users/kogostudio/)
 * (@kogostudio)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-function-or-shortcode/#post-13740505)
 * Perfect then I’m switching to Custom hook then.
 * once again thank you very much

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

The topic ‘PHP Function OR Shortcode’ 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/)

## Tags

 * [php function](https://wordpress.org/support/topic-tag/php-function/)
 * [Short Code](https://wordpress.org/support/topic-tag/short-code/)

 * 4 replies
 * 2 participants
 * Last reply from: [kogostudio](https://wordpress.org/support/users/kogostudio/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/php-function-or-shortcode/#post-13740505)
 * Status: resolved