Reply 61731 to: General questions

Avatar: dennistouw
dennistouw
Participant
May 5, 2015 at 14:17

Hello Eva,

Thank you for your quick reply, I’ve fixed almost all of the questions above (figured number out 1 my own), however, I tried to add a second custom tab by implementing this code in the PHP function twice:

add_filter( ‘woocommerce_product_tabs’, ‘woo_new_product_tab’ );
function woo_new_product_tab( $tabs ) {

// Adds the new tab

$tabs[‘test_tab’] = array(
‘title’ => __( ‘New Product Tab’, ‘woocommerce’ ),
‘priority’ => 50,
‘callback’ => ‘woo_new_product_tab_content’
);

return $tabs;

}
function woo_new_product_tab_content() {

// The new tab content

echo ‘<h2>New Product Tab</h2>’;
echo ‘<p>Here\’s your new product tab.</p>’;

}

So for the first tab it worked perfectly, when I put it in a second time I get a fatal error? The extra tab is meant for reviews, isn’t there a built in option for this in woopress? If so, how do I activate it?

One other small question, In the categoriepages I use a search option just above the filters, but the lay-out of this function isn’t perfect. Can I edit the lay-out of this function?

Best regards,

Dennis

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.