Conditional Tag for not working
-
Hi,
I’m really stuck on this one. It’s a bit over my head as I’m still pretty new to wordpress.
I’m trying to add a new class to a <div> that appears on 2 different pages, using a conditional tag, using the page id, so I can style one <div> separate from the other.
Here is the string which I am trying to add the new class to:
<div class="latest-deals-wrapper isotope-wrapper" data-isotope-cols="<?php echo esc_attr($atts['columns_count']); ?>" data-isotope-gutter="30">
Here is the class I am trying to add to the above string: plus-card-deal-cont
Here is the code I’m using which is probably way off.
<?php if ( is_page('75') ): echo '<div class="latest-deals-wrapper isotope-wrapper plus-card-deal-cont" data-isotope-cols="<?php echo esc_attr($atts['columns_count']); ?>" data-isotope-gutter="30">'; else: echo '<div class="latest-deals-wrapper isotope-wrapper" data-isotope-cols="<?php echo esc_attr($atts['columns_count']); ?>" data-isotope-gutter="30">'; endif; ?>
Thanks in advance, Greg
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Conditional Tag for not working’ is closed to new replies.