2013-02-28 122 views
1

我想讓jigoshop把所有東西放在我的主容器中,它看起來不起作用。Jigoshop造型問題

我的模板是下面:

<?php get_header(); ?> 
<div id="productsidebar"><?php get_sidebar('products'); ?></div> 
<div id="contentwrap"> 

<?php if (have_posts()) : while (have_posts()) : the_post(); ?> 
    <div class="post" id="post-<?php the_ID(); ?>"> 
     <div class="entry"> 
      <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?> 

      <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> 

     </div> 
    </div> 
    <?php endwhile; endif; ?> 
</div><!-- #content --> 
<?php get_footer(); ?> 

,我有這在我的函數文件按照Jigoshops更換主題皮膚(http://forum.jigoshop.com/kb/customize-jigoshop/wrap-your-themes-content-for-jigoshop

function mytheme_open_jigoshop_content_wrappers() 
{ 
echo '<div id="productsidebar"></div><div id="contentwrap">'; 
} 

function mytheme_close_jigoshop_content_wrappers() 
{ 
echo '</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'); 

當我在把工具條功能顯然這是示數功能文件。

任何人都可以建議如何做到最好?

網站是http://upholstery180degree.co.uk/NewSite/

感謝

回答

0

分析代碼的功能是把產品頁面中的主容器的規定之後。

<div id="contentwrap"> 
    <ul class="products"> 
    <li class="product first"> 

雖然從它好像你正在使用不同的模板爲您的店鋪頁面中,這是造成它顯示從你的網站上的小部件。您的代碼工作正常,我會進入您的產品頁面並更改其使用的模板類型,並使其與您的其他頁面相同。你也不需要側邊欄的div信息,因爲它不是主包裝的一部分。

function mytheme_open_jigoshop_content_wrappers() 
{ 
    echo '<div id="contentwrap">'; 
} 

function mytheme_close_jigoshop_content_wrappers() 
{ 
    echo '</div>'; 
} 
+0

嗨羅伯託,我使用默認模板?我剛剛檢查過:S – 2013-02-28 10:13:08

+0

所有使用默認模板的頁面?某物正在調用<?php get_sidebar(); ?>在您的產品頁面中。這很可能是一個模板或您正在使用的頁面。 – 2013-02-28 10:14:21

+0

嗨羅伯特,是的,他們是 – 2013-02-28 10:16:55