• Resolved chiara1977

    (@chiara1977)


    Hi, I like this plugin but it only has two categories, “new” and “used”. I’d need to add one more category (km 0, which is not new nor used)
    Is it possible to do that?
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter chiara1977

    (@chiara1977)

    Moreover, the category “vintage cars”
    Thanks again

    Not sure for a long term solution! Please note that this solution is not the proper solution for your needs! Since you need to modify the file every time when there is a new update for wp-car-manager. But you can always block auto updates if you want. And if you’re fine with it that you need to change it every time after a update that this is the easy quick solution to get what you need.

    You can simply change the code yourself for the time being.

    \wp-content\plugins\wp-car-manager\src\Vehicle\Data.php

    Search for:

    public static function get_conditions() {
    		return apply_filters( 'wpcm_conditions', array(
    			'new'  => __( 'New', 'wp-car-manager' ),
    			'used' => __( 'Used', 'wp-car-manager' )
    		) );
    	}

    Replace with:

    public static function get_conditions() {
    		return apply_filters( 'wpcm_conditions', array(
    			'new'  => __( 'New', 'wp-car-manager' ),
    			'used' => __( 'Used', 'wp-car-manager' ),
    			'classic'  => __( 'Classic', 'wp-car-manager' ),
    			'0km' => __( '0KM', 'wp-car-manager' )
    		) );
    	}
    • This reply was modified 6 years, 11 months ago by Patrick.
    • This reply was modified 6 years, 11 months ago by Patrick.
    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hello @chiara1977,

    The above solution should work but as the user warned you, after every update, you will lose the changes. Another way would be to add custom code to your theme or create another plugin to add the additional required features to our plugin. That said since this is beyond the scope of our support and I would recommend using a 3rd party developer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘add a new category’ is closed to new replies.