WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Removing Page Titles (8 posts)

  1. GreggDoxology
    Member
    Posted 2 years ago #

    Ok so I am VERY NEW to wordpress and am using the twentyeleven theme. Here is my question, I want to remove the page titles about the content on each of my pages above my content on my site (doxologyworship.com) ... I searched the forums and found that I needed to take out the following line of code in my page.php file:

    '<h2>” title=”<?php the_title(); ?>”><?php the_title(); ?></h2>`

    In looking at the page.php file, I have no line of code like that. What do I do??

    Here is what I have in my page.php file:

    <?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_Eleven
     * @since Twenty Eleven 1.0
     */
    
    get_header(); ?>
    
    		<div id="primary">
    			<div id="content" role="main">
    
    				<?php the_post(); ?>
    
    				<?php get_template_part( 'content', 'page' ); ?>
    
    				<?php comments_template( '', true ); ?>
    
    			</div><!-- #content -->
    		</div><!-- #primary -->
    
    <?php get_footer(); ?>
  2. Sabinou
    Member
    Posted 2 years ago #

    You might be confused about the term "page".

    Usually, a web page means "what's shown inside my browser, duh".
    However, with wordpress, pages are special posts, static, meant to be just a few and not organized by chronological order, as opposed to posts, numerous and organized on a chronological order basis.

    Try editing likewise the single.php file, chances are it will be for the best :)

  3. Big Bagel
    Member
    Posted 2 years ago #

    Assuming you want to get at the titles of pages and not single posts, like sabinou1 suggested, the file you want is content-page.php. You'll notice this line in page.php:

    <?php get_template_part( 'content', 'page' ); ?>

    It calls content-page.php to actually insert the page's content. Twenty Eleven separates out each template file from the actual displayed content like this.

  4. GreggDoxology
    Member
    Posted 2 years ago #

    So I am still not understanding... What do I need to do?

  5. Big Bagel
    Member
    Posted 2 years ago #

    Look in content-page.php instead of page.php.

  6. GreggDoxology
    Member
    Posted 2 years ago #

    And take out or insert what??

  7. GreggDoxology
    Member
    Posted 2 years ago #

    So I am taking out ' <?php get_template_part( 'content', 'page' ); ?> ' ?? Still not sure.

  8. Big Bagel
    Member
    Posted 2 years ago #

    No, that line is in page.php. You need to look in content-page.php and remove anything similar to what you said you were originally looking for in your original post:

    <h2> title="<?php the_title(); ?>"><?php the_title(); ?></h2>

    The exact line is:

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

Topic Closed

This topic has been closed to new replies.

About this Topic