WordPress.org

Ready to get started?Download WordPress

Forums

Remove Page name (18 posts)

  1. AndreasDK
    Member
    Posted 3 years ago #

    I don`t want the page name (Min Blog) to appear at the top of http://burningbush.dk/?page_id=65 (above the posts).

    Does anyone know how to remove it?

  2. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

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

  3. AndreasDK
    Member
    Posted 3 years ago #

    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.

  4. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    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.

  5. AndreasDK
    Member
    Posted 3 years ago #

    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>

  6. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    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

  7. AndreasDK
    Member
    Posted 3 years ago #

    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]

  8. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    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
    */
  9. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    By the way, what did you name this file?

  10. AndreasDK
    Member
    Posted 3 years ago #

    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

  11. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    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?

  12. AndreasDK
    Member
    Posted 3 years ago #

    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]

  13. AndreasDK
    Member
    Posted 3 years ago #

  14. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    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?

  15. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    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.

  16. AndreasDK
    Member
    Posted 3 years ago #

    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

  17. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    Try this one:

    <div class="xs-homepage-box">
        <h2><?php the_title() ?></h2>
  18. AndreasDK
    Member
    Posted 3 years ago #

    Hi Chip.

    I want to thank you for all your help.

    Unfortunately it doesnt quite work, so I guess Ill go back to the starting point unless you can see from my site what I have done wrong now.

    You are quite welcome to log into the admin panel yourself if you have to.
    Just contact me and I`ll give you the username and password.

    http://www.facebook.com/andreas.s.andersen

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.