Ready to get started?Download WordPress


[resolved] How to remove category title (5 posts)

  1. blackleon1986
    Posted 3 years ago #

    <img src=http://www.freeimagehosting.net/uploads/th.3601cc51e4.jpg alt="Free Image Hosting by FreeImageHosting.net">

    hi. I want to ask how can i solve this problem showed above picture.

    When I click on a category, category title appear on the top of the page. how can i remove or hide this.
    (PS: it is not title of the post)

  2. alchymyth
    Forum Moderator
    Posted 3 years ago #

    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.

  3. blackleon1986
    Posted 3 years ago #

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

    if (have_posts()){

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


    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

  4. Joshuwar
    Posted 3 years ago #

    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.

  5. blackleon1986
    Posted 3 years ago #

    problem solved :D
    thank you so much Joshuwar and alchymyth

Topic Closed

This topic has been closed to new replies.

About this Topic