Zen Cart Logo
Forums / General Questions / Adding Php code to homepage

Adding Php code to homepage

Views: 490

Results 1 to 3 of 3
8 Nov 2011, 1:19 AM
#1
tracstev avatar

tracstev

New Zenner

Join Date:
Apr 2008
Posts:
61
Plugin Contributions:
0

Adding Php code to homepage

Hi

I am trying to add a snippet of php code on the homepage but I have no idea where to add the code, it needs to appear after the content from define main page. I have tried editing tpl_index_default.php and adding the code there but it isn't working. Any ideas?

Regards
Tracey

8 Nov 2011, 1:46 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding Php code to homepage

Your define_main_page.php content goes right to the bottom of the center column, so why don't you want to add your new content to that file?

It should also work to edit tpl_index_default.php since you are not displaying categories on the homepage, as long as you edit it correctly.

8 Nov 2011, 12:01 PM
#3
tracstev avatar

tracstev

New Zenner

Join Date:
Apr 2008
Posts:
61
Plugin Contributions:
0

Re: Adding Php code to homepage

thanks I thought I had tried this, but seems i was editing the default files not the template one. Works a charm.