lundi 3 août 2015

Wordpress if(post_name === nameOfPost) not working

I am trying to display specific text at the bottom of a menu but I only want this text to show if I am looking at a certain menu. This is the code I have

 <?php get_post_type( $post ) ?>
    <?php if ( $post->post_name === 'belden-village' ) : ?>
        <?php echo "<p>*For all groups of 8 or more, an 18% gratuity will be included on your guest check. Thank
        You</p>"; ?>
    <?php endif ?>

This code works in staging but as soon as we moved the site live it no longer displays the text when it is supposed to. I am calling it by the "slug" and the slug is the same in both staging and live site. Any ideas why this has suddenly stopped working? This is my first experience taking a site live so any help would be greatly appreciated. Thanks.

Aucun commentaire:

Enregistrer un commentaire