Title: Feature Request: Provide option for custom PHP hook for conditional function
Last modified: October 29, 2019

---

# Feature Request: Provide option for custom PHP hook for conditional function

 *  Resolved [joelnewcomer](https://wordpress.org/support/users/joelnewcomer/)
 * (@joelnewcomer)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/feature-request-provide-option-for-custom-php-hook-for-conditional-function/)
 * My situation is that I have Posts element on the page and it has a custom query.
   If the query returns no posts, I want to show a different section. It would be
   awesome if we could provide a PHP hook that returns true or false so that I could
   write a custom condition to determine whether a section shows or not. Thanks!

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

 *  Plugin Author [rtowebsites](https://wordpress.org/support/users/rtowebsites/)
 * (@rtowebsites)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/feature-request-provide-option-for-custom-php-hook-for-conditional-function/#post-12076919)
 * Hello [@joelnewcomer](https://wordpress.org/support/users/joelnewcomer/),
 * if we understand you right, you should be able to create a new dynamic tag that
   uses your custom query to return true/false.
 * anyway we will think about you feature request.
 * Thank you.
 *  Thread Starter [joelnewcomer](https://wordpress.org/support/users/joelnewcomer/)
 * (@joelnewcomer)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/feature-request-provide-option-for-custom-php-hook-for-conditional-function/#post-12077336)
 * yes, that’s what I’m needing. Thank you for considering it!

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

The topic ‘Feature Request: Provide option for custom PHP hook for conditional function’
is closed to new replies.

 * ![](https://ps.w.org/dynamicconditions/assets/icon-256x256.jpg?rev=1969812)
 * [Dynamic Conditions](https://wordpress.org/plugins/dynamicconditions/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dynamicconditions/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dynamicconditions/)
 * [Active Topics](https://wordpress.org/support/plugin/dynamicconditions/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dynamicconditions/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dynamicconditions/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [joelnewcomer](https://wordpress.org/support/users/joelnewcomer/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/feature-request-provide-option-for-custom-php-hook-for-conditional-function/#post-12077336)
 * Status: resolved