page.php Loop Issue?

Discussion in 'Woodpecker WordPress Business Theme' started by lkodsmann, Feb 25, 2015.

  1. lkodsmann

    lkodsmann Guest

    Joined:
    Apr 4, 2014
    Messages:
    92
    Likes Received:
    2
    I am trying to use this theme to work with WooCommerce...

    Typically, I am able to do this by duplicating the page.php file from the theme, and renaming it woocommerce.php - then I just need to replace the theme loop with the woocommerce loop.

    I'm trying to do this using the instructions here:
    http://docs.woothemes.com/document/third-party-custom-theme-compatibility/

    The problem I'm having is that in the Woodpecker theme's page.php file, I don't see an endif (just an endwhile)... The code for the loop in my page.php file looks like:

    Code:
     <?php if (have_posts()) while (have_posts()) : the_post(); ?>
     
                                <div class="page-heading clear">
     
                                    <h1><?php the_title(); ?></h1>
     
                                </div>
     
                                <div class="page-content clear">
     
                                    <?php the_content(); ?>
     
                                </div>
     
                            </div>
     
                        <?php endwhile; ?>
     
                    <!----------------------Page Ends -------------------------->
    ... I only see the endwhile; and no endif;

    If I replace the code above with the woocommerce code, it completely breaks my shopping pages (they are a blank white screen)...

    I've used this process before with no problems, it's usually as simple as replacing the loop - the problem I'm having here is that it looks like the loop as coded in the woodpecker page.php file isn't entirely replaceable?

    Thanks...
     
  2. lkodsmann

    lkodsmann Guest

    Joined:
    Apr 4, 2014
    Messages:
    92
    Likes Received:
    2
    Never mind - looks like it was a disk space issue on my server... I upped my disk space and everything worked...
     
  3. lkodsmann

    lkodsmann Guest

    Joined:
    Apr 4, 2014
    Messages:
    92
    Likes Received:
    2
    Now the problem I'm having is that the sidebar is stacking below the store contents... My store displays within the theme correctly now, but I don't know why it would be pushing the sidebar underneath the main page content?
     
  4. lkodsmann

    lkodsmann Guest

    Joined:
    Apr 4, 2014
    Messages:
    92
    Likes Received:
    2
    I figured it out... it looks like there was an extra </div> inside of your page.php loop...

    I added the </div> after the woo commerce code:

    Code:
    <?php woocommerce_content(); ?>
    </div>
    ...that fixed the problem, and the page layout looks correct now.
     

Share This Page