Category Topic Issue

NapitWPTech Theme Support Forums The NewsMag Category Topic Issue

This topic contains 3 replies, has 2 voices, and was last updated by  Bishal Napit 3 weeks, 3 days ago.

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

    webauthor
    Participant

    Hi Bishal, first off all: great design, awesome, really!
    I have an issue, if I klick a category and come on the category site e.g. business,
    the topic is: “category: business”, but I’d like only to see: “business”.
    How can I solve this?

    #191

    Bishal Napit
    Keymaster

    @webauthor

    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: https://napitwptech.com/tutorial/wordpress-development/tutorial-creating-wordpress-child-theme/ 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: https://wordpress.org/support/theme/the-newsmag/reviews/

    Thanks.
    Bishal Napit

    #192

    webauthor
    Participant

    Wow!! Great! Thanks so much!

    #193

    Bishal Napit
    Keymaster

    @webauthor

    Do let me know if there are any further query regarding to the theme.

    Thanks.
    Bishal Napit

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

You must be logged in to reply to this topic.