Seller Link under Product title

This topic contains 1 reply and 2 voices, and was last updated by Nizam Uddin 10 years, 7 months ago
Viewing 1 Posts - 1 through 1 (of 1 total)
Author Posts
April 25, 2014 at 3:43 pm 19387
Nizam Uddin Hi, How can i set a link from the seller under the product title? I would like to have the same link as in the seller info tab under the product title? I have try this one, but i't don^t show the link?
<li class="seller-name">
            <span>
                <?php _e( 'Seller:', 'dokan' ); ?>
            </span>

            <span class="details">
                <?php printf( '<a href="%s">%s</a>', dokan_get_store_url( $author->ID ), $author->display_name ); ?>
            </span>
        </li>
Thanks for help.
April 28, 2014 at 12:37 pm 19500
Nizam Uddin Nizam Uddin

Hello
Please use the following code

add_action( 'woocommerce_single_product_summary', 'link_view', 9 );

function link_view() {
    global $product;

    $author = get_user_by( 'id', $product->post->post_author );
    ?>
    <span>
        <?php _e( 'Seller:', 'dokan' ); ?>
    </span>

    <span class="details">
        <?php printf( '<a href="%s">%s</a>', dokan_get_store_url( $author->ID ), $author->display_name ); ?>
    </span>
    <?php
}
Viewing 1 Posts - 1 through 1 (of 1 total)