Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2316

    Im hoping to move the testimonial section on the mainpage to the same position on my blog page – is this possible?

    #37542

    To remove the testimonial section you need to delete following code in index.php:

    <?php
    //query testimonials
    $additional_loop = new WP_Query("post_type=testimonials&posts_per_page=5"); ?>

    <?php
    //if the query returned any results show the testimonial box
    if($additional_loop->have_posts()) :

    $active[0] = 'active_testimonial';
    $active[1] = 't_slide_active';
    ?>

    <div class='hr'><a href="#top" class='scrollTop'>top</a></div>
    <div id="testimonial" class='two_third'>
    <div class="quote ie6fix"></div>

    <h1>Testimonials</h1>
    <div class="testimonial_author_pics">

    <?php
    //displays the portfolio pictures
    while ($additional_loop->have_posts()) : $additional_loop->the_post();
    $img = kriesi_post_thumb( $post->ID, array('size'=> array('S','_testimonial_person'),
    'wh' => $k_option['custom']['imgSize']['S'],
    'img_attr' => array('class'=>'ie6fix'),
    'display_link' => array('none')
    ));

    echo "<a href='#' class='".$active[0]."'>".$img."</a>";
    $active[0] = "";
    endwhile; ?>

    <span class='testimonial_arrow ie6fix'></span>
    <!-- end testimonial_author_pics-->
    </div>

    <div class="testimonial_slides">

    <?php
    $testimonials = false;
    //display the testimonial content
    while ($additional_loop->have_posts()) : $additional_loop->the_post();
    $testimonials = true;
    $name = get_post_meta($post->ID, "_testimonial_person_name", true);
    $url = get_post_meta($post->ID, "_testimonial_person_url", true);

    $small_prev_image = kriesi_post_thumb( $post->ID, array('size'=> array('SL'),
    'wh' => $k_option['custom']['imgSize']['SL'],
    'img_attr' => array('class'=>'ie6fix'),
    'display_link' => '_testimonial_person_url'
    ));

    ?>
    <div class='t_slide <?php echo $active[1]; $active[1] = ''; ?>'>

    <?php
    //thumbnail image
    if($small_prev_image)
    {
    echo "<span class='testimonial_img'>".$small_prev_image."</span>";
    }

    //content
    echo "<div class='testimonial_entry'>";
    echo "<strong class='heading'>".get_the_title()."</strong>";
    the_content('Read more');

    //name
    if($name)
    {
    echo '<strong class="testimonial_author">';
    echo $url != "" ? "<a href='".$url."'>".$name."</a>": $name;
    echo '</strong>';
    }
    echo "</div>";
    ?>
    <!--end t_slide-->
    </div>

    <?php
    endwhile;
    ?>
    <!--end testimonial_slides -->
    </div>
    <!--end testimonial-->
    </div>
    <?php
    endif;
    ?>

    <?php

    if($k_option['mainpage']['about'] != "")
    {
    $additional_loop = new WP_Query("page_id=".$k_option['mainpage']['about']); ?>

    <?php while ($additional_loop->have_posts()) : $additional_loop->the_post();
    $class_add = "";
    if($testimonials) $class_add = "one_third";
    ?>

    <div id="testimonial_sidebar" class='<?php echo $class_add; ?> last'>

    <h2 class='siteheading'><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    <?php the_content('Read more'); ?>

    <!--end testimonial_sidebar -->
    </div>

    <?php endwhile;
    }
    ?>

    You can try to implement it on your blog page but I can’t promise that it will work because I didn’t test it. This is a modification which is beyond the scope of this support forum.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Moving the Testimonial section’ is closed to new replies.