Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter suchapro

    (@suchapro)

    Yep, it’s ACF. Works like a charm using the default metaboxes.

    Thanks.

    Thread Starter suchapro

    (@suchapro)

    I think I figured something out.

    So, I got the custom taxonomies showing up correctly, but I realize that when I assign them using the ACF interface, it doesn’t actually assign them to the post. I may have to use the other interface to get it to work.

    I’ll check with ACF as well.

    Thread Starter suchapro

    (@suchapro)

    Here’s what I’m testing with:

    <?php
    $args = array(
    ‘post_type’ => ‘classes_camps’,
    ‘tax_query’ => array(
    array(
    ‘taxonomy’ => ‘class_type’,
    ‘field’ => ‘slug’,
    ‘terms’ => array(‘first-stage’),
    ‘operator’ => ‘IN’
    )
    ),
    ‘posts_per_page’ => -1
    );

    $query = new WP_Query($args);

    while($query -> have_posts() ) : $query -> the_post();
    ?>

    <h1><?php the_title(); ?></h1>

    <?php endwhile; wp_reset_query(); ?>

    What I ultimately need to do:

    <?php
    $args = array(
    ‘post_type’ => ‘classes_camps’,
    ‘tax_query’ => array(
    ‘relation’ => ‘AND’,
    array(
    ‘taxonomy’ => ‘class_term’,
    ‘field’ => ‘slug’,
    ‘terms’ => array(‘2018-summer’),
    ‘operator’ => ‘IN’
    ),
    array(
    ‘taxonomy’ => ‘class_type’,
    ‘field’ => ‘slug’,
    ‘terms’ => array(‘skills’),
    ‘operator’ => ‘IN’
    ),
    array(
    ‘taxonomy’ => ‘session’,
    ‘field’ => ‘slug’,
    ‘terms’ => array(‘afternoon’),
    ‘operator’ => ‘IN’
    )
    ),
    ‘posts_per_page’ => -1
    );

    $query = new WP_Query($args);

    while($query -> have_posts() ) : $query -> the_post();
    ?>

    <h1><?php the_title(); ?></h1>

    <?php endwhile; wp_reset_query(); ?>

    and this is working, but it’s not the ideal solution. I’d prefer the taxonomies attached to the post type:

    <?php
    $args = array(
    ‘post_type’ => ‘classes_camps’,
    ‘tax_query’ => array(
    ‘relation’ => ‘AND’,
    array(
    ‘taxonomy’ => ‘category’,
    ‘field’ => ‘slug’,
    ‘terms’ => array(‘2018-summer’),
    ‘operator’ => ‘IN’
    ),
    array(
    ‘taxonomy’ => ‘post_tag’,
    ‘field’ => ‘slug’,
    ‘terms’ => array(‘first-class’),
    ‘operator’ => ‘IN’
    ),
    array(
    ‘taxonomy’ => ‘post_tag’,
    ‘field’ => ‘slug’,
    ‘terms’ => array(‘afternoon’),
    ‘operator’ => ‘IN’
    )
    ),
    ‘posts_per_page’ => -1
    );

    $query = new WP_Query($args);

    while($query -> have_posts() ) : $query -> the_post();
    ?>

    <h1><?php the_title(); ?></h1>

    <?php endwhile; wp_reset_query(); ?>

    Thanks.

    Thread Starter suchapro

    (@suchapro)

    They show up in Advanced Custom Fields, but on the actual post, it looks like a tag vs. a category.

    Is there a way to hide these on the edit post page? I’m using them as a field in ACF and don’t want both showing up.

    Thanks.

    Thread Starter suchapro

    (@suchapro)

    They don’t seem to be recognized by tax_query. Do I need to edit the query_var_slug?

    The name is class_type, so I’m using ‘taxonomy’ => ‘class_type’,

    I got them to show up in the quick edit, but they appear like tags vs. categories. Any way to get them to show up as check boxes?

    Would access to the site help?

    Thread Starter suchapro

    (@suchapro)

    The other thing is that they don’t show up under quick-edit, which would also be very helpful.

    I’m having the same issue as well. But I’m using CF7 4.8.1

    • This reply was modified 7 years, 3 months ago by suchapro.

    Is there a way to display the caption vs. the name of the document? I’d rather not have to rename every document as the names are fairly important as well.

    If you can point me to a file, I might be able to bandaid it myself.

    thanks.

Viewing 8 replies - 1 through 8 (of 8 total)