• KB

    (@kespinoza)


    I have created a child theme so that I can change the text for posts-navigation (next_posts_link and previous_posts_link), but I can’t figure out how to add a filter to my child functions file in order to override the parent functions file.

    Function for parent theme: https://pastebin.com/hSKszDpD

    My goals is to have the text read “Older Episodes” and “Newer Episodes”

    Any help is much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Joy

    (@joyously)

    This is the reason that the theme review team recommends using core functions for this instead of the theme creating a new function.
    The code is not filterable and not pluggable. What you can do is duplicate the template file (where the function is called) in your child theme and call the core function instead, or call a new child function (copy the parent one and rename it).

    Thread Starter KB

    (@kespinoza)

    Thanks, jaybrf. I already tired this and my child function won’t remove the parent function.

    function child_remove_parent_function() {
    remove_action( ‘init’, ‘castilo_pagination_links’ );
    }
    add_action( ‘wp_loaded’, ‘child_remove_parent_function’ );

    I am wondering if my hook is wrong?

    Thread Starter KB

    (@kespinoza)

    Joy, I’ll give your recommendation a try. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change text for Posts Navigation for Child Theme’ is closed to new replies.