WordPress.org

Ready to get started?Download WordPress

Forums

Jigoshop
[resolved] Sidebars giving you an issue on personalised theme? (3 posts)

  1. Kizzie86
    Member
    Posted 1 year ago #

    I have absolutely zero experience in programmer information etc BUT I have just done a ton of research and it fixed my issue so I'm sharing it for others...

    When installing JigoShop first time (today) it threw out my whole layout
    Sidebars went down below and all over the place - I have seen all the tutorials and to me they dont make any sense as I'm not a programmers - but I did see this... woocommerce and jigoshop are very similar in their fixes..

    Jigo Shop suggested this
    http://forum.jigoshop.com/kb/customize-jigoshop/wrap-your-themes-content-for-jigoshop

    Woocommerce suggested this
    http://wcdocs.woothemes.com/codex/third-party-custom-theme-compatibility/

    They are both ALMOST the same apart from the obvious name change

    The only issue I found was the last two 'functions' were calling back differently (please excuse my explaining as I dont know programming talk)

    the add.action were both different

    Woocommerce

    add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10);
    add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10);

    Jigoshop

    add_action( 'jigoshop_before_main_content', 'mytheme_open_jigoshop_content_wrappers', 10 );
        add_action( 'jigoshop_after_main_content', 'mytheme_close_jigoshop_content_wrappers', 10 );

    SO STEP 1....

    Go to your page.php (in your theme)to find out what is called after
    <?php get_header()?>
    and before
    <?php if (have_posts()

    as you can see below mine is <section id="main-content">

    yours could be a div or div class... etc

    <?php get_header()?>
    
    		<!-- Begin Main Content ( left col ) -->
    		<section id="main-content">
    
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    				<!-- Begin Article -->

    Once you have that you need to go to your functions.php (in your theme)

    and scroll right down to the end before the '?>' tag
    and paste the following code (notice the changes from the above code?

    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', 'my_theme_wrapper_start', 10);
    add_action( 'jigoshop_after_main_content', 'my_theme_wrapper_end', 10);

    Then click enter...

    Then copy and paste the following

    function my_theme_wrapper_start() {
      echo '<section id="main-content">';
    }
    
    function my_theme_wrapper_end() {
      echo '</section>';

    Change the info after the echo echo '<'PUT YOURS HERE from Page.php'>

    then echo'</end yours here>'

    Hope that helps - its fixed my layout - and developers if there is something wrong with this could you please let me know ??? I would appreciate it heaps!! :)

    http://wordpress.org/extend/plugins/jigoshop/

  2. mindbuster
    Member
    Posted 1 year ago #

    you're better off posting in http://forum.jigoshop.com.

    there's nothing wrong with what you did. That's the proper way to wrap your theme.

    Thanks

  3. therealbodysculpter
    Member
    Posted 1 year ago #

    thanks for explaining this, it kind of worked for me, on some of the pages, the main shop page is still giving resistance, however, i am working with it

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic