1
Next, I have 4 posts on a post type services.
Brides, Day Spa, Aesthetic Medicine and Salon
<div class="service-content <?php if( $post_title == 'Noivas' ) echo "qwp-content"; ?>">
<?php var_dump($post_title); ?>
<?php the_content(); ?>
</div><!-- /.qwp-content -->
CSS:
.qwp-content {
font-size: 1.444rem;
text-align: center;
p:nth-child(odd) {
color: #000;
padding: 7px;
background: #C5C2B3;
}
}
.service-content {
font-size: 1.444rem;
}
I was doing this, but I don’t get so much logic and stuff.
Basically, what I want is that when one accesses Brides, he doesn’t take the class . qwp-content and just take the . service-content
Po guys, thank you very much, for me that I’m crawling in Wordpress and PHP, programming in general, this help is very valid, I’m lucky that I managed to do right my first little condition hehe. I did it like this and it worked: <div class="qwp-content <?php if( $post_title != 'Brides' ) echo "service-content"; ? >"> <?php the_content(); ? > </div><! -- /.qwp-content -->
– Peter Roberto