最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Move WooCommerce product tabs out of the tabs

programmeradmin0浏览0评论
Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 6 years ago.

Improve this question

I want to have the product tabs out of the tabs section and put them one down the other with no need of having the tabs functionality.

I can unset the tabs

add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );

function woo_remove_product_tabs( $tabs ) {

     unset( $tabs['description'] );
     unset( $tabs['reviews'] );
     unset( $tabs['additional_information'] );

   return $tabs;
}

but I dont know how to reset them in columns layout and not in tabs.

Thanks for any help

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 6 years ago.

Improve this question

I want to have the product tabs out of the tabs section and put them one down the other with no need of having the tabs functionality.

I can unset the tabs

add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );

function woo_remove_product_tabs( $tabs ) {

     unset( $tabs['description'] );
     unset( $tabs['reviews'] );
     unset( $tabs['additional_information'] );

   return $tabs;
}

but I dont know how to reset them in columns layout and not in tabs.

Thanks for any help

Share Improve this question asked Nov 25, 2018 at 18:45 BillBill 151 silver badge7 bronze badges 10
  • where to move product tab? – vikrant zilpe Commented Nov 26, 2018 at 7:15
  • I want to disable tabs and have the section in the same place, but on down the other. Not in tabs – Bill Commented Nov 26, 2018 at 8:21
  • not clear please send screen ? i wait – vikrant zilpe Commented Nov 26, 2018 at 8:23
  • move the tabs below the image/description area ? – vikrant zilpe Commented Nov 26, 2018 at 8:26
  • @vikrantzilpe here is the screen of what I want to achieve prnt.sc/ln4y8z having the info in the same place but without tabs – Bill Commented Nov 26, 2018 at 13:16
 |  Show 5 more comments

1 Answer 1

Reset to default 2

It turned out that woocommerce_get_template() was deprecated and replaced by wc_get_template(). I solved this by adding this to my functions.php.

add_action( 'woocommerce_after_single_product_summary', 'removing_product_tabs', 2 );

function removing_product_tabs(){
    remove_action('woocommerce_after_single_product_summary','woocommerce_output_product_data_tabs', 10 );
    add_action('woocommerce_after_single_product_summary','get_product_tab_templates_displayed', 10 );
}

function get_product_tab_templates_displayed() {
    wc_get_template( 'single-product/tabs/description.php' );
    wc_get_template( 'single-product/tabs/additional-information.php' );
    comments_template();
}
发布评论

评论列表(0)

  1. 暂无评论