Home Forums WoodMart support forum Theme Settings Option Preset Problem

Theme Settings Option Preset Problem

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #293107

    serezart
    Participant

    Hi support,

    When I select the Term ID in the theme settings and save, the Term ID I selected disappears. Since it disappears, I cannot see later which setting I selected. What is the cause of this problem? I used the theme on many sites and checked all of them. It is the same in all of them. Please find attached video of wrong.

    I request your help.

    #293259

    Artem Temos
    Keymaster

    Hello,

    Yes, it is a bug in our theme. Try to edit the file woodmart/inc/options/class-presets.php and replace the following code

    if ( 'term_id' === $rule['type'] && ! empty( $rule['value_id'] ) ) {
    	$term_object = false;
    	$taxonomies = get_taxonomies();
    	foreach ( $taxonomies as $tax_type_key => $taxonomy ) {
    		$term_object = get_term_by( 'id', $rule['value_id'], $taxonomy );
    		if ( ! $term_object ) {
    			break;
    		}
    	}
    	if ( $term_object ) {
    		$title = $term_object->name;
    	}
    }

    with this one

    if ( 'term_id' === $rule['type'] && ! empty( $rule['value_id'] ) ) {
    	$taxonomies = get_taxonomies();
    	foreach ( $taxonomies as $taxonomy ) {
    		$term_object = get_term_by( 'id', $rule['value_id'], $taxonomy );
    		if ( $term_object ) {
    			$title = $term_object->name;
    		}
    	}
    }

    Kind Regards

    #293713

    serezart
    Participant

    Hi support,

    The problem solved.

    Thank you for your support!

    #293851

    Artem Temos
    Keymaster

    Great, you are welcome!

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Theme Settings Option Preset Problem’ is closed to new replies.