Alan
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: PHP in WordPressdepends on the how your theme is build.
you could hook it into your wp_head action to achieve that..
wp_head action is mostly located in your header.php file.
if there is no wp_head action , just addwp_head();function into your header file.example on how to hook into your wp_head action:
function test(){ echo "hello from inside the test action"; } add_action('wp_head', 'test', 10);you could also create your own actions anywhere you desire.
example:
1. add a action into your header or any theme file as:
do_action("your_action_name");2. crate a function in your function.php file and use add_action to hook the function into your action as:
//create a function function myFunc(){ #your code, for example echo "hello from inside my function"; } //add action add_action('your_action_name', 'myFunc', 10); //add_action() function hooks into your action and prints the function code on the page where your do_action() is locatedthis article explains more on how to create and use actions:
http://codex.ww.wp.xz.cn/Function_Reference/do_actionForum: Fixing WordPress
In reply to: How do I remove header content from each page?I don’t know much about thesis, but normally you could do something like editing your header.php file…
you could try something like this:
if ( is_home() ) { #here goes your header eg. content you'd like to be displayed only on homepage... }