Oh no! I was celebrating too fast. The text loads now on every page. All I want is that it load on the home page. Any ideas?
Printable View
Oh no! I was celebrating too fast. The text loads now on every page. All I want is that it load on the home page. Any ideas?
How about a PHP if statement that only pulls that EZ page when displaying the homepage?
Nick
Yes exactly, can you help me with that? I struggle...
Probably something like:
HTML Code:
<?php
<div id="seo_content">
if ($this_is_home_page) {
$page_query = $db->Execute("SELECT pages_html_text FROM ezpages WHERE pages_title='SEO'");
$seo_text = $page_query->fields['pages_html_text'];
echo $seo_text;
}
</div>
</body>
?>
Sorry try again:
Seems to work. Does this look correct?HTML Code:<!--bof- SEO Ezpage text -->
<div id="seo_content">
<?php
if ($this_is_home_page) {
$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 -->
My PHP skills are sadly lacking, but that seems to make sense! Is that in use on your site now?
I was wondering whether having the same SEO text on each page would actually be harming results instead of helping.. so this could come in handy.
Nick
I use it for additional text below the category pictures. I don't want the whole blabla taking up most of the page and customers would not even see the pictures. This way, the most important intro text is on top, then pics, then I can put more text for the customer AND search engines to get enough content on the home page.
If you want to put the most important keywords as the last thing on every page, put it in the footer. Too much text that repeats on every page might not be great for SEO.
And yes, I implemented this on the first site in my signature.
Good stuff! Thanks, I may well use that on an upcoming site :)
Nick
Hi
Great thread - just what I have been searching for. followed instructions, but is is not working. See bottom of homepage.
http://trulyethical.com
Can anyone help?
Thanks
matt
I wanted editable text both above and below my featured items and bunyip provided these simple steps:
http://www.zen-cart.com/forum/showpo...31&postcount=6
His solution works perfectly. His method uses define_pages rather than ez-pages.