• Hi there, I need to find the page or file where some code is, I can see the code when I inspect it in Google Chrome, but can’t see a way to tell what file the code is on, can you help?
    I’d prefer not to use a plugin, just maybe a Chrome extension? I am unsure!
    Thanks

    • This topic was modified 5 years, 1 month ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 3 replies - 1 through 3 (of 3 total)
  • Tyler

    (@tylerthedude)

    Hi Terry,

    I’m not sure of any Google extensions that offer the capability you’re looking for, but if you have SSH access to your webserver then you can use the “grep” command to find the code you’re looking for. Most hosting providers offer customers the use of creating SSH keys, so you can either sign in (if you already have keys set up) or create new keys. Once you’re logged into your webserver then you can run the “grep” command followed by the code you’re looking for.

    For example, if you’re looking for all function calls within your site such as “json_encode”, then you would type out “grep -r json_encode”. This will recursively look through your entire site’s filesystem (depending on where you type this command), and look for all instances of “json_encode”. The grep command will return a list of all the files and subdirectories that contain this string.

    From there, you can work your way down into the code and find what you’re looking for.

    Regards,
    Tyler

    Thread Starter terryscott2

    (@terryscott2)

    Thank you Tyler, I will explore that, it’s a dedicated server so I have access to everything, I am sure the web hosts can help.

    Barnez – That is the plugin I looked at, the issue I have is I have been left with a site running wordpress 4.7 and that plugin is compatible from 4.9 – So not sure if I should risk it?

    I will be updating the site slowly but at the moment I am stuck!
    Thanks
    Terry

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need to find page where code is’ is closed to new replies.