Archived topic
Error in My function.php
9 replies · Started by Braj Bhooshan on May 5, 2021
In my website linksblaster.com show some error on function.php please guide me how to remove this.
Hi there,
Can you share the code you've added?
If you've edited the theme's functions.php, I suggest undoing that. We don't recommend editing default GP theme files because they get wiped on updates.
As for the issue. You seem to be using wp_add_inline_script(). It's messing up the proper order of the of how assets and scripts are inserted to the page.
Currently, some of the scripts and styles on your site goes after the <body> tag instead of inside the <head> tag.
Can you undo the changes you've added? If you can't, here's a copy of the default contents of the theme's functions.php so you can revert it.
Nothing add or remove code in function.php manually.
That error show after theme update
Can you try the following?
Disable ALL plugins except GP Premium.
Update WordPress.
Update and/or Reinstall GP Premium and GeneratePress to the latest version.
Clear all caching.
Let us know how it goes.
I am all plugin uninstall and update but problem not solve
Hmm the site you've linked (https://www.linksblaster.com/) isn't using GeneratePress as the theme?
I use Generatepress theme on linksblaster.com
This isn't a theme issue.
The file path that the error is pointing to is /home/linksbla/public_html/wp-includes/functions.php
That's the functions.php of WordPress install and not the functions.php of the theme itself.
Ok
But please tell me how to fix it
You can try re-installing WordPress or restore thatfunctions.php file back to its original state.