Results 1 to 10 of 10

Thread: Ad loop categories

  1. #1
    Thread Starter
    classtenstrom's Avatar
    Join Date
    Jun 2012
    Posts
    41
    Thanks
    7
    Thanked 0 Times in 0 Posts

    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>
    &nbsp;|&nbsp;
    <?php _e('Code postal: ','cp') ?></b><?php echo get_post_meta($post->ID, 'cp_code_postal', true); ?> &nbsp;|&nbsp; <?php _e('Superficie: ','cp') ?></b><?php echo get_post_meta($post->ID, 'cp_size', true); ?> &nbsp;|&nbsp; <?php _e('Date de parution: ','cp') ?></b><?php echo appthemes_date_posted($post->post_date); ?>
    <br>
    Meta.jpg

  2. #2
    dikiyforester's Avatar
    Join Date
    Oct 2011
    Location
    Russian Federation
    Posts
    2,229
    Thanks
    89
    Thanked 593 Times in 491 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    arthemes.org - AppThemes plugins, tutorials, modifications and services

  3. #3
    Thread Starter
    classtenstrom's Avatar
    Join Date
    Jun 2012
    Posts
    41
    Thanks
    7
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    dikiyforester's Avatar
    Join Date
    Oct 2011
    Location
    Russian Federation
    Posts
    2,229
    Thanks
    89
    Thanked 593 Times in 491 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    arthemes.org - AppThemes plugins, tutorials, modifications and services

  5. The Following User Says Thank You to dikiyforester For This Useful Post:

    classtenstrom (July 30th, 2012)

  6. #5
    Thread Starter
    classtenstrom's Avatar
    Join Date
    Jun 2012
    Posts
    41
    Thanks
    7
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  7. #6
    dikiyforester's Avatar
    Join Date
    Oct 2011
    Location
    Russian Federation
    Posts
    2,229
    Thanks
    89
    Thanked 593 Times in 491 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    arthemes.org - AppThemes plugins, tutorials, modifications and services

  8. #7
    Thread Starter
    classtenstrom's Avatar
    Join Date
    Jun 2012
    Posts
    41
    Thanks
    7
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  9. #8
    dikiyforester's Avatar
    Join Date
    Oct 2011
    Location
    Russian Federation
    Posts
    2,229
    Thanks
    89
    Thanked 593 Times in 491 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    arthemes.org - AppThemes plugins, tutorials, modifications and services

  10. The Following User Says Thank You to dikiyforester For This Useful Post:

    classtenstrom (July 30th, 2012)

  11. #9
    Thread Starter
    classtenstrom's Avatar
    Join Date
    Jun 2012
    Posts
    41
    Thanks
    7
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  12. #10
    Member zuko's Avatar
    Join Date
    Apr 2011
    Location
    United Kingdom
    Posts
    81
    Thanks
    0
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. More than 10 ads in the loop
    By mediacomnc in forum ClassiPress General Discussion
    Replies: 3
    Last Post: February 22nd, 2014, 06:52 PM
  2. [SOLVED] Add field to ad loop
    By classtenstrom in forum ClassiPress General Discussion
    Replies: 8
    Last Post: July 6th, 2012, 03:22 PM
  3. How could Loop different Ad banners
    By woreillyjr in forum Report JobRoller Bugs
    Replies: 2
    Last Post: January 6th, 2012, 11:36 PM
  4. [MOD NEEDED] How to add category to job loop
    By project21 in forum JobRoller General Discussion
    Replies: 2
    Last Post: November 14th, 2011, 06:57 AM