Title: Additional logic for PHP snippets
Last modified: January 18, 2022

---

# Additional logic for PHP snippets

 *  [heavylogic](https://wordpress.org/support/users/heavylogic/)
 * (@heavylogic)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/additional-logic-for-php-snippets/)
 * I have 2 different PHP snippets where I store enqueues for additional CSS and
   JS libraries. I want those snippets to run on different pages in <head>, so shortcode
   is not an option. I tried to use `get_the_ID()` function inside snippet so I 
   could base my logic around that, but it always returns `false`. Is there any 
   solution for this? I see some “Additionally logic” in premium version of this
   plugin, but there’s no explanation what it means.

Viewing 1 replies (of 1 total)

 *  [Temyk](https://wordpress.org/support/users/webtemyk/)
 * (@webtemyk)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/additional-logic-for-php-snippets/#post-15266860)
 * Hello.
 * Here is a screenshot of the additional logic settings. I think one of the rules
   will suit you.
 * > [View post on imgur.com](https://imgur.com/eAb6jSf)

Viewing 1 replies (of 1 total)

The topic ‘Additional logic for PHP snippets’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3523853)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Temyk](https://wordpress.org/support/users/webtemyk/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/additional-logic-for-php-snippets/#post-15266860)
 * Status: not resolved