I am learninig to create templates in wordpress using the thematic framework
In the header file I find:
// Filter provided for altering output of the header opening element
echo ( apply_filters( 'thematic_open_header', '<div id="header">' ) );
// Action hook creating the theme header
thematic_header();
echo ( apply_filters( 'thematic_close_header', '</div><!-- #header-->' ) );
I want to add a wrapper div element around the div id=”header”…/div created above
I have tried to edit the apply_filter lines like this:
echo ( apply_filters( 'thematic_open_header', '<div id="headerWrapper"><div id="header">' ) );
but it doesn’t work, just printout out div id=”header”
How can I get it to create the html that I want it to?
Thanks
Filters are used in
functions.php
or in a plugin like this:The basic difference between
apply_filters
anddo_action
is that the first filters some value and returns something, whileadd_action
will be used to do anything you want with the parameters sent or output something to the browser.Some articles of interest: [1], [2], [3] and [4].