I prefer to use get_the_ID() for things like that, which will return the ID of the current page/post.
$mjrelatedproducts = get_brands( get_the_ID() )->slug;
That should return the slug of the current page/post.
I prefer to use get_the_ID() for things like that, which will return the ID of the current page/post.
$mjrelatedproducts = get_brands( get_the_ID() )->slug;
That should return the slug of the current page/post.