vendredi 27 août 2021

Hide content in front page using conditional wordpress

Currently I am trying to hide a script in my header in some single posts using id and it is working, but I want the script not to be shown in front page, home and pages, I have not been able to get it because the script is still shown in front page, home and pages.

I am doing something wrong?

This is my code, but my script is still displayed on front, home, pages:

<?php if( !is_home() && !is_front_page() && !is_page()  ) : ?>
    <!-- No Script -->
        <?php elseif  (is_single( array( 1, '32438', '10506'  ) ) ) : ?>
        <?php else : ?>
    <script></script>
        <?php endif; ?>

Aucun commentaire:

Enregistrer un commentaire