samedi 30 juin 2018

WordPress is_single do this and if is not specific single ID do that

I need help with one post.

I have post ID: 236512

I am using function on every is_single() post, but how can continue using the function on all posts except the specific post ID?

<?php if(is_single() && !is_single(236512)):?>
// My regular function
<?php else: ?>
// Do nothing
<?php endif; ?>

Is that syntax Ok or is there any other functional way doing this?

Thanks!

Aucun commentaire:

Enregistrer un commentaire