I’m trying to create an if statement that will only display my button link for tickets if its under ‘admission-event’… what is wrong with my code?

Question

<!-- column links -->
    <div class="col-md-3 offset-md-2 links">
    <?php  if ( is_category( 'admission-event' ) ) { ?>

      <a href="https://www.eventbrite.com/d/ut--salt-lake-city/vocalocity/" title="<?php the_title();?>" class="btn btn-secondary tickets" <?php echo $open_new_window; ?>>BUY TICKETS</a>

      <a href="<?php echo $post_link  ?>" title="<?php the_title();?>" class="btn btn-secondary more-info" <?php echo $open_new_window; ?>>MORE INFO<i class="fa fa-angle-right"></i> </a>

    <?php } else { ?>

      <a href="<?php echo $post_link  ?>" title="<?php the_title();?>" class="btn btn-secondary more-info" <?php echo $open_new_window; ?>>MORE INFO<i class="fa fa-angle-right"></i> </a>

    <?php } ?>
    </div>
    <!-- /column links -->


0
, , Addy 2 years 2019-12-01T21:19:04-05:00 0 Answers 70 views 0

Leave an answer

Browse
Browse