February 20, 201511 yr I've started using WP for a friends small website. I'm still in the testing stages and have added the child theme for the parent one I'm using. Copying and editing files like header and footer is easy enough but I'm having trouble finding the code for other parts I want to change. When using html/css it's obvious what file needs changing and I use the developer tools in Chrome to help. Is there an easy way for me to find out what file an element belongs to?
February 20, 201511 yr One thing that can be useful is looking at the body classes, <body class="category"> sometimes they will have things like: page (page.php)single (single.php)archive (archive.php)category (category.php)But this is only if your theme supports body classes. Edited February 20, 201511 yr by EpicWebs
February 22, 201511 yr Check out the WP codex http://codex.wordpress.org/Template_Hierarchy Basically if there isn't a template for it then it will revert to the index.php file. There are plenty of templates within a theme as you can override specific tags, categories, archives with specific targeted theme files
February 28, 201511 yr You should be building themes from scratch than editing pre-built themes really. Treehouse has good tutorials on this.
Create an account or sign in to comment