Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Display content by page URI?
#1
I am working on a templaet (yes happy to share when done!), but I have a niggly problem...

I want to be able to display a large picture only on the Home - or front - page i.e. index.php or "/"

Now...in normal php I would use:

Code:
<?php
    $theuri = $_SERVER['REQUEST_URI'];
    if ( ($theuri =="/") or ($theuri =="/index.php")  )
    {
?>

<div id="gallery">
    <div id="top-photo">
        <p>
                <img src="<?php get_theme_url(); ?>/images/img08.jpg" alt="" width="830" height="300" />
            </p>
    </div>
</div>

<?php } ?>

but this doesn't work - no picture is displayed anywhere and no errors - php or otherwise - are displayed.

Help!!!! Smile
Reply


Messages In This Thread
Display content by page URI? - by brumbino - 2010-01-15, 13:59:08
Display content by page URI? - by brumbino - 2010-01-15, 14:00:42
Display content by page URI? - by brumbino - 2010-01-15, 14:05:11
Display content by page URI? - by internet54 - 2010-01-15, 14:15:05
Display content by page URI? - by brumbino - 2010-01-15, 14:27:00
Display content by page URI? - by Zegnåt - 2010-01-15, 16:35:39
Display content by page URI? - by Nijikokun - 2010-01-15, 17:01:35



Users browsing this thread: 1 Guest(s)