Change file on template trough plugin
-
Hi all!
I’m trying to create a plugin to change the header file on the theme. The think is I use a theme that is regulary updated so I want to add some codes and hacks but I don’t want to have to add this code each time the theme is updated. Any suggestion? I tried with
add_filter('template_include','yoursite_template_include',1); function yoursite_template_include($template) { include('header.php'); return $template; }
and then in header include the theme header-php file and after make add some codes… but isn’t working. I want to add some code after header.php (inside body tag).
I think the easier way to do was this (including the original active theme file and adding then the code) but I didn’t know enough the codex…
Help!!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Change file on template trough plugin’ is closed to new replies.