1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need help to find out where a code lives

Discussion in 'HTML & Website Design' started by v610, Jul 23, 2019.

  1. #1
    Hey.
    I've been struggling with this issue for a few days and I can't figure it out. Basically I'm editing a Wordpress site, and I'm using the inspector (either Firefox or Chrome). I have been able to play with the code on the inspector and then edit the corresponding files on the server to make the changes permanent several times, however, there's this one code that I'm having a hard time with, because I can't figure out which file it is actually located in. I can see that in some cases the inspector shows which file a code is located in (even which line), as can be seen in the screenshot, however this code doesn't show the name of the file (i.e., style.css), instead it only shows 'inline...' If I click there, it takes me to another section with more details, but basically the problem is still the same; I still don't know which file that code is in.

    I have tried opening several files and search for the code but I can't find it. It's definitively not in the style.css, neither the index.php, header.php or footer.php

    Here's a screenshot:
    https://drive.google.com/open?id=1EfruxqZFl_PwcXUQEcEfghBwG3GZFTBL

    Thank you. Any insight on how to go about this is much appreciated.
     
    v610, Jul 23, 2019 IP
  2. Jon @ HostMamba

    Jon @ HostMamba Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    Hello Mate,

    Give the plugin "String Locator" a go, I use it frequently when debugging other peoples WP sites, and it works really well in most instances.

    Cheers,

    Jon
     
    Jon @ HostMamba, Jul 23, 2019 IP
  3. kennedygitahi

    kennedygitahi Active Member

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    Articles:
    2
    #3
    Hello, "inline..." means that the code is being added directly to the page by JavaScript or has been hardcoded by a plugin or something. I would start by viewing the source of the front-end of the site to see what line number 6 is and go from there
     
    kennedygitahi, Jul 23, 2019 IP
  4. v610

    v610 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    Hey. Thanks a lot for your replies, I will definitively try both ideas.
    One question regarding the second though; if the code has been added by JavaScript or a plugin, does that mean that the code is actually (never) really saved in one of the files?
     
    v610, Jul 23, 2019 IP
  5. sarahk

    sarahk iTamer Staff

    Messages:
    28,498
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #5
    Yep, that's completely possible. The text might be able to be updated in the admin settings. You can overwrite css if that's the problem. Theme and plugin authors have varying degrees of competence and different strategies so it's really hard to give a one size fits all answer.

    I'm not entirely sure what you're trying to do - with a bit more information we might be able to point you in the right direction.
     
    sarahk, Jul 23, 2019 IP
  6. malky66

    malky66 Acclaimed Member

    Messages:
    3,996
    Likes Received:
    2,248
    Best Answers:
    88
    Trophy Points:
    515
    #6
    Are you trying to remove the template authors attribution from the footer by any chance?
     
    malky66, Jul 24, 2019 IP
    deathshadow likes this.
  7. sarahk

    sarahk iTamer Staff

    Messages:
    28,498
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #7
    How could you suggest such a thing?
    Why would the OP want to breach the terms of the license?
     
    sarahk, Jul 24, 2019 IP
  8. v610

    v610 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #8
    Hey,

    Thanks for your replies.

    So basically what I want to do is to change the size of the text, which (as I mentioned), I can do through the element inspector, however the changes are not saved. Also as I mentioned before; I have actually been able to successfully do that for the lower row; I located the corresponding code on the inspector, then I went to the corresponding file where the code is located, edited the file, and it wall worked well. The problem is the upper row, the code for that text is the one that seems not to be located anywhere, however, from what I understand from kennedigitahi's reply, is that that code may be 'generated one the fly' every time that the page is loaded, so I suppose that if that's the case, the code is actually not saved anywhere.
    I came across some info in other forums, and from what I understand, it seems that for what I'm trying to do, an approach called 'injecting java' may be the way to go.

    Any insight into that?
     
    v610, Jul 29, 2019 IP