29 Jan 2009, 3:23 PM
Totally Zenned
- Join Date:
- Dec 2004
- Posts:
- 1,024
- Plugin Contributions:
- 0
if statement for additional text in tpl_main_page.php
I wanted to use EZpages text to display below the category pictures.
I started with this code:
<!--bof- SEO Ezpage text -->
<div id="seo_content">
<?php
$page_query = $db->Execute("SELECT pages_html_text FROM zen_ezpages WHERE pages_title='SEO'");
$seo_text = $page_query->fields['pages_html_text'];
echo $seo_text;
?>
</div>
<!--eof- SEO Ezpage text -->
It displays the text where I want it BUT now it shows on all pages. Could I put an if statement to make it ONLY show on the home page? I have tried but my php is not solid at all. Any suggestions?