• Resolved harryvek

    (@harryvek)


    Is it possibel to remove “brand” from the brand archives pages:
    domain.com/brand/example – > domain.com/example

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor titodevera

    (@titodevera)

    1) Add this code to your functions.php

    
    add_filter( 'register_taxonomy_args', function( $args, $taxonomy ){
      if( 'pwb-brand' === $taxonomy && is_array( $args ) ){
        $args['rewrite']['slug']       = '.';
        $args['rewrite']['with_front'] = false;
      }
      return $args;
    }, 99, 2 );
    

    2) Rebuild WordPress permalinks Settings > Permalinks, and click save changes.

    I’ve tried this one but it does not work now.

    Any updates to the above code ?

    Thanks,
    T4

    Hi there @titodevera, I’m having the same issue as thnk4, this code is not working and results in a 404 error, please advise

    Hi, tell me how to disable the archive of the brand and remove the link to the archive from the brand image in the product card.

    I want that as a result, only the image of the brand is displayed in the product card.

    `
    Array
    (
    [home_url] => https://localhost/brw
    [site_url] => https://localhost/brw
    [version] => 3.3.5
    [wp_version] => 4.9.5
    [wp_multisite] =>
    [wp_memory_limit] => 40M
    [wp_debug_mode] =>
    [wp_cron] => 1
    [language] => ru_RU
    [server_info] => Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/5.6.28
    [php_version] => 5.6.28
    [php_post_max_size] => 500M
    [php_max_execution_time] => 5000
    [php_max_input_vars] => 1500
    [max_upload_size] => 524288000
    [default_timezone] => UTC
    [theme] => Array
    (
    [name] => snssimen
    [version] => 3.2
    [parent_theme] =>
    )

    [active_plugins] => Array
    (
    [0] => redux-framework/redux-framework.php
    [1] => contact-form-7/wp-contact-form-7.php
    [2] => cyr3lat/cyr-to-lat.php
    [3] => image-widget/image-widget.php
    [4] => js_composer/js_composer.php
    [5] => loco-translate/loco.php
    [6] => meta-box/meta-box.php
    [7] => perfect-woocommerce-brands/main.php
    [8] => revslider/revslider.php
    [9] => sns-posttype/sns-posttype.php
    [10] => woocommerce/woocommerce.php
    [11] => yith-newsletter-popup/init.php
    [12] => yith-woocommerce-ajax-navigation/init.php
    [13] => yith-woocommerce-compare/init.php
    [14] => yith-woocommerce-quick-view/init.php
    [15] => yith-woocommerce-wishlist/init.php
    )

    [pwb_options] => Array
    (
    [version] => 1.6.4
    [wc_pwb_admin_tab_brand_single_position] => before_title
    [old_wc_pwb_admin_tab_slug] => brand
    [wc_pwb_notice_plugin_review] =>
    [wc_pwb_admin_tab_slug] =>
    [wc_pwb_admin_tab_brand_desc] => no
    [wc_pwb_admin_tab_brand_single_product_tab] => no
    [wc_pwb_admin_tab_brands_in_loop] => no
    [wc_pwb_admin_tab_brands_in_single] => brand_image
    [wc_pwb_admin_tab_brand_logo_size] => thumbnail
    )

    )
    `

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove “brand” from archives permalink’ is closed to new replies.