A separate page with a description for the brand
-
I need that when clicking on a brand, they would not go to a page with a filter by the name of this brand, but to a page with a full description of this brand and a list of products.
The product page has its own short description of the brand.
I can create such a page for each brand separately. But I need to change all the links so that they are not
*****.com/shop/?filter_brand=rosenthal
and on the brand page, for example
*****.com/rosenthal
Can you suggest a hook to change this?
I can do it like this, but maybe you have a more beautiful solution?
function rudr_url_redirects() {
/* in this array: old URLs=>new URLs */
$redirect_rules = array(
array('old'=>'/shop/?filter_brand=rosenthal','new'=>'/rosenthal/'),
array('old'=>'/contacts/','new'=>'/Contacts/')
);
foreach( $redirect_rules as $rule ) :
// if URL of request matches with the one from the array, then redirect
if( urldecode($_SERVER['REQUEST_URI']) == $rule['old'] ) :
wp_redirect( site_url( $rule['new'] ), 301 );
exit();
endif;
endforeach;
}
add_action('template_redirect', 'rudr_url_redirects');
Hello,
We can hardly ever suggest something better, you can show the brand as an attribute page or a separate tab in the product page: https://xtemos.com/docs-topic/html-blocks-usage/ and https://xtemos.com/docs-topic/product-brands/
If you have any questions please feel free to contact us.
Best Regards
I know about this page. But I need a separate page for brands with a description. I got there when I clicked on the brand logo on the product page.
Hello,
The only way is just to create a manual template and fill it with the title of the brand, and content of the brand.
If you have any questions please feel free to contact us.
Best Regards