Child Themes on Multisite Help

Hi,

1.I activated only child themes to be used by the users VIA Pro Sites premium themes feature.

But I just want to remove the text "This is a child theme of (theme name)"

I attached a screenshot too. How do I get rid of that in all the child themes?

2. I use themes from various sources like Elegant themes etc, am I free to use their theme description?

Kindly help.

  • Ivan
    • HummingBird

    Hey Aathithyan,

    Thanks for the question!

    You can hide this box with a little CSS added to the functions.php for every theme you like to hide it.

    Just use this snippet:

    function custom_colors() {
    	global $user_level;
    	if ($user_level != '10' ) {
    	   echo '<style type="text/css">
    		   	.theme-overlay .parent-theme {
    				display: none !important;
    			}
    		 </style>';
       }
    }
    
    add_action('admin_head', 'custom_colors');

    Please not that this will hide "This is a child theme of (theme name)" only if the user is not admin.

    If you want to hide for everyone (even for you), you can use this one:

    function custom_colors() {
    	   echo '<style type="text/css">
    		   	.theme-overlay .parent-theme {
    				display: none !important;
    			}
    		 </style>';
    }
    
    add_action('admin_head', 'custom_colors');

    As for your second question - most probably you shouldn't have nay problems using their description, but the best will be to read the premium themes license you are using, as this will be different per theme/developer and you should ask them or read their Terms of service and/or license.

    Let me know if this helps. :slight_smile:

    Thanks,
    Ivan

  • CatMan
    • The Incredible Code Injector

    Hi,

    Thanks for helping. One more doubt.

    If I use that code directly in parent theme,in next update it will get erased right?

    So shall I just copy the functions.php file from parent theme to child theme and make the changes? Will that work?

  • Ivan
    • HummingBird

    Hi Aathithyan,

    You should place this code in the "functions.php" in the child theme.

    When the child theme with this code is activated - the text will be removed.

    So you need to add this snippet to the child themes you like to hide this message.

    Please note that the first snippet wont hide it for you, because you are an admin. If you want to be hidden even from you - use the second snippet.

    Hope this makes sense.

    Thanks,
    Ivan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.