Home Forums Theme Support Dokan Seller Link under Product title

This topic is: not resolved

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Nizam Uddin 4 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #19387

    Tobias
    Member
    Post count: 10

    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.

    #19500

    Nizam Uddin
    Keymaster
    Post count: 670

    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 2 posts - 1 through 2 (of 2 total)

The topic ‘Seller Link under Product title’ is closed to new replies.