Can't find where this php code is located

I’m working on a website and I am getting a line of php code at the top of the site. I can’t seem to locate it to delete it. I’m hoping you might be able to help me with locating and deleting the code.

A designer who was working on the site added the code to allow shortcodes to be used in the widget area. I went in and removed the code from the function.php child theme but the code is still there. I’ve spent some time trying to find where it might be but with no luck.

It does show up on all the pages but is hidden by the menu. I am trying to create a donation landing page and I need the menu/header removed. When I do this the code is shown.

Website landing page:

Please let me know if you need any further information. I’ve also granted support access to the site if you need to gain access.

Thanks for all the help,


  • Adam Czajczyk
    • Support Gorilla

    Hi jayjay

    I hope you’re well today!

    Unfortunately, I don’t have any access to theme files via site’s back-end (via support access) so I can’t check the files but it looks like the code wasn’t properly removed.

    The way it’s showing up suggests that the line

    add_filter( 'widget_text', 'do_shortcode' );

    is there in the code but not wrapped with PHP tags

    <?php ?>

    Otherwise it would be executed and wouldn’t show up. I suppose that would be either in some “header.php” file or some “widget” or “sidebar” related template file.

    I’ll be happy to take another look but I’d need to be able to check files so you’d need to either unlock WP theme (file) editor or e.g install a plugin such as “File Manger”. Note please: I would not recommend using that plugin for any editing of any file (so no making changes using it) but it’s good enough for checking files only (if installed and enabled just temporarily).

    Best regards,

  • jayjay
    • Site Builder, Child of Zeus

    Hi Adam Czajczyk ,

    Thanks for the response. I ended up finding out where the code was located. The theme being used is Divi from Elegantthemes. The have a section in the theme options where you can add code to the header, footer, etc.

    That’s where I found it and removed it. All is great with the world now.

    Thanks for the help,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.