Home Forums WC Vendors Free Support Placing Vendor Name in Title of Shop

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #8164
    datatv
    Participant

    I’m trying to find this in the knowledge base but closest thing I’ve found is displaying names of logged in users. Not really what I want. What I’d like to be able to do is display the vendors name in my shop in my page.php template like this

    <h1>WC Vendor’s Shop</h1>

    Simple, but can’t find the right code to display the vendor’s name dynamically. Any help to guide me in the right direction?

    #8166
    WC Vendors Support
    Participant

    Hi @datatv

    How do you know what vendors store to display dynamically?

    By taking the user ID of the vendor you want to show the store name of, you can pull the users meta of pv_shop_name and echo that out.

    Ben

    #8285
    datatv
    Participant

    So maybe this?

    echo get_user_meta( $user_id, ‘pv_shop_name’, true );

    #8311
    WC Vendors Support
    Participant

    Yup, of course you’d have to set $user_id to the user id # of the vendors shop you want to display.

    #8318
    datatv
    Participant

    But I’d want that filled in dynamic depending on the shop vendor they’d be going to. So if they went to your shop (let’s say http://whatever.com/vendors/ben/, it should say ‘Ben’s Shop’ in the title.

    #8319
    WC Vendors Support
    Participant

    Why not just enable the Vendor Headers in the WC Vendors settings and then use the templates?

    https://www.wcvendors.com/knowledgebase/changing-vendor-templates/

    https://github.com/wcvendors/wcvendors/blob/master/templates/front/vendor-main-header.php

    That template will load before the vendors store page and you can style it any way you like with pre-written variables in it. 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘WC Vendors Free Support’ is closed to new topics and replies.