Need Help. Can't find HTML file in WordPress

5 replies
  • WEB DESIGN
  • |
Two fold question:


I do an Inspect Elements on my WP website to find classes and IDs (I'm big on CSS). However, a lot of times, when I do Inspect Elements, I click on an object, I see the selector...but when I look for it in the CSS.styles file - it's not there. Just wondering if anyone goes through the same problem.

Also, a second question. I see in the Inspector element the HTML file - but where is it located? If I can find the html file for each page, then I can add my own CSS with the DIV tags and all that.

Thanks in advance for your help.
#file #find #html #wordpress
  • Profile picture of the author blackli0n
    When you INSPECT, look on the left panel (inside the html code) and click the next DIV higher than the element that was selected. You might be able to find the more accurate class that you're trying to change.
    Signature
    wpjohnny.com - Make Money with Wordpress
    Passive income since 2007. Trying to consistently crack 5-figures/month. find what you love - dream big - work hard
    {{ DiscussionBoard.errors[10894548].message }}
  • Profile picture of the author Nathan K
    First Question
    Sometimes there might be more than 1 css file, so in that case if you look at the css panel of the inspector, next to each rule, it will have the file name and the line number of the css file.

    Second Question
    What you see in your browser is the html page generated by wordpress. It is not a physical file so there will be no html files you can edit. Wordpress uses PHP to create dynamic pages that will act as templates for your wordpress pages and posts.
    So for example if you create a 'Page' in wordpress, it will take the template from the page.php file and this file also might import content from several other .php files (e.g. header.php , footer.php sidebar.php etc) to generate the final page you see in the browser.
    If you want to modify the templates you need to edit the .php files located in your theme folder. And you should be careful when editing a live site, you might break something and the page might not load.
    {{ DiscussionBoard.errors[10894704].message }}
  • Profile picture of the author bigcat1967
    I want to thank both of you. I watched a lot of tutorials today and learned so much - did so much on my website.

    I get it now about the PHP files. I do want to learn more about PHP. I took an online tutorial on it a few years ago - I'm thinking about learning it again and getting pretty good at it.

    Thanks again for your help!
    Signature

    <a href="https://changeyourbudget.com/save-money-on-your-water-bill/">How to Lower Your Water Bill</a>

    {{ DiscussionBoard.errors[10894879].message }}
    • Profile picture of the author TopNetworks
      Originally Posted by bigcat1967 View Post

      I want to thank both of you. I watched a lot of tutorials today and learned so much - did so much on my website.

      I get it now about the PHP files. I do want to learn more about PHP. I took an online tutorial on it a few years ago - I'm thinking about learning it again and getting pretty good at it.

      Thanks again for your help!
      Learning php will change your life if you want to be a coder, i love it there is so much you can do, once you learn the basics its all up hill from there.
      Signature
      TopNetworks.com ranks the top advertising networks based on reviews from affiliate marketers.
      {{ DiscussionBoard.errors[10903895].message }}
  • Profile picture of the author Lanyea
    What you see in your browser is that the markup language page generated by wordpress. it's not a physical file therefore there'll be no markup language files you'll edit. Wordpress uses PHP to form dynamic pages which will act as templates for your wordpress pages.
    So as an example if you produce a 'Page' in wordpress, it'll take the guide from the page.php file and this file additionally would possibly import content from many different .php files to get the ultimate page you see within the browser.
    If you would like to change the templates you would like to edit the.
    php files placed in your theme folder. And you ought to use caution once redaction
    a live website, you would possibly break one thing and also the page won't load.
    {{ DiscussionBoard.errors[10904564].message }}

Trending Topics