WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Add content to all product description tabs (1 post)

  1. daileycon
    Member
    Posted 1 year ago #

    I was wondering if there is a better way to add content to all description tabs for products. Currently I created a shortcode in functions.php:

    //Product Description Tab Output
    function pdto_func( $atts ){
    return '<p>My Content</p>';
    }
    add_shortcode( 'pdto', 'pdto_func' );

    Then I added <?php echo do_shortcode('[pdto]'); ?> to the /plugins/woocommerce/templates/single-product/tabs/description.php file.
    It works great but is there a better way to do something like this where I won't have to add code to the description.php file? Can I hook in My Content somehow from functions.php?
    Thanks.

    http://wordpress.org/extend/plugins/woocommerce/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.