The Theme files you want to edit are located in a specific folder of your WP installation. Let’s say you put all the WP files in a directory called “home”, then you’d find the files for the Sparkling theme in home > wp-content > themes > sparkling.
There are multiple files that make a Theme work – you’ll need to know which-does-what. I’ll monitor this thread and help you if I can (as will many others, I’m sure!)
Hope this helps!
Hi Mark,
Thank you for responding.
I’m lost trying to find the Sparkling page. This is the page I’m on:
http://localhost/wp-admin/
What URL do I go to, to access Sparkling and the files I want to edit? All I’m trying to do now is edit, index.html.
-
This reply was modified 7 years, 8 months ago by
andypoo.
It’s possible to edit a Theme’s PHP files from the WP-Admin area (that’s the page you’re on), but it really isn’t recommended because there is no “undo” option or a way to back things up. So most folks just edit the files directly using their favorite code editor. In that case, you’d edit the files you find in home > wp-content > themes > sparkling as I mentioned above.
But you can do a lot to change the appearance and behavior of a theme by “Customizing” it from the WP-Admin area: Go to Appearance > Themes and make sure Sparkling is selected as your Active Theme – then click on the “Customize” button. All themes are different, but I’ve worked with Sparkling before and it has lots of options that can be configured from this Customize page. Additionally, you’ll find a section here where you can add your own CSS styling that will override the theme’s default CSS.
(Note that from the “Appearance” menu there’s also an “Edit” link that will allow you to directly edit the theme’s PHP files, and this is what I mentioned above that is NOT recommended! But just making changes on the Customize page can be undone by selecting the “default” values that each option has.)
I’m afraid there isn’t a single HTML file that you can edit. Themes are made up from various PHP files which get included (or not) depending on which page you’re viewing. For instance, the “Comments” section of a post or page is usually a separate file (comments.php) that you’ll find in the theme’s directory. But the styling for ALL of these various components comes from a single “style.css” file that is likewise in the theme’s directory.
This page explains Customizing Themes a little better : https://easywpguide.com/wordpress-manual/appearance/selecting-your-theme/previewing-and-customizing-your-theme/
If you need to do something more extensive than the Customizer will allow, let us know specifically what it is you’re trying to do!
Thanks for all the info Bro and that handy link.
I discovered what the problem was; it was that pesky index.html file. Once I removed it from /var/www/html, it fixed the problem. Maybe we should mention this to people?
LOL! Now I see where the problem was too. Most folks install WP in a subfolder like “wordpress” or something like that, and then the address on your development server would be http://localhost/wordpress/ – and only the WP files would be there.
I use XAMPP as a development server and it uses /htdocs/ instead of /var/www/html/ – but if I just go to http://localhost/ without pointing to a subdirectory I’ll see the XAMPP welcome page.
I’d recommend you put your files in a subfolder too, just to avoid conflicts. Also if you do plan to edit the Sparkling files directly, you should use a “child-theme” to do this. Here’s a article about that :
What is a WordPress Child Theme?