Skip to main content
added 42 characters in body
Source Link
Fabian Marz
  • 572
  • 3
  • 10

Instead of removing all actions as suggested by @kero, you should remove the desired hooks only using remove_action. Removing all hooks will prevent 3rd party code from adding their code too when removed after they added their stuff (possibly including yours).

To remove a specific hook you should search for the code which registers the action. In this case:

// theme-functions.php:322
add_action( 'education_lms_footer_copyright', 'education_lms_footer_info' );

Then add your own code in your functions.php to remove the hook:

remove_action( 'education_lms_footer_copyright', 'education_lms_footer_info' );

To add custom code at the copyright position you could use something like:

add_action( 'education_lms_footer_copyright', function () {
 echo 'My copyright code';
} );

Sometimes you might need to pass a priority (3rd parameter) if the hook was registered with another than the default of 10.

Instead of removing all actions as suggested by @kero, you should remove the desired hooks only using remove_action. Removing all hooks will prevent 3rd party code from adding their code too (possibly including yours).

To remove a specific hook you should search for the code which registers the action. In this case:

// theme-functions.php:322
add_action( 'education_lms_footer_copyright', 'education_lms_footer_info' );

Then add your own code in your functions.php to remove the hook:

remove_action( 'education_lms_footer_copyright', 'education_lms_footer_info' );

To add custom code at the copyright position you could use something like:

add_action( 'education_lms_footer_copyright', function () {
 echo 'My copyright code';
} );

Sometimes you might need to pass a priority (3rd parameter) if the hook was registered with another than the default of 10.

Instead of removing all actions as suggested by @kero, you should remove the desired hooks only using remove_action. Removing all hooks will prevent 3rd party code from adding their code too when removed after they added their stuff (possibly including yours).

To remove a specific hook you should search for the code which registers the action. In this case:

// theme-functions.php:322
add_action( 'education_lms_footer_copyright', 'education_lms_footer_info' );

Then add your own code in your functions.php to remove the hook:

remove_action( 'education_lms_footer_copyright', 'education_lms_footer_info' );

To add custom code at the copyright position you could use something like:

add_action( 'education_lms_footer_copyright', function () {
 echo 'My copyright code';
} );

Sometimes you might need to pass a priority (3rd parameter) if the hook was registered with another than the default of 10.

Source Link
Fabian Marz
  • 572
  • 3
  • 10

Instead of removing all actions as suggested by @kero, you should remove the desired hooks only using remove_action. Removing all hooks will prevent 3rd party code from adding their code too (possibly including yours).

To remove a specific hook you should search for the code which registers the action. In this case:

// theme-functions.php:322
add_action( 'education_lms_footer_copyright', 'education_lms_footer_info' );

Then add your own code in your functions.php to remove the hook:

remove_action( 'education_lms_footer_copyright', 'education_lms_footer_info' );

To add custom code at the copyright position you could use something like:

add_action( 'education_lms_footer_copyright', function () {
 echo 'My copyright code';
} );

Sometimes you might need to pass a priority (3rd parameter) if the hook was registered with another than the default of 10.