Support » Themes and Templates » How to remove category title

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael

    (@alchymyth)

    Forum Moderator

    edit category.php (if there is none, then edit archive.php; if this is not there either, then edit index.php)

    look for a line of code with single_cat_title(); – then delete it with the corresponding html tag.

    make a backup copy of your theme files before editing.

    I found these codes in archieve.php just like following;

    if (have_posts()){

    global $posts;
    $post = $posts[0];

    ob_start();

    if (is_category()) {

    echo ‘<h4>’. single_cat_title( ”, false ) . ‘</h4>’;
    echo category_description();

    } elseif( is_tag() ) {

    echo ‘<h4>’. single_tag_title(”, false) . ‘</h4>’;

    } elseif( is_day() ) {

    echo ‘<h4>’. sprintf(__(‘Daily Archives: <span>%s</span>’, THEME_NS), get_the_date()) . ‘</h4>’;

    } elseif( is_month() ) {

    echo ‘<h4>’. sprintf(__(‘Monthly Archives: <span>%s</span>’, THEME_NS), get_the_date(‘F Y’)) . ‘</h4>’;

    } elseif( is_year() ) {

    echo ‘<h4>’. sprintf(__(‘Yearly Archives: <span>%s</span>’, THEME_NS), get_the_date(‘Y’)) . ‘</h4>’;

    } elseif( is_author() )

    But i don’t know where I need to make changes

    Remove or comment out

    echo '<h4>'. single_cat_title( '', false ) . '</h4>';
    echo category_description();

    (To comment them out, and thereby leave the code in the file in case you need it later, just add // before each of those two lines).

    As alchymyth said- do back up before you make any changes.

    And see if that does what you need.

    problem solved 😀
    thank you so much Joshuwar and alchymyth

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to remove category title’ is closed to new replies.