This topic has 4 replies, 3 voices, and was last updated 8 years, 7 months ago ago by Stan Russell
In relation to this topic (https://www.8theme.com/topic/translate-brand-text-from-link/), whenever the theme is updated I must make the same change.
I copied the same file on the child theme but the change is not overwritten the main theme.
Can you tell me how to make this change permanently?
Thank you.
Hello,
Please try to add this function into the function.php file of Child Theme and make change there.
function et_create_brand_taxonomies() {
$labels = array(
'name' => _x( 'Brands', ETHEME_DOMAIN ),
'singular_name' => _x( 'Brand', ETHEME_DOMAIN ),
'search_items' => __( 'Search Brands', ETHEME_DOMAIN ),
'all_items' => __( 'All Brands', ETHEME_DOMAIN ),
'parent_item' => __( 'Parent Brand', ETHEME_DOMAIN ),
'parent_item_colon' => __( 'Parent Brand:', ETHEME_DOMAIN ),
'edit_item' => __( 'Edit Brand', ETHEME_DOMAIN ),
'update_item' => __( 'Update Brand', ETHEME_DOMAIN ),
'add_new_item' => __( 'Add New Brand', ETHEME_DOMAIN ),
'new_item_name' => __( 'New Brand Name', ETHEME_DOMAIN ),
'menu_name' => __( 'Brands', ETHEME_DOMAIN ),
);
$args = array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
'capabilities' => array(
'manage_terms' => 'manage_product_terms',
'edit_terms' => 'edit_product_terms',
'delete_terms' => 'delete_product_terms',
'assign_terms' => 'assign_product_terms',
),
'rewrite' => array( 'slug' => 'brand' ),
);
register_taxonomy( 'brand', array( 'product' ), $args );
}
Regards,
Robert Hall
Hello Robert,
The function works correctly.
Thank you!
Hello Rawi7,
you are welcome!
Regards,
Stan Russell.
Tagged: child theme, files, main theme, overriding, themes, woocommerce, wordpress
The issue related to '‘Overriding child theme files on the main theme’' has been successfully resolved, and the topic is now closed for further responses