0

When we check view source page of our site, it is displaying below code in all pages :

Array
(
)

below is screenshot :

enter image description here

Requirement :

How to remove that Array() text ? From which file it is coming from ?

1 Answer 1

1

It might be added during development, most probably coming from Theme or Plugin, The best way to debug is download active plugins and active theme using this plugin Download Plugin/ Theme, and open code in VSCode and search for var_dump, var_export, print_r, die, and etc.

I'd say first search in Theme than go for Plugins.

8
  • I can see in thousands of lines when we search in vs code. is there any idea in which file it will be ? as because it is displaying in header ?
    – Baby in Wp
    Commented Sep 11 at 8:06
  • I guess no, but you can find the culprit by switching theme if Array disappears, and deactivate plugins one by one and see which makes it disappear, once you find one, download and search in that one. Commented Sep 11 at 9:46
  • when i rename the theme through filezilla, the "array()" text gone.
    – Baby in Wp
    Commented Sep 11 at 9:49
  • Problem seems to be in the theme, but do try deactivating Plugins as well, but keep theme active. Commented Sep 11 at 10:03
  • is there any other word that i need to try apart from : "die , var_dump, var_export" ? ?
    – Baby in Wp
    Commented Sep 11 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.