Skip to main content
added 324 characters in body
Source Link
Abhik
  • 2.9k
  • 2
  • 23
  • 31

You need to make the function pluggable, that means, to support child themes, the functions in parent theme should use:

if ( !function_exists( 'function_name' )) {
    function function_name() {
        //Stuffs
    }
}  

You should have seen a PHP Error message if you have debugging enabled.

EDIT: The below code snippet if to answer your other question in comment.

function modify_read_more_link() {
    global $post;
    
    return '<a class="more-link" href="' . get_permalink( $post->ID ) . '">Your Read More Link Text</a>';
    
}
add_filter( 'the_content_more_link', 'modify_read_more_link' );

You need to make the function pluggable, that means, to support child themes, the functions in parent theme should use:

if ( !function_exists( 'function_name' )) {
    function function_name() {
        //Stuffs
    }
}  

You should have seen a PHP Error message if you have debugging enabled.

You need to make the function pluggable, that means, to support child themes, the functions in parent theme should use:

if ( !function_exists( 'function_name' )) {
    function function_name() {
        //Stuffs
    }
}  

You should have seen a PHP Error message if you have debugging enabled.

EDIT: The below code snippet if to answer your other question in comment.

function modify_read_more_link() {
    global $post;
    
    return '<a class="more-link" href="' . get_permalink( $post->ID ) . '">Your Read More Link Text</a>';
    
}
add_filter( 'the_content_more_link', 'modify_read_more_link' );
Source Link
Abhik
  • 2.9k
  • 2
  • 23
  • 31

You need to make the function pluggable, that means, to support child themes, the functions in parent theme should use:

if ( !function_exists( 'function_name' )) {
    function function_name() {
        //Stuffs
    }
}  

You should have seen a PHP Error message if you have debugging enabled.