• Resolved Kir 2012

    (@kir-2012)


    Hi, apologies if this is an easy one, I’ve looked at length but can’t see the info I need anywhere.

    I’d like to override class-profile.php in child theme or change the default icon on the posts tab to something else, can anyone help?

    I’ve tried adding file class-profile.php into child in the following ways:

    my-child-theme/ultimate-member/templates/class-profile.php

    my-child-theme/ultimate-member/templates/core/class-profile.php

    my-child-theme/ultimate-member/templates/includes/core/class-profile.php

    my-child-theme/ultimate-member/core/class-profile.php

    my-child-theme/ultimate-member/includes/core/class-profile.php

    my-child-theme/plugins/ultimate-member/core/class-profile.php

    my-child-theme/plugins/ultimate-member/includes/core/class-profile.php

    ….. I can’t get it to work!!

    Any help would be appreciated, I don’t want to write over the plugin file, many thanks!

Viewing 1 replies (of 1 total)
  • Plugin Support mansurahamed

    (@mansurahamed)

    Hi @kir-2012,

    Sorry, it’s not possible to over-ride class files through child theme. You can only over-ride template files ( from templates folder of plugin ). You can add following code in your child theme’s functions.php file to change the post tab icon

    add_filter('um_profile_tabs', 'add_custom_profile_tab', 1000 );
    function add_custom_profile_tab( $tabs ) {
    
    	$tabs['posts'] = array(
    					'name' => __( 'Posts', 'ultimate-member' ),
    					'icon' => 'um-faicon-comment'
    				);
    		
    	return $tabs;
    		
    }

    I have changed it to ‘um-faicon-comment’ at above code, you can use your own icon here.

    Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘Override class-profile.php in child theme or change default icon on posts tab’ is closed to new replies.