• I have included the php file in my includes directory of my theme, but I still get this error when a function in that file is called:

    Fatal error: Call to undefined function update_profile_show_error_messages() in /home/exlogu5/public_html/wp-content/themes/classroom/template-profile.php on line 23

    This is the code where the function is called:
    <?php update_profile_show_error_messages(); update_profile_show_sucess_messages(); ?>

    And this is the function located in <mytheme>/includes folder:
    function update_profile_show_error_messages() {
    if($codes = update_profile_errors()->get_error_codes()) {
    echo ‘<div class=”alert-danger form-message”>’;
    // Loop error codes and display errors
    foreach($codes as $code){
    $message = update_profile_errors()->get_error_message($code);
    echo ‘<span class=”error”>‘ . __(‘Error’) . ‘: ‘ . $message . ‘</span>
    ‘;
    }
    echo ‘</div>’;
    }
    }

    I don’t have a general idea about why this error occurs and google didn’t help me so I appreciate any help! I cleared the cache thinking the file containing the code wasn’t updated, but the error still occurs.

Viewing 1 replies (of 1 total)
  • what theme are you using?

    is the functions file in the /includes/ folder included from functions.php of the theme?

Viewing 1 replies (of 1 total)
  • The topic ‘Call to An Undefined Function Error’ is closed to new replies.