Replace Function
-
Hi!
I’m impressed by, and using Expound for my website. Up until now I have always only changed things in the css of the child-theme that I created, but when it comes to functions I had some problems. I wanted to change some things in the footer (still give you credit Kovshenin!) but change the code a bit, and I was not able to override the functions.
The footer refers to this line:
<?php do_action( 'expound_credits' ); ?>
and I tried to tackle this bit:
function expound_display_credits() { (...text...) echo apply_filters( 'expound_credits_text', $text ); } add_action( 'expound_credits', 'expound_display_credits' );
I guess it is this line that I couldn’t really understand:
echo apply_filters( 'expound_credits_text', $text );
I tried to do it by adding this to my own functions.php in my child theme:remove_action( 'expound_credits', 'expound_display_credits' ); add_action('after_setup_theme','remove_footer_actions'); function my_display_credits() { (...text...) } add_action( 'expound_credits', 'my_display_credits' );
..and that was just wrong.
How can I override some of the functions in Expound with my own?(I guess it actually works to just create my own footer.php and write whatever in it, but that is a crude and bad way to do it.
Best regards
Oskar
- The topic ‘Replace Function’ is closed to new replies.