Before you ask please READ THIS

Adding is_home to theme

edited May 2013 in Hypershot Posts: 6
Hi
First I wanted to say that you have done a great theme I love it!
I use it for my photography work. I have a galerry on the Home page and wanted to had some text to improve SEO
I have tried to had
<?php if (is_home()) : ?>mytext<?php endif; ?>
but it's not working.
Usally I put it in the footer.php, I have also tried to put it in the index.php but nothing works...
Thanks in advance for help
Lawrence
Post edited by Air on

Comments

  • AirAir
    Posts: 10,970
    Hello:-)

    is_home() might not work is your front page is not blog. Give a try for is_front_page().

    With regards.
  • Posts: 6
    Hello Thanks for your quick answer.
    I have tried this
    <?php if (is_front_page() ) { echo '<a>test' ;} ?>
    but it isn't working... Can you help?
    What I 'm trying is to get an include statci file something like this :
    <?php if (is_home()) : ?><?php include 'referencement.inc'; ?><?php endif; ?>
    How could I do it with "is_front_page()"
    Thanks
    Lawrence
  • AirAir
    Posts: 10,970
    Hello.

    It would be good to know where you are making your changes, to get better image of what could interfere.

    With regards.
  • Posts: 6
    Hi
    For exemple I tried to put it just above the tag.
    But it's not working
    Thanks
    Lawrence
  • AirAir
    Posts: 10,970
    This tells me nothing:-) Live code, screen shot, file names anything more:-)

    With regards.
  • Posts: 6
    Sorry the tag I put in the previous message didn't display.
    Please find 2 screen copy attached
    pdf
    pdf
    Capture d’écran 2013-05-08 à 14.19.37.pdf
    173K
    pdf
    pdf
    Capture d’écran 2013-05-08 à 14.18.03.pdf
    167K
  • AirAir
    Posts: 10,970
    Hey:-)

    Please tell have you checked source of file is this things are appearing or only check visually layout, cause you know we have there tons of things positioned absolute, so there is huge chance you wont see such things just like that ;-)

    If that is not the case, please share link to your site here or via private message.

    With regards.
  • Posts: 6
    Hi I checked the source file.
    Here is the site link http://www.photographe-professionnel-evenementiel.fr/
    Thanks for your time solving this!
  • AirAir
    Posts: 10,970
    OK link really helped, cause in case of album in front page story could be different :-)
    Try such code:
    
    <?php
    if(defined('CALLED_FROM_FRONT_PAGE')){
        //your code here
    }
    ?>
    
    Hope this will help.

    With regards.
  • Posts: 6
    Great this is perfect!
    Thanks a lot for your help!
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