Ad loop categories
I would need to have different post meta data appear in the ad loops depending on what category the ads are in, as the categories, as they don't share fields.
I know how to change the post meta data, but how to set it up according to category?
(Click image below to see what data I'm referring to)
The ad loop codes as it currently is:
function acf_ad_loop_meta_top() {
if ( is_page() || is_singular( APP_POST_TYPE ) ) return; // don't do ad-meta on pages
global $post;
if ( $post->post_type == 'page' ) return;?>
<p class="post-meta">
<span class="folder">
<?php if ( $post->post_type == 'post' ) the_category(', ');
else echo get_the_term_list( $post->ID, APP_TAX_CAT, '', ', ', '' ); ?></span>
|
<?php _e('Code postal: ','cp') ?></b><?php echo get_post_meta($post->ID, 'cp_code_postal', true); ?> | <?php _e('Superficie: ','cp') ?></b><?php echo get_post_meta($post->ID, 'cp_size', true); ?> | <?php _e('Date de parution: ','cp') ?></b><?php echo appthemes_date_posted($post->post_date); ?>
<br>
Meta.jpg