• I am getting a fatal error on the child theme and not sure why it happened it happens on every page except the home page:

    FATAL ERROR: UNCAUGHT ERROR: CALL TO UNDEFINED FUNCTION OCEANWP_TITLE() IN /HOME/CUSTOMER/WWW/DARKHORSEWRESTLINGNC.COM/PUBLIC_HTML/WP-CONTENT/THEMES/OCEANWP-CHILD-THEME-MASTER/PARTIALS/PAGE-HEADER.PHP:58 STACK TRACE: #0 /HOME/CUSTOMER/WWW/DARKHORSEWRESTLINGNC.COM/PUBLIC_HTML/WP-INCLUDES/TEMPLATE.PHP(732): REQUIRE() #1 /HOME/CUSTOMER/WWW/DARKHORSEWRESTLINGNC.COM/PUBLIC_HTML/WP-INCLUDES/TEMPLATE.PHP(676): LOAD_TEMPLATE('/HOME/CUSTOMER/...', FALSE, ARRAY) #2 /HOME/CUSTOMER/WWW/DARKHORSEWRESTLINGNC.COM/PUBLIC_HTML/WP-INCLUDES/GENERAL-TEMPLATE.PHP(204): LOCATE_TEMPLATE(ARRAY, TRUE, FALSE, ARRAY) #3 /HOME/CUSTOMER/WWW/DARKHORSEWRESTLINGNC.COM/PUBLIC_HTML/WP-CONTENT/THEMES/OCEANWP/INC/HELPERS.PHP(1949): GET_TEMPLATE_PART('PARTIALS/PAGE-H...') #4 /HOME/CUSTOMER/WWW/DARKHORSEWRESTLINGNC.COM/PUBLIC_HTML/WP-INCLUDES/CLASS-WP-HOOK.PHP(292): OCEANWP_PAGE_HEADER_TEMPLATE('') #5 /HOME/CUSTOMER/WWW/DARKHORSEWRESTLINGNC.COM/PUBLIC_HTML/WP-INCLUDES/CLASS-WP-HOOK.PHP(316): WP_HOOK->APPLY_FILTERS('', ARRAY) #6 /HOME/CUSTOMER/WWW/DARKHORSEWRE IN /HOME/CUSTOMER/WWW/DARKHORSEWRESTLINGNC.COM/PUBLIC_HTML/WP-CONTENT/THEMES/OCEANWP-CHILD-THEME-MASTER/PARTIALS/PAGE-HEADER.PHP ON LINE 58

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @innergeekdesigns,

    Due to some changes in the WordPress theme checker plugin, we had to rename that particular function. You can read more about it here: https://github.com/WordPress/theme-check/issues/356

    In your case, you need to copy the particular file page-header.php from the parent theme into the child theme folder and replace the current file, and everything will be fine. Or you can just edit the file in the child theme folder and rename the oceanwp_title() function to oceanwp_has_page_title() .

    Hope this helps

    @wpfleek I’m facing the same problem but the solution given by you is not working. Can you suggest some different methods to solve this.

    Hello @unexplainablebug,

    By default, deprecated oceanwp_title() that is replaced with the oceanwp_has_page_title() is used in only one place in the theme and only once, and that is the page-header.php file, so the solution above will work.

    Of course, you could have added this function in other custom codes or other templates, so you will need to go over entire files in the child theme and make corrections. And I’m afraid there is no other method to do this.

    If you’re using any code editors, like Visual Studio Code, download the customized child theme folder to your PC, open the entire folder with the code editor and run a search for: oceanwp_title( (without the closing bracket, because you may have used with variables as well).

    That’s the easiest way to see where you need to apply the function name change.

    Hope this helps

    EDIT: You can also enable the debug log on your website and it will show you the path to the file and the line where you placed the function, but I can’t guarantee it will populate errors in all affected files

    • This reply was modified 3 years, 7 months ago by Marko OceanWP.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal Error’ is closed to new replies.