• Resolved Guido

    (@guido07111975)


    Hi,

    I notice Jigoshop uses these 2 functions:
    jigoshop_output_content_wrapper
    jigoshop_output_content_wrapper_end

    These functions add a div/class to all productpages.
    In my theme it’s adding this directly before product listing:

    <div id="container"><div id="content" role="main">

    And this after:

    </div></div>

    This causes serious layout issues in my theme because:
    1) Container should not be used there, in most themes it’s located before header. Now my container css (padding/margin) is added before productlisting as well.
    2) My theme uses another div besides content on pages

    I notice you have a custom fix for this but for users who don’t know much about php it’s better to fix this in next update.
    https://www.jigoshop.com/documentation/wrap-themes-content-jigoshop/

    I guess the product listing should be loaded in a ‘regular’ theme page template.

    Guido

    https://www.ads-software.com/plugins/jigoshop/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Guido,
    that’s something that was already in jigoshop when we took it over nearly year ago. We can’t change it easily as many themes depend on it already, but we’re trying to improve it in 2.x series that is just about to be released

    Thread Starter Guido

    (@guido07111975)

    I understand.

    I have changed the function in my child theme functions file by removing default action:

    remove_action('jigoshop_before_main_content', 'jigoshop_output_content_wrapper', 9);
    remove_action('jigoshop_after_main_content', 'jigoshop_output_content_wrapper_end', 9);

    And adding it again with the divs I use in my theme (content and main):

    if (!function_exists('jigoshop_output_content_wrapper')) {
    	function jigoshop_output_content_wrapper(){
    		echo '<div id="content"><div class="main">';
    	}
    }
    add_action('jigoshop_before_main_content', 'jigoshop_output_content_wrapper', 10);
    
    if (!function_exists('jigoshop_output_content_wrapper_end')) {
    	function jigoshop_output_content_wrapper_end() {
    		echo '</div></div>';
    	}
    }
    add_action('jigoshop_after_main_content', 'jigoshop_output_content_wrapper_end', 10);

    I indeed hope you have a improvement in your new version because users without php knowledge can ignore your plugin because of this.

    Guido

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Jigoshop function causes serious layout issues’ is closed to new replies.