Include php file to header
Feel free to talk about everything related to our Wordpress Products
Rate this topic:
- 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.
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.
-
- Fresh Boarder
- GK User
- Mon Dec 14, 2015 9:27 am
Hi,
Which theme exactly are you using?
Which theme exactly are you using?
-
- 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.
I acutally made it by using include_once("MyFile.php");
But i don't know if it's the best practice.
-
- 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
Please check i.e. this article: http://code.tutsplus.com/articles/how-t ... --wp-26419
-
- Moderator
4 posts
• Page 1 of 1