Viewing 7 replies - 1 through 7 (of 7 total)
  • I would create a custom template file called “front-page.php”, in which you omit any reference to the_title().

    Thread Starter gaylynw

    (@gaylynw)

    How do I do that. I found that code in loop.php and loop-page.php. I’m not sure what those are for. Can I get rid of them there?

    Make a copy of page.php. Call the new copy front-page.php. Remove the reference to the_title(). Upload the new template to your theme’s folder within wp-content/themes.

    Thread Starter gaylynw

    (@gaylynw)

    When I go onto the page.php, there is no reference to “the_title”.

    Then your new front-page.php template file should work just fine.

    Thread Starter gaylynw

    (@gaylynw)

    Below is everything it says on page.php
    <?php
    /**
    * The template for displaying all pages.
    *
    * This is the template that displays all pages by default.
    * Please note that this is the WordPress construct of pages
    * and that other ‘pages’ on your WordPress site will use a
    * different template.
    *
    * @package WordPress
    * @subpackage Twenty_Ten
    * @since Twenty Ten 1.0
    */

    get_header(); ?>

    <div id=”container”>
    <div id=”content” role=”main”>

    <?php
    /* Run the loop to output the page.
    * If you want to overload this in a child theme then include a file
    * called loop-page.php and that will be used instead.
    */
    get_template_part( ‘loop’, ‘page’ );
    ?>

    </div><!– #content –>
    </div><!– #container –>

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    The call to the_title() is coming from the “loop-page.php” file. You have a couple options:

    1) Replace this:

    get_template_part( 'loop', 'page' );

    With the content of the “loop-page.php” file, then remove the reference to the_title().

    2) Copy “loop-page.php” as a new file, e.g. “loop-frontpage.php”, remove the reference to the_title() from this file, and then change this:

    get_template_part( 'loop', 'page' );

    To this:

    get_template_part( 'loop', 'front-page' );

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How do I get rid of page name?’ is closed to new replies.