How to hide page and post titles in WordPress

Marc Wag­ner

Sep­tem­ber 5, 2024

4 min read|

In Word­Press, the title of a page or post is usual­ly one of the cen­tral ele­ments dis­play­ed on your web­site. The title helps your rea­ders to under­stand the con­tent and pro­vi­des search engi­nes with important infor­ma­ti­on. Howe­ver, the­re are situa­tions whe­re it can be useful to hide the title, whe­ther for aes­the­tic reasons or to bet­ter match the design of a par­ti­cu­lar page. In this blog post, I’ll explain how you can easi­ly hide page and post titles in Word­Press.

Why hide the title? #

The­re are various reasons why you might want to hide the title of a page or post in Word­Press:

  • Design cus­to­miza­ti­ons: Some­ti­mes the title does not match the rest of the page design, espe­ci­al­ly if you are using spe­cial lay­outs or tem­pla­tes.
  • Landing pages: On landing pages or spe­cial sales pages, you may want to focus on spe­ci­fic con­tent and dis­play the title incon­spi­cuous­ly or not at all.
  • Avo­id repe­ti­ti­on: If the title of a post or page alre­a­dy appears in a head­line or other pro­mi­nent ele­ment, it may be unneces­sa­ry to dis­play it again.

Regard­less of the reason, the­re are various methods you can use to hide the title in Word­Press.

Method 1: Hide the title with a plugin #

For users who do not have any tech­ni­cal know­ledge, using a plug­in is the easie­st way to hide titles. The­re are num­e­rous plug­ins that allow you to do just that.

Recommended plugin: “Hide Title”

  1. Instal­la­ti­on:
    • Go to “Plug­ins” > “Install” in your Word­Press dash­board.
    • Search for the “Hide Title” plug­in and install it.
    • Acti­va­te the plug­in.
  2. Use:
    • Edit the page or post whe­re you want to hide the title.
    • You will see a new opti­on in the editing area that allows you to hide the title (usual­ly a simp­le check­box).
    • Acti­va­te this opti­on and save the page or post.

This plug­in is ide­al for users who want to quick­ly and easi­ly hide titles on cer­tain pages or posts wit­hout having to deal with code.

Method 2: Hide titles via custom CSS #

If you pre­fer not to install addi­tio­nal plug­ins or pre­fer an indi­vi­du­al solu­ti­on, you can also hide the title using cus­tom CSS. This method requi­res some tech­ni­cal under­stan­ding, but is fle­xi­ble and effi­ci­ent.

This is how it works:

Go to “Cus­to­mi­zer”:
Open your Word­Press dash­board and navi­ga­te to “Design” > “Cus­to­mi­zer”.

Add cus­tom CSS:

Click on “Addi­tio­nal CSS” in the Cus­to­mi­zer.
Add the fol­lo­wing code to hide the title on all pages and posts

.entry-title {
    display: none;
}

    Note: The code .entry-title is the gene­ral CSS sel­ec­tor for the title in most Word­Press the­mes. If your the­me uses a dif­fe­rent name, you will need to find out the cor­rect sel­ec­tor. You can check this with your browser’s deve­lo­per tools.

    Save the chan­ges: After you have added the CSS, click on “Publish” to save the chan­ges.

    Hide titles only on certain pages or posts:

    If you only want to hide the title on a spe­ci­fic page or post, you can use the page or post ID. For exam­p­le:

    .page-id-123 .entry-title {
        display: none;
    }

    Replace 123 with the actu­al ID of the page or post on which you want to hide the title.

    Method 3: Hide titles in your theme template #

    For advan­ced users who have direct access to the source code of their Word­Press web­site, it is pos­si­ble to remo­ve the title direct­ly in the the­me files. This method requi­res editing the tem­p­la­te files of your the­me.

    Crea­te a child the­me:

    To ensu­re that your chan­ges are not over­writ­ten by the­me updates, you should first crea­te a child the­me. This pro­tects your cus­to­miza­ti­ons from future los­ses.

    Edit the tem­p­la­te files:

    Open the file page.php or single.php (depen­ding on whe­ther you want to hide the title on a page or a post) in your the­me direc­to­ry.

    Search for the line that shows the title of the post. This often looks like this:

    <h1 class="entry-title"><?php the_title(); ?></h1>

    Dele­te or com­ment out this line:

    <!-- <h1 class="entry-title"><?php the_title(); ?></h1> -->

    Attention:

    Editing the the­me files direct­ly can be ris­ky if you are not careful. It is always a good idea to make a full back­up of your web­site befo­re making such chan­ges.

    Conclusion #

    Hiding titles in Word­Press can be achie­ved in dif­fe­rent ways, depen­ding on your needs and tech­ni­cal know-how. Whe­ther you choo­se the easy way via a plug­in, use CSS for a more fle­xi­ble solu­ti­on or work direct­ly on the the­me code — each method has its advan­ta­ges and dis­ad­van­ta­ges.

    For beg­in­ners, I recom­mend using a plug­in, while expe­ri­en­ced users can explo­re the pos­si­bi­li­ties of cus­to­miza­ti­on via CSS or editing the tem­p­la­te files. Good luck hiding the titles and cus­to­mi­zing your Word­Press web­site!

    88e86fcb816eff22bc917094df2862d8dd5c0e978b333e6dd5f36f808990c261 96

    Arti­kel von:

    Marc Wag­ner

    Hi Marc here. I’m the foun­der of Forge12 Inter­ac­ti­ve and have been pas­sio­na­te about buil­ding web­sites, online stores, appli­ca­ti­ons and SaaS solu­ti­ons for busi­nesses for over 20 years. Befo­re foun­ding the com­pa­ny, I alre­a­dy work­ed in publicly lis­ted com­pa­nies and acqui­red all kinds of know­ledge. Now I want to pass this know­ledge on to my cus­to­mers.

    Hast du eine Fra­ge? Hin­ter­lass bit­te einen Kom­men­tar