Hi guys! I was wandering if we can use PHP code inside xhtml templates or not. The main reason for this is using files like header.php, footer.php, etc.. Its pain in the *ss when both me and buyer have to edit all those pages in HTML .
For example if he adds something to navigation, he have to open all those files and add it there too. This way he would just open navigation.php and edited it only once.
I am talking here about some simple PHP includes which I hope could quickly understand every average HTML coder without PHP knowledge what so ever.
Fellow authors and buyers, help me on this with your opinions. I dont know if there is enough knowledge between buyers to use this “simple” technique.
And converting these templates to WP would be easier too, so I guess its win win situation right? Thanks in advance!
I think it would be a good idea. Maybe you can offer 2 variations .. one with PHP and the other without PHP .. guess that would be good.
Thanks Danny for quick reply. Nah, I would not do that non-PHP version in this case. I have never bought an item here so I dont know if any author here uses PHP includes…
Using includes is a great way to reduce coding times. I also thought of using includes in my templates, but finally I decided not to do it because maybe the buyers don’t know PHP .
Probably I should give it a shot on my own and see the response of buyers. Anyway buyers cant see in demos if there is any PHP . I found this tho http://themeforest.net/item/black-folio-3-themes-in-html-php-versions/44083
Using includes is a great way to reduce coding times.A lot! I found myself plain HTML coding without PHP includes for old school and contra-productive thinking. I really dont understand why there are almost no templates here with this simple feature which is really great for buyers too. I also found that buyers of HTML templates are much more skilled than WP buyers, and I mean a lot. I only made one HTML and one WP, but the number of support questions regarding WP are 5x bigger.
All the themes on themeforest are particaly all in HTML CSS with a small part of PHP for contact form.. I think that is a minimum to offer at a buyer.
I recently create this full PHP template to replace wordpress named Hellicious. http://themeforest.net/item/hellicious/69577
I include inside zip : PHP Version + HTML version For two reasons : First, some buyer can use directly the PHP version and edit it. Second, buyers can use html version to integrate their own php code or simply edit html code because they don’t have knowledge on PHP …
Well, i think salers must to code in 2 versions… for more flexibility to the buyer can do with.
But a simply Php can save times of buyer… it’s a reality. i talk about includes files and small codes “easy” to understand..(i think)
Good luck for your next theme.
Thanks mate for your insight! I will give it a try with my next template probably. I will put into descriptions a line where will be stated that this template uses php includes. Maybe I will post there some link with quick and easy to understand tutorial so buyers can check if they can handle such a thing or not. I simply dont care if buyers are too lazy to read some short tutorial like this. Its like stopping the science or supporting IE6 by using it. The show must go on!
I also checked your newest template, but I noticed it’s posted in Misc category and thats not good because after a few weeks or months it will be probably buried. When I was looking for a way how to contact you I only remembered your last item because I saw it on homepage a week ago. I opened All files category, but I realised there are to many items to look for yours, so I opened up HTML templates category and it wasnt there! So I was thinking… I remembered the old Black Folio template of yours (I was already on TF when you released it) and I remembered your cool avatar (I have got quite good photographic memory) and I realised I saw that avatar with your Hellicious template. So I searched for black folio, found your item, clicked on your profile, clicked on portfolio and finally found Hellicious This is what I call “journey” and its quite shame because you can lost so many buyers by this. Maybe if you would contact support, maybe they would change your category Do you think my item would end up in Misc category just because of includes? BTW contact form is something different I think, it’s necessary for it to be in PHP and everyone knows that. Sorry for posting such a long post, I just wanted to make a point. Cheers!
I’ve always thought about this and it’s nice that you brought it up. It would be lovely to only do the PHP version. It really shouldn’t even be that hard to understand. All you’re doing is including a file into the html. Something everyone could understand and keeps code clean. The only thing I could think of is the buyer would have to install WAMP or something just to view it locally.
The only thing I could think of is the buyer would have to install WAMP or something just to view it locally.Thanks Henry for this though, because i somehow forgot about this aspect. Hmmmm… When I was a beginner I had troubles with installing these softwares. Maybe if I find something free, with one click install and easy to use, and both for MAC and PC, maybe it could work. Worst case scenario is editing via FTP , which is not that awesome as local editing. But I still think it’s better than the hassle with editing 10 files with file-by-file method If anyone from Envato staff reads this thread, could you reply with your, more official, opinion please? Thank you!