Include php file to header

Feel free to talk about everything related to our Wordpress Products
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Sun Dec 13, 2015 10:53 pm
Hi,

I am trying to add some php code, given to me by google analytics, to the header of my website.
I can't figure out how to include php files to all my pages.

Thannks for any help.
User avatar
Fresh Boarder

GK User
Mon Dec 14, 2015 9:27 am
Hi,
Which theme exactly are you using?
User avatar
Moderator

GK User
Tue Dec 15, 2015 10:29 am
Instyle theme.
I acutally made it by using include_once("MyFile.php");
But i don't know if it's the best practice.
User avatar
Fresh Boarder

GK User
Wed Dec 16, 2015 10:45 pm
Generally you should use get_template_part within theme files, but include_once will also work properly.
Please check i.e. this article: http://code.tutsplus.com/articles/how-t ... --wp-26419
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.