Forums

[resolved] Overriding "read more" in child theme not working (3 posts)

  1. Austin Burns
    Member
    Posted 1 year ago #

    I'm trying to override the 'read more' link in my child-theme functions.php. I understand you can't override the parent themes functions.php as such, but I have placed my own function for the 'excerpt_more' filter, but it's not replacing the parent theme's function that also uses 'excerpt_more'.

    http://pastebin.com/q8smWxaA

    Any ideas?
    Thanks

  2. Digital Raindrops
    Member
    Posted 1 year ago #

    Did you include it in a post theme setup function, like this?

    http://pastebin.com/wCKENPM0

    This is part of the code for this child theme that has custom post types, where I wanted to change the Continue Reading link to Read More, if you need the code in a theme you can get it here.

    HTH

    David

  3. Austin Burns
    Member
    Posted 1 year ago #

    Ahhh didn't know you could add a child them setup to override some of the parent functions. Thank you very much that is what I needed.

    Austin

Topic Closed

This topic has been closed to new replies.

About this Topic