WordPress.org

Support

Support » Themes and Templates » Remove Page name

Remove Page name

Viewing 15 replies - 1 through 15 (of 17 total)
  • Chip Bennett

    @chipbennett

    Theme Review Admin

    Look for a call to the_title(); in the appropriate Theme template file (e.g. “page.php”).

    Won`t that remove the name from alle pages I make in the future?

    I just want it to disappear from Bloggen, so that the posts line up with the sidebar.

    Chip Bennett

    @chipbennett

    Theme Review Admin

    Create a custom Page template file (e.g. “page-no-title.php”), in which you remove the call to the_title(). Then assign this template to the Page in question.

    Okay…

    Shall I just upload the new .php file to the same directory as page.php and then WordPress will see it and let me change the Page attributes Template from Blog as it is now to page-no-title?

    The content of my page.php is:

    <?php
    // get theme panel options
    global $options;
    foreach ($options as $value) {
    if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
    }
    ?>
    <?php get_header(); ?>
    <div id="xs-main">
    	<div id="xs-post">
    			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    			<h1><?php the_title(); ?></h1>
    				<?php the_content(); ?>
    				<?php comments_template(); ?>
    	</div><!-- /xs-post -->
    		<?php endwhile;?>
    		<?php endif; ?>
            </div><!-- /xs-main -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    I assume all I have to delete is <h1><?php the_title(); ?></h1>

    Chip Bennett

    @chipbennett

    Theme Review Admin

    That will accomplish what you want, yes. (You may need to make other style tweaks, if necessary.)

    Note: be sure to add the appropriate Template Name: header block at the top of the Page:
    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

    That removed my posts from the page and gave me a Leave a comment instead.

    What I did was to copy the content of page.php, remove the_title and added the example from your link.

    However…
    I noticed that before the Template for the Boog page was set to Blog but I cannot find a blog.php to use instead.

    Does it make any sense to you..? 🙂

    Content of page_no_title.php:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Chip Bennett

    @chipbennett

    Theme Review Admin

    This is wrong:

    /*
    Template Name: Ultra Business WordPress Theme
    */

    That is the name of your Theme. You need to put the name of your Page Template there, for example:

    /*
    Template Name: Page With No Title
    */

    Chip Bennett

    @chipbennett

    Theme Review Admin

    By the way, what did you name this file?

    The name is Page_no_title.php

    The start now reads:

    <?php
    /*
    Template Name: NO TITLE DIY
    */
    ?><?php

    But it still doesn`t show my posts.
    Instead I have a comment form, which isn`t there if I choose Blog as template.

    Are you sure it is the right file I have used as a base for editing?

    I mean..
    If the Page attributes can find a page template called Blog, then there must be such a file.
    Only thing is I haven`t got a blog.php

    Chip Bennett

    @chipbennett

    Theme Review Admin

    What are you expecting to appear on this page?

    Do you have your homepage set to a Static Page, and are displaying your blog posts on a separate page? Is it this separate blog-posts page that you are wanting to modify?

    To be quite honoust I have no idea what that means.

    I installed the blog yesterday and just chose Blog as template for the page – that did the trick listing my posts.

    But aren`t we misunderstanding each other?
    The above is the start of the file – not the whole file, which reads:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Chip Bennett

    @chipbennett

    Theme Review Admin

    Two questions:

    1) What appears on the Front Page of your site: a static Page, or your blog posts index?

    2) If a static Page appears on your Front Page, then on what Page do your blog posts appear?

    Chip Bennett

    @chipbennett

    Theme Review Admin

    I think I answered my own questions, looking at your site:

    1) You are using a static Page as your site’s Front Page.

    2) Your blog posts appear on a Page called “Blog”

    Your Page called “Blog” will, by default, use a Theme template file called “home.php”, if it exists. So, you need to be making these changes to the “home.php” Theme template file.

    I just looked through home.php and added the top to it but I cannot seem to figure out which the_title it is I have to remove.

    Can you see that?

    http://pastebin.com/TKNzH0Ta

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Remove Page name’ is closed to new replies.