WordPress.org

Ready to get started?Download WordPress

Forums

Voyage
[resolved] [closed] Voyage and Jigoshop (22 posts)

  1. Czarzhan
    Member
    Posted 1 year ago #

    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.

  2. Stephen Cui
    Member
    Theme Author

    Posted 1 year ago #

    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.

  3. Czarzhan
    Member
    Posted 1 year ago #

    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' );
  4. Stephen Cui
    Member
    Theme Author

    Posted 1 year ago #

    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.

  5. Czarzhan
    Member
    Posted 1 year ago #

    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.

  6. Czarzhan
    Member
    Posted 1 year ago #

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

  7. Stephen Cui
    Member
    Theme Author

    Posted 1 year ago #

    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>';

  8. Czarzhan
    Member
    Posted 1 year ago #

    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? :)

  9. Stephen Cui
    Member
    Theme Author

    Posted 1 year ago #

    Nevermind. For second action: try

    echo '</div>' . get_sidebar() . '</div>';

  10. Stephen Cui
    Member
    Theme Author

    Posted 1 year ago #

    first action:

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

  11. Stephen Cui
    Member
    Theme Author

    Posted 1 year ago #

    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.

  12. Stephen Cui
    Member
    Theme Author

    Posted 1 year ago #

    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.

  13. Stephen Cui
    Member
    Theme Author

    Posted 1 year ago #

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

  14. Czarzhan
    Member
    Posted 1 year ago #

    The CSS did it! Thank you SOOOO much!

  15. Czarzhan
    Member
    Posted 1 year ago #

    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;
    }
  16. Andrew
    Forum Moderator
    Posted 1 year ago #

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

  17. Stephen Cui
    Member
    Theme Author

    Posted 1 year ago #

    Just let you know that this is just a workaround. I am not satisfied myself. I changed my theme and moved the container class to the header.

    Once you update version 1.2.1 (to be released soon)

    The first action

    echo '<div id="content" class="' . voyage_grid_class() .'" role="main">';

    second action.

    echo '</div>';

    hopefully you do not need the custom CSS as I do not like it. It all depends on when the Jigoshop calls get_sidebar(). Change to voyage_grid_full() if it does not work,

  18. Czarzhan
    Member
    Posted 1 year ago #

    Andrew, there is no Edit option anywhere near my post's gravatar, or anywhere on the post that I can see.(EDIT: Oh, there it is)

    Stephen, voyage_grid_class() didn't work for me, only voyage_grid_full(). voyage_grid_class() didn't even address the left border issue when I tried it after a successful test. But I will try it when you update. Thanks again for your help.

  19. Stephen Cui
    Member
    Theme Author

    Posted 1 year ago #

    I mean you should try after next release

  20. Czarzhan
    Member
    Posted 1 year ago #

    That's what I meant by 'update'. Sorry for the confusion. And thanks.

  21. shop8079
    Member
    Posted 1 year ago #

    ok so im confused by all this computer language.. so im having the same issue but i dont know where to insert

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

    into my site.. please help me

  22. Andrew
    Forum Moderator
    Posted 1 year ago #

    @shop8079, If you can't manage this yourself, consider hiring someone to do it for you.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic