• Hello Hello,

    In order to display posts on different pages, I had to employ categories. Now the name of the category is displayed at the top left of the page. I have already applied some code to the php theme file in order to remove the word “category”. But the name of the category, in this case “Algeria”, still shows. I would like to hide this category name.

    Is there a plugin or some better code I can use? Or an entirely different solution?

    I would greatly appreciate any help.

    P.S. – the code I used to remove the word “category” is:

    function prefix_category_title( $title ) {
    if ( is_category() ) {
    $title = single_cat_title( ”, false );
    }
    return $title;
    }
    add_filter( ‘get_the_archive_title’, ‘prefix_category_title’ );

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mark5967

    (@mark5967)

    Well, I added some basic css code to the customize area and maybe it worked?

    .page-header .entry-title {
    display: none;
    }

    Seems too easy to be true, but it did what I wanted…at least in this case.

    Thread Starter mark5967

    (@mark5967)

    Huh, I guess I don’t need that php code after all, the css did what I wanted.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘remove category name from post’ is closed to new replies.