Support » Theme: Voyage » Voyage and Jigoshop

  • Resolved Czarzhan

    (@czarzhan)


    Hello.

    I am using Voyage for my wife’s blog and online store. To run the store, we are using the Jigoshop plugin, which is working we enough for us, except the shop page displays the sidebar below the products.

    There are general instructions to fix this for the TwentyEleven and TwentyTwelve themes here. I was wondering if there was any way to adapt it to the Voyage theme.

    Thanks for reading.

Viewing 15 replies - 1 through 15 (of 21 total)
  • Theme Author Stephen Cui

    (@scui2)

    You can properly do the same thing as suggested by Jigoshop.

    This is is open action

    <div class=”<?php echo voyage_container_class(); ?>”>
    <div id=”content” class=”<?php echo voyage_grid_class(); ?>” role=”main”>

    for close action:

    </div><?php get_sidebar(); ?></div>

    Let me know if this help. It do require some programming knowledge.

    It didn’t work, although I’m not certain I am doing it right. I copied the code from the JigoShop intructions and substituted your code above into the functions. I the pasted it all into the Voyage theme’s function.php file near the end. This is the code I added:

    function mytheme_open_jigoshop_content_wrappers()
    {
        echo '<div class="<?php echo voyage_container_class(); ?>">   <div id="content" class="<?php echo voyage_grid_class(); ?>" role="main">';
    }
    
    function mytheme_close_jigoshop_content_wrappers()
    {
        echo '</div><?php get_sidebar(); ?></div>';
    }
    
    function mytheme_prepare_jigoshop_wrappers()
    {
        remove_action( 'jigoshop_before_main_content', 'jigoshop_output_content_wrapper', 10 );
        remove_action( 'jigoshop_after_main_content', 'jigoshop_output_content_wrapper_end', 10);
    
        add_action( 'jigoshop_before_main_content', 'mytheme_open_jigoshop_content_wrappers', 10 );
        add_action( 'jigoshop_after_main_content', 'mytheme_close_jigoshop_content_wrappers', 10 );
    }
    add_action( 'wp_head', 'mytheme_prepare_jigoshop_wrappers' );

    Theme Author Stephen Cui

    (@scui2)

    function mytheme_open_jigoshop_content_wrappers()
    {
        echo '<div class="' . voyage_container_class() . '"><div id="content" class="' . voyage_grid_class() .'" role="main">';
    }

    I am not sure about the second action as I do not know jigshop. The article in their website tried to avoid get_sidebar(). You have to try yourself.

    Ah! Of course! I was being silly. My brain just hadn’t twigged to it.

    I tried different positions for get_sidebar() in the closing function, before, between, and after the two </div> tags. The sidebar is still beneath the products, but it no longer stretches all the way across.

    Thanks for your help. I’ll head over to JigoShop support and see if they can do anything. If they come up with a solution, I will post it back here.

    By the way, this is the page with the issue.

    Theme Author Stephen Cui

    (@scui2)

    try this

    function mytheme_open_jigoshop_content_wrappers()
    {
        echo '<div class="' . voyage_container_class() . '"><div id="content" class="' . voyage_grid_full() .'" role="main">';
    }

    second function two close div only

    echo ‘</div></div>’;

    Nope. It just made the sidebar stretch underneath again. On the up side, the products are no longer riding the left edge.

    Any other ideas? 🙂

    Theme Author Stephen Cui

    (@scui2)

    Nevermind. For second action: try

    echo ‘</div>’ . get_sidebar() . ‘</div>’;

    Theme Author Stephen Cui

    (@scui2)

    first action:

    echo ‘<div class=”‘ . voyage_container_class() . ‘”><div id=”content” class=”‘ . voyage_grid_class() .'” role=”main”>’;

    Theme Author Stephen Cui

    (@scui2)

    I know it does not work. Jigoshop called get_sidebar within its own function.

    It is not possible to have the sidebar between two </div>. A good plugin should simply use the theme’s template file.

    Theme Author Stephen Cui

    (@scui2)

    add the following to the theme’s Custom CSS code.

    .jigoshop #sidebar_one { float: right;}

    .jigoshop div.clear {
    clear: none;
    }

    It is just a workaround for your current settings. Let me know if works.

    Theme Author Stephen Cui

    (@scui2)

    I have to make some structure changes in order to work well with some e-commence plugin. It should be available next week.

    The CSS did it! Thank you SOOOO much!

    Oh, for pogies sake!

    The other code that you gave me earlier in the thread moved the products away from hugging the left edge like they were before. The CSS fix works with the voyage_grid_full() function, but not voyage_grid_class().

    So to recap, here is the code to put in functions.php:

    function mytheme_open_jigoshop_content_wrappers()
    {
    echo '<div class="' . voyage_container_class() . '"><div id="content" class="' . voyage_grid_full() .'" role="main">';
    }
    
    function mytheme_close_jigoshop_content_wrappers()
    {
    echo get_sidebar() . '</div></div>';
    }
    
    function mytheme_prepare_jigoshop_wrappers()
    {
    remove_action( 'jigoshop_before_main_content', 'jigoshop_output_content_wrapper', 10 );
    remove_action( 'jigoshop_after_main_content', 'jigoshop_output_content_wrapper_end', 10);
    
    add_action( 'jigoshop_before_main_content', 'mytheme_open_jigoshop_content_wrappers', 10 );
    add_action( 'jigoshop_after_main_content', 'mytheme_close_jigoshop_content_wrappers', 10 );
    }
    add_action( 'wp_head', 'mytheme_prepare_jigoshop_wrappers' );

    …And add this to the custom CSS:

    .jigoshop #sidebar_one { float: right;}
    
    .jigoshop div.clear {
    clear: none;
    }
    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    You know you can edit your posts by selecting the ‘Edit’ option underneath your post’s gravatar.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Voyage and Jigoshop’ is closed to new replies.