I'm using post_class on Wordpress blog posts to display post information in the css class like this:
<?php post_class('blog-post clearfix'); ?>
I'm also using Advanced Custom Fields to echo a css class onto each blog post using this:
<?php if (get_field('blog-post-style') == 'big-post') {
echo('big-post');
} else if (get_field('blog-post-style') == 'small-post') {
echo('small-post');
} ?>
So i can click a radio button option when editing a post and echo either 'big-post' or 'small-post' css class. But i also want to keep the post_class. So i need to somehow incorporate the 2 together.
I could wrap the post inside another div and echo the acf code to the containing div, but i'd rather not do that.
This is what i'd like it to look like:
<div id="post-429" class="small-post blog-post clearfix post-429 post type-post status-publish format-standard has-post-thumbnail hentry category-latest-news">
or
<div id="post-429" class="big-post blog-post clearfix post-429 post type-post status-publish format-standard has-post-thumbnail hentry category-latest-news">
Hope that makes sense. Thanks