marcodeltongo / thematic

Automatically exported from code.google.com/p/thematic
0 stars 0 forks source link

remove_action not working #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
At the moment I'm trying to make the header.php more flexible. I created a
hook and moved the several parts before wp_head() into actions
(hooks-filters.php). For instance one action creates the TITLE-tag another
one creates the description-tag. All actions are added to the hook I created.

Now I'm trying to remove the actions for TITLE-tag and description-tag in
my child themes functions.php because I'm using one of the SEO plugins
creating these tag. But remove_action() is not working for me. The syntax
is correct.

Removing actions from different plugins like Lightbox2 or WP Page-Navi
works fine.

Can you enlighten me? 

Original issue reported on code.google.com by chris.gossmann@googlemail.com on 31 Jan 2009 at 9:19

GoogleCodeExporter commented 9 years ago
which seo plugins have you used? platinum seo pack or what?

Original comment by dannydam...@gmail.com on 31 Jan 2009 at 1:50

GoogleCodeExporter commented 9 years ago
I did my tests with platinum seo and the all-in-one seo and even with no seo 
plugin
at all. I always end up with having two titles and two description or if none 
seo
plugin is active with one title and one description.

This can't be a conflict with one of these packages because I'm trying to 
remove in
my child theme what I integrated into Thematic by my own.  

Original comment by chris.gossmann@googlemail.com on 31 Jan 2009 at 2:12

GoogleCodeExporter commented 9 years ago
Ouch! .. figured it out .. need to wrap the remove_action into a function and 
add
this one as an action to the 'init' hook. 

Original comment by chris.gossmann@googlemail.com on 31 Jan 2009 at 3:59

GoogleCodeExporter commented 9 years ago
like this: add_action( 'init', create_function( '$a', "remove_action( 'wp_head',
'thematic_function_to_remove' );" ) );

Original comment by der...@gmail.com on 27 Feb 2009 at 12:10