Grow your CSS skills. Land your dream job.

WOOCOMMERCE: How can I separate two functions that display “tabs” and “related products”?

  • # February 9, 2013 at 7:02 pm

    I recently added a div to wrap the right side of the single-product page. It consists of the Product’s: Title, Price, Variable Drop-down list, tabs, ect.

    After doing this my related products are no longer floated left, and are positioned to the very right.
    I’d like to figured out how to separate these functions into two individual snippets of code.

    < ?php /** * woocommerce_after_single_product_summary hook * * @hooked
    woocommerce_output_product_data_tabs – 10 * @hooked woocommerce_output_related_products
    – 20 */ do_action( ‘woocommerce_after_single_product_summary’ ); ?>

    Screenshot//
    [single-products page](http://i45.tinypic.com/dheuqq.png “SCREENSHOT”)

    # February 10, 2013 at 7:48 pm

    There is only one function in the snippet you’ve provided:

    < ?php do_action( 'woocommerce_after_single_product_summary' ); ?>

    The first part within the php tags is a comment:

    /** * woocommerce_after_single_product_summary hook * * @hooked
    woocommerce_output_product_data_tabs – 10 * @hooked woocommerce_output_related_products
    – 20 */

    Rather than a screenshot which only shows a result, a link to the actual page would be easier to troubleshoot.

    # February 11, 2013 at 12:54 am

    @darinroman I figured the comments described what was inside of that function…I deleted the function and both the tabs and related products where removed so that’s how I came to realize it was 2 in one…

    # February 11, 2013 at 7:09 pm

    I will post before and after screenshots. 1 with the php code still in place and another with it deleted. To prove that it’s definitely a two in one function.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".