• Resolved qubecharity

    (@qubecharity)


    Hi there, Great plugin btw… I’m just having 2 issues making it work for my business:

    Is there a way to add actions to the vendor shop template? As I want to:
    1. Hide/remove the filter and ‘sort by’ bar. As all my vendors will only have 1-5 products so there is no need for this and it will confuse customers
    2. Hide the menu navigation and my website logo on vendor shops so it’s unbranded

    As I’ve previously added these actions in my functions folder for product attributes using the below example. OR is there another way I can achieve this?

    function post_template() {
    if( has_tag( ‘prep’ ) ) {
    ?> <style>
    .thb-full-menu{
    display: none!important
    }
    }
    add_action( ‘wp’, ‘post_template’ );

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    Thanks for the kind words!

    1. The vendor shop template is actually just a hook into the main product-archive loop. So you would use the usual unhooks for the product-archive, but you would check if the page is a vendor page first.

    You can use this code check

    if ( ! WCV_Vendors::is_vendor_page() && ! WCV_Vendors::is_vendor_product_page( $post->post_author ) ) { //add unhook here }

    2. See answer to 1.

    cheers,

    Jamie.

    Thread Starter qubecharity

    (@qubecharity)

    Hi Jamie, Thanks but I can’t get the code to work. I’m now using the pro plugin, will that matter? I’ve tried all of the below with no luck

    if ( ! WCV_Vendors::is_vendor_page() && ! WCV_Vendors::is_vendor_product_page( $post->post_author ) ) { 
    .thb-shop-title{ display:none;
    }
    if ( ! WCV_Vendors::is_vendor_page() && ! WCV_Vendors::is_vendor_product_page( $post->post_author ) ) { 
    <style>.thb-shop-title{ display:none</style>
    }
    function vendor_store_style() {
    if ( ! WCV_Vendors::is_vendor_page() && ! WCV_Vendors::is_vendor_product_page( $post->post_author ) ) { 
    		?> <style>
    .thb-shop-title{ display:none !important;
    			</style>
    		<?php
    	}
    }
    add_action( 'wp', 'vendor_store_style' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘vendor shop template’ is closed to new replies.