Before you ask please READ THIS

custom template page - Beach Please

edited April 2013 in Beach Please Posts: 9

Hey, Basically, all I want to do is remove the header/title section that is used in the default template for the home page only. I want to keep the header/title for all my pages except for the home page. So, I don't want to hide it using CSS.

I've created a custom template page as 'home-page.php' and selected it under template selection. Nothing seems to change. Can you tell me how I can do this.

Thanks David

Post edited by rawiri on

Comments

  • AirAir
    Posts: 10,970
    Hello

    Still You can use CSS to hide it only on home page, cause every page have specific class in <body> element so you can target specific page.

    If you wish to overwrite default home.php file then:
    1. use child theme http://apollo13.eu/docs/beach/#!/modification_of_theme
    2. copy original home.php to child theme.
    3. Edit it :-)

    This way you wont lose any changes on theme update.

    With regards.
  • Posts: 9
    Thanks I'll give that a go.

  • edited April 2013 Posts: 9
    Okay, so I've tried modifying the home.php file in the child theme, but nothing seems to remove the header section or even change.

    The reason why I don't won't to hide the css is because I want the image I have on the front page higher up on the page and I don't want to use a negative top margin in css because when the screen size is smaller it overlaps.

    Any ideas why the child home.php modifications aren't working?
    Post edited by rawiri on
  • AirAir
    Posts: 10,970
    Have you activated child theme?:-)
    Try breaking home.php in child theme, then we will know if it works or not :-)
    Btw what have you changed?

    I could help you more if you post live link and screen shot to visualize your desired effect.

    If you still will have problems please send me temporary access to your WP so I could check there what is going on? Send it here on forum via private message(click on my nick and there you will find option to send message) .

    With regards.
  • edited April 2013 Posts: 9
    Yep, child them has been activated.

    I've attached a screenshot because I'm building the website locally on my computer.

    You see the top 'home' title and the line beneath it. I want to remove that section so that I can have the image at the top of the page.

    I assume that removing the following code from the top of the child 'home.php' file that it would remove the dynamic title that shows up at the top of the page:

    ------------------------------------------

    <?php a13_blog_info_bar() ?>
    -------------------------------------------

    This does nothing to remove the title....

    I'm confused.



    home.png
    1112 x 561 - 97K
    Post edited by rawiri on
  • edited April 2013 Posts: 9
    I removed the whole header div as well, but the code wouldn't show up in my previous comment I just posted.

    Even if I delete everything in the child home.php file nothing changes on the page....

    Also, I have a static page set as my front page.
    Post edited by rawiri on
  • AirAir
    edited April 2013 Posts: 10,970
    Hello

    Sorry for confusing you, but now I know you are using static page. Instead of coping home.php copy page.php and change it in this way in child theme:
    Change:
    
            <header>
                <h1 id="begin-of-content" class="page-title"><?php the_title(); ?></h1>
                <?php echo a13_subtitle(); ?>
            </header>
    
    to:
    
    <?php if(!is_front_page()): ?>
        <header>
                <h1 id="begin-of-content" class="page-title"><?php the_title(); ?></h1>
                <?php echo a13_subtitle(); ?>
            </header>
        <?php endif; ?>
    
    This should do the trick.

    With regards.
    Post edited by Air on
  • Posts: 9
    Perfect. Thank you.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion