Support » Theme: Adamos » Sidebar on single-product page is dropping

  • monicafcp

    (@monicafcp)


    There is an overlap between the single-product + related products area and the sidebar area, apparently.

    ** How can I get the sidebar to be aligned with the single-product?

    http://www.aquatropi.com/produto/aquaclear-filtro-30/

    I’ve tried to change dimensions (both % and px) related to the container/products areas and so on, and remove margins and paddings, but nothing seems to get it right.

    I am trying to do it over CSS because I am relatively new to all this.

    Thank you in advance,

    Monica

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael

    (@alchymyth)

    how did you create the template for the single products?

    what is the full code?

    you seem to have a wrong CSS id in one of the divs; compare the html structure of your single product template with the one of page.php or single.php for example…

    Thread Starter monicafcp

    (@monicafcp)

    Thanks for the answer, alchymyth.

    Unfortunately I haven’t been able to progress much.

    The template for the single-product page comes with woocommerce. I have another website using the same version of woocommerce, and I checked that both codes for the sigle-page are identical. Since the other website does not have this problem, I suspect the problem lies with the theme, that is different.

    The theme is Adamos, and in the page-template folder I only find:
    * custom_home.php
    * full-width.php (says it doesn’t support sidebar, so cannot be this one)

    I think all pages are using this “custom_home.php” template, is that a good guess?

    If my guess is right, all pages are using exactly the same template (custom_home.php), so there is nothing to compare it to.

    I just tested taking away all the CSS changes I did myself to the theme, but it continues with the same sidebar problem, so I know this is not self inflicted 🙂

    Many thanks in advance!

    This is the code for custom_home.php, if you wanted to look at it:

    <?php
    /*
     * Template Name: Custom Home Page
     * Description: A home page with featured slider and widgets.
     *
     * @package adamos
     * @since adamos 1.0
     */
    
    get_header(); ?>
    
            <div id="primary_home" class="content-area">
    			<div id="content" class="fullwidth" role="main">
    
       <div class="section group">
    	<div class="col span_1_of_3">
        <div class="featuretext">
    			 <h3><?php echo get_theme_mod( 'featured_textbox_header_one' ); ?></h3>
                 <p><?php echo get_theme_mod( 'featured_textbox_text_one' ); ?></p>
    	</div>
        </div>
    
        <div class="col span_1_of_3">
         <div class="featuretext">
    			 <h3><?php echo get_theme_mod( 'featured_textbox_header_two' ); ?></h3>
                 <p><?php echo get_theme_mod( 'featured_textbox_text_two' ); ?></p>
    	</div>
        </div>
    
       <div class="col span_1_of_3">
         <div class="featuretext">
    			 <h3><?php echo get_theme_mod( 'featured_textbox_header_three' ); ?></h3>
                 <p><?php echo get_theme_mod( 'featured_textbox_text_three' ); ?></p>
    	</div>
        </div>
        </div>
    
         <div class="section_thumbnails group">
    	<h3>Recent Posts</h3>
    
      <?php $the_query = new WP_Query(array(
      'showposts' => 2,
      'post__not_in' => get_option("sticky_posts"),
      ));
     ?>
        <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
        <div class="col span_1_of_2">
        <article class="recent">
        			<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    				<?php echo content(50); ?><div class="thumbs-more-link"><a href="<?php the_permalink() ?>"> More</a></div>
        </article>
        </div>
    	<?php endwhile; ?>
    
        </div>
    
    			</div><!-- #content .site-content -->
    		</div><!-- #primary .content-area -->
    
    <?php get_footer(); ?>
    Thread Starter monicafcp

    (@monicafcp)

    The template for single-product from woocommerce:

    <?php
    /**
     * The Template for displaying all single products.
     *
     * Override this template by copying it to yourtheme/woocommerce/single-product.php
     *
     * @author 		WooThemes
     * @package 	WooCommerce/Templates
     * @version     1.6.4
     */
    
    if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    
    get_header( 'shop' ); ?>
    
    	<?php
    		/**
    		 * woocommerce_before_main_content hook
    		 *
    		 * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
    		 * @hooked woocommerce_breadcrumb - 20
    		 */
    		do_action( 'woocommerce_before_main_content' );
    	?>
    
    		<?php while ( have_posts() ) : the_post(); ?>
    
    			<?php wc_get_template_part( 'content', 'single-product' ); ?>
    
    		<?php endwhile; // end of the loop. ?>
    
    	<?php
    		/**
    		 * woocommerce_after_main_content hook
    		 *
    		 * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
    		 */
    		do_action( 'woocommerce_after_main_content' );
    	?>
    
    	<?php
    		/**
    		 * woocommerce_sidebar hook
    		 *
    		 * @hooked woocommerce_get_sidebar - 10
    		 */
    		do_action( 'woocommerce_sidebar' );
    	?>
    
    <?php get_footer( 'shop' ); ?>
    Michael

    (@alchymyth)

    what is the code of header-shop.php?

    have you contacted the developer of woocommerce for support?

    this is a section of code I see in the browser when viewing your linked problem example product web page:

    <div id="main" class="site-main">
    	<div id="container"><div id="content" role="main">

    this is the corresponding section of a static page (‘contato’):

    <div id="main" class="site-main">
    		<div id="primary" class="content-area">
    			<div id="content" class="site-content" role="main">

    can you see the difference?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sidebar on single-product page is dropping’ is closed to new replies.