Claim your freedom to choose the perfect partner for your multi-vendor journey.

FREEDOM25

Celebrate the festive season by giving your marketplace a powerful lift!

FESTIVE20

5.0.0
Something big is coming for marketplace admins… MultiVendorX 5.0 is almost here. Are you ready?
Be the first to explore all the game-changing features!
Power your marketplace dreams with unbeatable Black Friday deals!

MVXBLACK30

Supercharge your marketplace vision with unstoppable Cyber Monday deals!

MVXCYBER30

Holiday cheer, bigger savings
Take 25% off-because your marketplace deserves a gift too.

happyholiday

Redirect Vendor Author Page

Resolved
Viewing 2 reply threads
  • Author
    Posts
    • #193557
      DragNfLy
      Participant

      Good day,

      Can you assist with code to redirect the Vendor Author Page to the Vendor Shop page.

      I was trying something like the below but do not know the correct function:

      [code]
      function redirect_vendor_author_url() {
      if ( is_author() && class_exists( ‘WCMp’ ) ) {
      $author_id = get_query_var( ‘author’ );
      $vendor_id = get_user_meta( $author_id, ‘_vendor_id’, true );

      if ( $vendor_id ) {
      $vendor_shop_url = get_wcmp_vendor_shop_page( $vendor_id );
      if ( $vendor_shop_url ) {
      wp_redirect( $vendor_shop_url );
      exit;
      }
      }
      }
      }
      add_action( ‘template_redirect’, ‘redirect_vendor_author_url’ );
      [/code]

      This code does not work. please assist.

      Kind regards,

    • #193576

      @DragNfLy Can you please explain first what you mean by vendor author page. It will be great if you kindly share a video explaining the flow you are looking for so that we can help you accordingly.
      Also the code you are using is for WCMP that is why it is not working. So kindly use the corresponding class name and hook name for MultiVendorX in your code and check.

    • #195325

      Its been while and we have not heard back from you. We presume your issue is solved now. We are closing this thread. If you need help or face issue in future please open a new thread.

Viewing 2 reply threads
  • The topic ‘Redirect Vendor Author Page’ is closed to new replies.
Shopping Cart
Scroll to Top