• Hello there

    I have added the slideshow code from the plugin “slideshow” by StefanBoonstra, to the css index, however the slideshows are appearing under each other and not next to each other. (link: https://gyazo.com/885fad90299732cf8cb8ac1754b637c7)

    Any 1 know how to make the products next to each other ?

    Best regards
    Jacob

    My index file looks like this:

    <?php
    /**
    * Index Template
    *
    * Here we setup all logic and XHTML that is required for the index template, used as both the homepage
    * and as a fallback template, if a more appropriate template file doesn’t exist for a specific context.
    *
    * @package WooFramework
    * @subpackage Template
    */
    get_header();
    global $woo_options;

    ?>

    <div id=”content” class=”col-full”>

    <?php do_action(‘slideshow_deploy’, ‘110’); ?> <?php do_action(‘slideshow_deploy’, ‘266’); ?>
    <?php do_action(‘slideshow_deploy’, ‘268’); ?>
    <?php do_action(‘slideshow_deploy’, ‘269’); ?>
    <?php do_action(‘slideshow_deploy’, ‘270’); ?>

    <?php if( isset( $woo_options[‘woo_stand_first’] ) ) {
    echo ‘<div class=”stand-first”>’;
    echo stripslashes( $woo_options[‘woo_stand_first’] );
    echo ‘</div>’;
    } ?>

    <?php if ( is_woocommerce_activated() ) { ?>

    <ul class=”featured-products”>
    <!– The first 3 –>
    <?php
    $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 3, ‘meta_query’ => array( array(‘key’ => ‘_visibility’,’value’ => array(‘catalog’, ‘visible’),’compare’ => ‘IN’),array(‘key’ => ‘_featured’,’value’ => ‘yes’)) );
    $loop = new WP_Query( $args );

    while ( $loop->have_posts() ) : $loop->the_post(); $_product;

    if ( function_exists( ‘get_product’ ) ) {
    $_product = get_product( $loop->post->ID );
    } else {
    $_product = new WC_Product( $loop->post->ID );
    }

    ?><li class=”featured”>

    <?php //woocommerce_show_product_sale_flash( $post, $_product ); ?>
    post->ID ) ?>” title=”<?php echo esc_attr($loop->post->post_title ? $loop->post->post_title : $loop->post->ID); ?>”>
    <?php if (has_post_thumbnail( $loop->post->ID )) echo get_the_post_thumbnail($loop->post->ID, ‘shop_catalog’); else echo ‘<img src=”‘.woocommerce_placeholder_img_src().'” alt=”Placeholder” />’; ?>

    <h3><?php the_title(); ?> <span class=”price”><?php echo $_product->get_price_html(); ?></span></h3>

    <?php endwhile; ?><!– the large 1 –><?php
    $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 1, ‘offset’ => 3, ‘meta_query’ => array( array(‘key’ => ‘_visibility’,’value’ => array(‘catalog’, ‘visible’),’compare’ => ‘IN’),array(‘key’ => ‘_featured’,’value’ => ‘yes’)) );
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post();
    if ( function_exists( ‘get_product’ ) ) {
    $_product = get_product( $loop->post->ID );
    } else {
    $_product = new WC_Product( $loop->post->ID );
    }
    ?><li class=”featured”>

    <?php //woocommerce_show_product_sale_flash( $post, $_product ); ?>
    post->ID ) ?>” title=”<?php echo esc_attr($loop->post->post_title ? $loop->post->post_title : $loop->post->ID); ?>”>
    <?php if (has_post_thumbnail( $loop->post->ID )) echo get_the_post_thumbnail($loop->post->ID, ‘shop_single’); else echo ‘<img src=”‘.woocommerce_placeholder_img_src().'” alt=”Placeholder” />’; ?>

    <h3><?php the_title(); ?> <span class=”price”><?php echo $_product->get_price_html(); ?></span></h3>

    <?php endwhile; ?><!– the last 3 –><?php
    $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 3, ‘offset’ => 4, ‘meta_query’ => array( array(‘key’ => ‘_visibility’,’value’ => array(‘catalog’, ‘visible’),’compare’ => ‘IN’),array(‘key’ => ‘_featured’,’value’ => ‘yes’)) );
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post(); $_product;
    if ( function_exists( ‘get_product’ ) ) {
    $_product = get_product( $loop->post->ID );
    } else {
    $_product = new WC_Product( $loop->post->ID );
    }
    ?><li class=”featured”>

    <?php //woocommerce_show_product_sale_flash( $post, $_product ); ?>
    post->ID ) ?>” title=”<?php echo esc_attr($loop->post->post_title ? $loop->post->post_title : $loop->post->ID); ?>”>
    <?php if (has_post_thumbnail( $loop->post->ID )) echo get_the_post_thumbnail($loop->post->ID, ‘shop_catalog’); else echo ‘<img src=”‘.woocommerce_placeholder_img_src().'” alt=”Placeholder” />’; ?>

    <h3><?php the_title(); ?> <span class=”price”><?php echo $_product->get_price_html(); ?></span></h3>

    <?php endwhile; ?>

    <?php } ?>

    </div><!–/.home-intro–>

    <section id=”main” class=”<?php if ( $woo_options[ ‘woo_display_store_info’ ] == “false” ) echo ‘fullwidth’; else echo ‘col-left’; ?>”>

    <?php woo_loop_before(); ?>

    <?php

    $paged = ( get_query_var( ‘paged’ ) ) ? get_query_var( ‘paged’ ) : 1; query_posts( array( ‘post_type’ => ‘post’, ‘paged’ => $paged, ‘posts_per_page’ => 1 ) );
    if ( have_posts() ) : $count = 0;
    ?>

    <?php /* Start the Loop */ ?>
    <?php while ( have_posts() ) : the_post(); $count++; ?>

    <?php
    /* Include the Post-Format-specific template for the content.
    * If you want to overload this in a child theme then include a file
    * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    */
    get_template_part( ‘content’, get_post_format() );
    ?>

    <?php endwhile; ?>

    <?php else : ?>

    <article <?php post_class(); ?>>
    <p><?php _e( ”, ‘woothemes’ ); ?></p>
    </article><!– /.post –>

    <?php endif; ?>

    <?php woo_loop_after(); ?>

    </section><!– /#main –>

    <?php woo_main_after(); ?>

    <?php if ( $woo_options[ ‘woo_display_store_info’ ] == “true” ) { ?>
    <aside id=”sidebar” class=”col-right”>
    <?php } ?>
    <?php if ( $woo_options[ ‘woo_display_store_info’ ] == “true” ) {
    $email = get_option(‘woo_store_email_address’);
    $phone = get_option(‘woo_store_phone_number’);
    $twitterID = get_option(‘woo_contact_twitter’);
    ?>
    <ul class=”store-info”>

    <li class=”phone”>
    <div class=”inner”>
    <span><?php _e(‘Call us:’,’woothemes’); ?></span>
    “><?php echo $phone; ?>
    </div>

    <li class=”email”>
    <div class=”inner”>
    <span><?php _e(‘Send us an email:’,’woothemes’); ?></span>
    ” title=”<?php _e(‘Send us an email’, ‘woothemes’)?>”><?php echo $email; ?>
    </div>

    <!–/.store-info–>
    <?php } ?>
    <?php if ( $woo_options[ ‘woo_display_store_info’ ] == “true” ) { ?>
    </aside>
    <?php } ?>

    <?php //get_sidebar(); ?>

    </div><!– /#content –>

    <?php get_footer(); ?>

  • The topic ‘Help to slideshow on frontpage’ is closed to new replies.