This is a very useful snippet to execute something based on a WordPress Conditional statement.
See all statements at https://codex.wordpress.org/Conditional_Tags
This can be placed in any PHP file.
<?php if ( is_front_page() ) { ?> DO SOMETHING HERE <?php } else { ?> DO SOMETHING ELSE <?php } ?>
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article