WordPress.org

Forums

How to hide or replace the page name? (7 posts)

  1. kjagen
    Member
    Posted 6 years ago #

    Is there a way to hide the page name - the name that serves as the header or title on pages? Or some of them.
    The idea is to replace them with picture headers.

    Probably best to hide.
    Can I remove this
    <h2><?php the_title(); ?></h2>
    in the page.php?

    And where can I align text and pictures more to the left both in pages and sidebars?
    I use default temp

  2. s_ha_dum
    Member
    Posted 6 years ago #

    Yes, you can remove the_title();. It won't break anything.

    Your theme should have a style.php (wp-content/yourthemename/style.php). That's where you'd adjust the alignment and positioning.

  3. MichaelH
    Member
    Posted 6 years ago #

    1. One of the Conditional Tags, is_page(), should work.

    2. See CSS

  4. kjagen
    Member
    Posted 6 years ago #

    I don`t have a style.php but a css. and a rtl.css.
    In which php do I put a Conditional Tags? In the page.php?

    If I remove the_title - will the search thing on google find the page then?
    And why is the pages seen in the browser ; page, then main ulr.

  5. s_ha_dum
    Member
    Posted 6 years ago #

    Oops... it should be style.css not style.php. My mistake.

    The page title per se-- the html title attribute-- is controlled by wp_title() not by the_title(). Removing the_title() won't effect that.

    You last sentence is confusing. I think that this might be related to the question though.

  6. MichaelH
    Member
    Posted 6 years ago #

    In which php do I put a Conditional Tags? In the page.php?

    If page.php is the Template in control, yes. See Template Hierarchy if that is in question.

    See Template_Tags/wp_title

  7. William
    Member
    Posted 5 years ago #

    I choose to remove page name from all pages... then I can choose exact text and formatting as I prefer. I look for the following code in the page.php file and simply comment it out.

    <!-- Commented out
    <h2 class="topTitle">"><?php the_title(); ?></h2>
    -->

    I hope that this helps.

    regards,
    William

Topic Closed

This topic has been closed to new replies.

About this Topic