Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • I really had hope this was the case as well. I have a huge site using TEC and having shortcodes would make life so much easier but I don’t want to style the same thing twice. If it brings in a template it should bring the accompanying styles.

    Will this be available in the future?

    Thread Starter lisaharr

    (@lisaharr)

    It is actually bringing in my posts not the custom posts

    Thread Starter lisaharr

    (@lisaharr)

    Thank-you for your reply. So it is pulling in all categories. Have I done it correctly?

    Function:
    function my_testimonial_map( $id ) {
    $relationship = array(
    ‘24655’ => ‘200-hours-testimonial’,
    ‘24732’ => ‘300-hours-testimonial’,
    ‘24794’ => ‘300-hours-testimonial’,
    ‘about’ => ‘about-page’
    );
    if ( in_array( $id, $relationship ) ) {
    return $relationship[$id];
    } else {
    return false;
    }
    }

    Template:
    <section>
    <ul id=”thumbnailGrid”>
    <?php
    $args=array(
    $testimonial_type = my_testimonial_map( get_the_ID() )
    );
    $my_query = null;
    $my_query = new WP_Query($args);
    if( $my_query->have_posts() ) {
    while ($my_query->have_posts()) : $my_query->the_post(); ?>

    <li class=”ft_promo col-md-3 col-sm-6″>
    <?php global $post; ?>
    <?php
    $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, ” );
    ?>
    <img src=”<?php echo $src[0]; ?>” />
    <h3><?php the_title(); ?></h3>
    <p><?php the_content(); ?></p>

    <?php
    endwhile;
    }
    wp_reset_query(); // Restore global post data stomped by the_post().
    ?>
    <div class=”clearfix”></div>

    </section>

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