Reply To: Category Topic Issue

NapitWPTech Theme Support Forums The NewsMag Category Topic Issue Reply To: Category Topic Issue


Bishal Napit


For that, you can create a child theme and then do the customization work via the child theme. Here, for your easiness, you can follow this tutorial: on creating the WordPress child theme. Now, in the created child theme, you can edit the functions.php file and then add the below PHP code in that file and check:

function the_newsmag_colored_category_title($title) {
	$color_value = the_newsmag_category_color(get_cat_id($title));
	$color_border_value = the_newsmag_category_color(get_cat_id($title));
	if (!empty($color_value)) {
		return '<h1 class="page-title" style="border-bottom: 4px solid' . esc_attr($color_border_value) . '">' . '<span style="background: ' . esc_attr($color_value) . '">' . sprintf(esc_html__('%s', 'the-newsmag'), $title) . '</span></h1>';
	} else {
		return '<h1 class="page-title"><span>' . sprintf(esc_html__('%s', 'the-newsmag'), $title) . '</span></h1>';

If you like the theme and appreciate the work put out on the theme, then, you can help by rating this theme through this link here:

Bishal Napit