Is there any way to know specific shortcode is applied on specific page?
for e.g. On any WP Theme’s home page if related_products shortcode is applied then I want to check it in my plugin file that is applied or not?
Is there any way?
Is there any way to know specific shortcode is applied on specific page?
for e.g. On any WP Theme’s home page if related_products shortcode is applied then I want to check it in my plugin file that is applied or not?
Is there any way?
You must be logged in to post a comment.
You can use
has_shortcode()
to check if your shortcode is applied. If you need to specifically check if it is used on the home page, you can add theis_home()
check