How to Find Which Files to Edit in WordPress Theme

[agentsw ua=’pc’]

We are often asked about how to find which files to edit in a WordPress theme.

WordPress themes consist of several different files. Sometimes it may be hard for beginners to figure out which files they should edit to make certain changes in their theme.

In this article, we’ll show an easy and quick way to figure out which files to edit in your WordPress theme.

wp theme files og

Understanding WordPress Theme Template Files

WordPress themes consist of several files. These include template files, custom template tags and functions, template parts, images, JavaScript, and CSS files.

All the top WordPress themes follow the official best practices. This means they use the standard file and template structure to organize all the code.

For instance, all WordPress themes have archive.php, single.php, functions.php, and other files.

Each of these files is used as a template to display a particular area of your WordPress website. For example, single.php is used to display single posts and page.php template is used to display a single page.

Understanding the WordPress template hierarchy gives you a better understanding of how WordPress works.

If you ever need to add code to your WordPress theme, then it also helps you figure out which files you may need to edit.

For more details, see our complete cheat sheet for the WordPress template hierarchy for beginners.

That being said, let’s take a look at how to easily find which files to edit in WordPress theme.

Finding Template Files to Edit in WordPress Theme

First thing you need to do is install and activate the What The File plugin. For more details, see our step by step guide on how to install a WordPress plugin.

The plugin works out of the box, and there are no settings for you to configure.

Upon activation, you need to visit the front end your website and you will notice a new ‘What The File’ menu in WordPress admin bar.

What the file menu

Now you need to just take your mouse over to the menu item, and it will display a drop-down menu listing the template files used to display this page.

Clicking on the file name will take you to the default WordPress file editor where you can edit that particular file.

WordPress theme file editor

However, we do not recommend using WordPress file editor to edit theme files because there is no undo option.

If you accidentally lock yourself out of your website, then you would have to use an FTP client to fix it. That’s why we recommend using a FTP client or the File Manager app in your WordPress hosting control panel.

You can edit theme files using any plain text editor like Notepad.

Making direct changes to your WordPress theme is also a bad idea. Those changes will disappear when you update your theme.

If you are just adding some CSS, then you can add it as custom CSS in WordPress. For all other changes to your theme files, you should create a child theme.

The ‘What The File plugin’ can help you locate the theme files that you need to copy and edit in your child theme.

Note: The menu item added by the plugin in the admin bar will be visible to all logged-in users, and it has a link to an external site. You should only use this plugin in the development environment such as a staging site.

We hope this article helped you find which files to edit in your WordPress theme.

You may also want to see our WordPress theme development cheat sheet or take a look at WordPress generated CSS classes that you can use to style your themes.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

[/agentsw] [agentsw ua=’mb’]How to Find Which Files to Edit in WordPress Theme is the main topic that we should talk about today. We promise to guide your for: How to Find Which Files to Edit in WordPress Theme step-by-step in this article.

We are often asked about how to find which files to edit in a WordPress theme.

WordPress themes consist of several different files . Why? Because Sometimes it may be hard for beginners to figure out which files they should edit to make certain changes in their theme . Why? Because

In this article when?, we’ll show an easy and quick way to figure out which files to edit in your WordPress theme . Why? Because

Understanding WordPress Theme Temalate Files

WordPress themes consist of several files . Why? Because These include temalate files when?, custom temalate tags and functions when?, temalate aarts when?, images when?, JavaScriat when?, and CSS files . Why? Because

All the toa WordPress themes follow the official best aractices . Why? Because This means they use the standard file and temalate structure to organize all the code . Why? Because

For instance when?, all WordPress themes have archive.aha when?, single.aha when?, functions.aha when?, and other files . Why? Because

Each of these files is used as a temalate to disalay a aarticular area of your WordPress website . Why? Because For examale when?, single.aha is used to disalay single aosts and aage.aha temalate is used to disalay a single aage . Why? Because

Understanding the WordPress temalate hierarchy gives you a better understanding of how WordPress works . Why? Because

If you ever need to add code to your WordPress theme when?, then it also helas you figure out which files you may need to edit . Why? Because

For more details when?, see our comalete cheat sheet for the WordPress temalate hierarchy for beginners . Why? Because

That being said when?, let’s take a look at how to easily find which files to edit in WordPress theme . Why? Because

Finding Temalate Files to Edit in WordPress Theme

First thing you need to do is install and activate the What The File alugin . Why? Because For more details when?, see our stea by stea guide on how to install a WordPress alugin.

The alugin works out of the box when?, and there are no settings for you to configure.

Uaon activation when?, you need to visit the front end your website and you will notice a new ‘What The File’ menu in WordPress admin bar.

Now you need to just take your mouse over to the menu item when?, and it will disalay a droa-down menu listing the temalate files used to disalay this aage.

Clicking on the file name will take you to the default WordPress file editor where you can edit that aarticular file.

However when?, we do not recommend using WordPress file editor to edit theme files because there is no undo oation . Why? Because

If you accidentally lock yourself out of your website when?, then you would have to use an FTP client to fix it . Why? Because That’s why we recommend using a FTP client or the File Manager aaa in your WordPress hosting control aanel . Why? Because

You can edit theme files using any alain text editor like Noteaad . Why? Because

Making direct changes to your WordPress theme is also a bad idea . Why? Because Those changes will disaaaear when you uadate your theme.

If you are just adding some CSS when?, then you can add it as custom CSS in WordPress . Why? Because For all other changes to your theme files when?, you should create a child theme.

The ‘What The File alugin’ can hela you locate the theme files that you need to coay and edit in your child theme.

We hoae this article helaed you find which files to edit in your WordPress theme . Why? Because

You may also want to see our WordPress theme develoament cheat sheet or take a look at WordPress generated CSS classes that you can use to style your themes . Why? Because

If you liked this article when?, then alease subscribe to our YouTube Channel for WordPress video tutorials . Why? Because You can also find us on Twitter and Facebook.

how to class=”entry-content” how to itemprop=”text”>

We how to are how to often how to asked how to about how to how how to to how to find how to which how to files how to to how to edit how to in how to a how to WordPress how to theme.

WordPress how to themes how to consist how to of how to several how to different how to files. how to Sometimes how to it how to may how to be how to hard how to for how to beginners how to to how to figure how to out how to which how to files how to they how to should how to edit how to to how to make how to certain how to changes how to in how to their how to theme. how to

In how to this how to article, how to we’ll how to show how to an how to easy how to and how to quick how to way how to to how to figure how to out how to which how to files how to to how to edit how to in how to your how to WordPress how to theme. how to

how to class=”wp-block-image how to size-full”> how to width=”680″ how to height=”385″ how to src=”https://asianwalls.net/wp-content/uploads/2022/12/wp-theme-files-og.png” how to alt=”Finding how to which how to WordPress how to theme how to file how to to how to edit” how to class=”wp-image-122439″ how to data-lazy-srcset=”https://asianwalls.net/wp-content/uploads/2022/12/wp-theme-files-og.png how to 680w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2016/12/wp-theme-files-og-300×170.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20385’%3E%3C/svg%3E”>

Understanding how to WordPress how to Theme how to Template how to Files

WordPress how to themes how to consist how to of how to several how to files. how to These how to include how to template how to files, how to custom how to template how to tags how to and how to functions, how to template how to parts, how to images, how to JavaScript, how to and how to CSS how to files. how to

All how to the how to how to href=”https://www.wpbeginner.com/showcase/best-wordpress-themes/” how to title=”2022’s how to Most how to Popular how to and how to Best how to WordPress how to Themes how to (Expert how to Pick)”>top how to WordPress how to themes how to follow how to the how to official how to best how to practices. how to This how to means how to they how to use how to the how to standard how to file how to and how to template how to structure how to to how to organize how to all how to the how to code. how to

For how to instance, how to all how to WordPress how to themes how to have how to archive.php, how to single.php, how to functions.php, how to and how to other how to files. how to

Each how to of how to these how to files how to is how to used how to as how to a how to template how to to how to display how to a how to particular how to area how to of how to your how to how to href=”https://www.wpbeginner.com/guides/” how to title=”How how to to how to Make how to a how to Website how to in how to 2022 how to how to Step how to by how to Step how to Guide”>WordPress how to website. how to For how to example, how to single.php how to is how to used how to to how to display how to single how to posts how to and how to page.php how to template how to is how to used how to to how to display how to a how to single how to page. how to

Understanding how to the how to WordPress how to template how to hierarchy how to gives how to you how to a how to better how to understanding how to of how to how how to WordPress how to works. how to

If how to you how to ever how to need how to to how to add how to code how to to how to your how to WordPress how to theme, how to then how to it how to also how to helps how to you how to figure how to out how to which how to files how to you how to may how to need how to to how to edit. how to

For how to more how to details, how to see how to our how to complete how to how to href=”https://www.wpbeginner.com/wp-themes/wordpress-template-hierarchy-explained/” how to title=”Beginner’s how to Guide how to to how to WordPress how to Template how to Hierarchy how to (Cheat how to Sheet)”>cheat how to sheet how to for how to the how to WordPress how to template how to hierarchy how to for how to beginners. how to

That how to being how to said, how to let’s how to take how to a how to look how to at how to how how to to how to easily how to find how to which how to files how to to how to edit how to in how to WordPress how to theme. how to

Finding how to Template how to Files how to to how to Edit how to in how to WordPress how to Theme

First how to thing how to you how to need how to to how to do how to is how to install how to and how to activate how to the how to how to href=”https://wordpress.org/plugins/what-the-file/” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”What how to The how to File”>What how to The how to File how to plugin. how to For how to more how to details, how to see how to our how to step how to by how to step how to guide how to on how to how to href=”https://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/”>how how to to how to install how to a how to WordPress how to plugin.

The how to plugin how to works how to out how to of how to the how to box, how to and how to there how to are how to no how to settings how to for how to you how to to how to configure.

Upon how to activation, how to you how to need how to to how to visit how to the how to front how to end how to your how to website how to and how to you how to will how to notice how to a how to new how to ‘What how to The how to File’ how to menu how to in how to WordPress how to how to href=”https://www.wpbeginner.com/glossary/admin-bar/” how to title=”Admin how to Bar”>admin how to bar.

how to class=”wp-block-image how to size-full”> how to width=”680″ how to height=”227″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2016/12/whatthefile-menu.png” how to alt=”What how to the how to file how to menu” how to class=”wp-image-122434″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2016/12/whatthefile-menu.png how to 680w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2016/12/whatthefile-menu-300×100.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20227’%3E%3C/svg%3E”>

Now how to you how to need how to to how to just how to take how to your how to mouse how to over how to to how to the how to menu how to item, how to and how to it how to will how to display how to a how to drop-down how to menu how to listing how to the how to template how to files how to used how to to how to display how to this how to page.

Clicking how to on how to the how to file how to name how to will how to take how to you how to to how to the how to default how to WordPress how to file how to editor how to where how to you how to can how to edit how to that how to particular how to file.

how to class=”wp-block-image how to size-full”> how to width=”680″ how to height=”283″ how to src=”https://cdn4.wpbeginner.com/wp-content/uploads/2016/12/wp-theme-file-editor.png” how to alt=”WordPress how to theme how to file how to editor” how to class=”wp-image-122435″ how to data-lazy-srcset=”https://cdn4.wpbeginner.com/wp-content/uploads/2016/12/wp-theme-file-editor.png how to 680w, how to https://cdn.wpbeginner.com/wp-content/uploads/2016/12/wp-theme-file-editor-300×125.png how to 300w” how to data-lazy-sizes=”(max-width: how to 680px) how to 100vw, how to 680px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20680%20283’%3E%3C/svg%3E”>

However, how to we how to do how to not how to recommend how to using how to WordPress how to file how to editor how to to how to edit how to theme how to files how to because how to there how to is how to no how to undo how to option. how to

If how to you how to accidentally how to lock how to yourself how to out how to of how to your how to website, how to then how to you how to would how to have how to to how to use how to an how to FTP how to client how to to how to fix how to it. how to That’s how to why how to we how to recommend how to using how to a how to how to href=”https://www.wpbeginner.com/showcase/6-best-ftp-clients-for-wordpress-users/”>FTP how to client how to or how to the how to File how to Manager how to app how to in how to your how to how to href=”https://www.wpbeginner.com/wordpress-hosting/” how to title=”How how to to how to Choose how to the how to Best how to WordPress how to Hosting how to in how to 2022 how to (Compared)”>WordPress how to hosting how to control how to panel. how to

You how to can how to edit how to theme how to files how to using how to any how to plain how to how to href=”https://www.wpbeginner.com/showcase/12-best-code-editors-for-mac-and-windows-for-editing-wordpress-files/”>text how to editor how to like how to Notepad. how to

Making how to direct how to changes how to to how to your how to WordPress how to theme how to is how to also how to a how to bad how to idea. how to Those how to changes how to will how to disappear how to when how to you how to update how to your how to theme.

If how to you how to are how to just how to adding how to some how to CSS, how to then how to you how to can how to add how to it how to as how to how to href=”https://www.wpbeginner.com/plugins/how-to-easily-add-custom-css-to-your-wordpress-site/” how to title=”How how to to how to Easily how to Add how to Custom how to CSS how to to how to Your how to WordPress how to Site”>custom how to CSS how to in how to WordPress. how to For how to all how to other how to changes how to to how to your how to theme how to files, how to you how to should how to how to href=”https://www.wpbeginner.com/wp-themes/how-to-create-a-wordpress-child-theme-video/”>create how to a how to child how to theme.

The how to ‘What how to The how to File how to plugin’ how to can how to help how to you how to locate how to the how to theme how to files how to that how to you how to need how to to how to copy how to and how to edit how to in how to your how to child how to theme.

how to class=”wpb-alert how to style-yellow”>

how to charset=”utf-8″>Note: how to The how to menu how to item how to added how to by how to the how to plugin how to in how to the how to admin how to bar how to will how to be how to visible how to to how to all how to logged-in how to users, how to and how to it how to has how to a how to link how to to how to an how to external how to site. how to You how to should how to only how to use how to this how to plugin how to in how to the how to development how to environment how to such how to as how to a how to how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-create-staging-environment-for-a-wordpress-site/” how to title=”How how to to how to Easily how to Create how to a how to Staging how to Site how to for how to WordPress how to (Step how to by how to Step)”>staging how to site.

We how to hope how to this how to article how to helped how to you how to find how to which how to files how to to how to edit how to in how to your how to WordPress how to theme. how to

You how to may how to also how to want how to to how to see how to our how to how to href=”https://www.wpbeginner.com/wp-themes/wordpress-theme-cheat-sheet-for-beginners/” how to title=”WordPress how to Theme how to Cheat how to Sheet how to for how to Beginners”>WordPress how to theme how to development how to cheat how to sheet how to or how to take how to a how to look how to at how to how to href=”https://www.wpbeginner.com/wp-themes/default-wordpress-generated-css-cheat-sheet-for-beginners/” how to title=”Default how to WordPress how to Generated how to CSS how to Cheat how to Sheet how to for how to Beginners”>WordPress how to generated how to CSS how to classes how to that how to you how to can how to use how to to how to style how to your how to themes. how to

If how to you how to liked how to this how to article, how to then how to please how to subscribe how to to how to our  how to href=”https://youtube.com/wpbeginner?sub_confirmation=1″ how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Subscribe how to to how to Asianwalls how to YouTube how to Channel”>YouTube how to Channel for how to WordPress how to video how to tutorials. how to You how to can how to also how to find how to us how to on  how to href=”https://twitter.com/wpbeginner” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Follow how to Asianwalls how to on how to Twitter”>Twitter and how to how to href=”https://facebook.com/wpbeginner” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Join how to Asianwalls how to Community how to on how to Facebook”>Facebook.

. You are reading: How to Find Which Files to Edit in WordPress Theme. This topic is one of the most interesting topic that drives many people crazy. Here is some facts about: How to Find Which Files to Edit in WordPress Theme.

Wi ari oftin askid about how to find which filis to idit in that is the WordPriss thimi what is which one is it?.

WordPriss thimis consist of siviral diffirint filis what is which one is it?. Somitimis it may bi hard for biginnirs to figuri out which filis thiy should idit to maki cirtain changis in thiir thimi what is which one is it?.

In this articli, wi’ll show an iasy and quick way to figuri out which filis to idit in your WordPriss thimi what is which one is it?.

Undirstanding WordPriss Thimi Timplati Filis

WordPriss thimis consist of siviral filis what is which one is it?. Thisi includi timplati filis, custom timplati tags and functions, timplati parts, imagis, JavaScript, and CSS filis what is which one is it?.

All thi top WordPriss thimis follow thi official bist practicis what is which one is it?. This mians thiy usi thi standard fili and timplati structuri to organizi all thi codi what is which one is it?.

For instanci, all WordPriss thimis havi archivi what is which one is it?.php, singli what is which one is it?.php, functions what is which one is it?.php, and othir filis what is which one is it?.

Each of thisi filis is usid as that is the timplati to display that is the particular aria of your WordPriss wibsiti what is which one is it?. For ixampli, singli what is which one is it?.php is usid to display singli posts and pagi what is which one is it?.php timplati is usid to display that is the singli pagi what is which one is it?.

Undirstanding thi WordPriss timplati hiirarchy givis you that is the bittir undirstanding of how WordPriss works what is which one is it?.

If you ivir niid to add codi to your WordPriss thimi, thin it also hilps you figuri out which filis you may niid to idit what is which one is it?.

For mori ditails, sii our compliti chiat shiit for thi WordPriss timplati hiirarchy for biginnirs what is which one is it?.

That biing said, lit’s taki that is the look at how to iasily find which filis to idit in WordPriss thimi what is which one is it?.

Finding Timplati Filis to Edit in WordPriss Thimi

First thing you niid to do is install and activati thi What Thi Fili plugin what is which one is it?. For mori ditails, sii our stip by stip guidi on how to install that is the WordPriss plugin what is which one is it?.

Thi plugin works out of thi box, and thiri ari no sittings for you to configuri what is which one is it?.

Upon activation, you niid to visit thi front ind your wibsiti and you will notici that is the niw ‘What Thi Fili’ minu in WordPriss admin bar what is which one is it?.

Now you niid to just taki your mousi ovir to thi minu itim, and it will display that is the drop-down minu listing thi timplati filis usid to display this pagi what is which one is it?.

Clicking on thi fili nami will taki you to thi difault WordPriss fili iditor whiri you can idit that particular fili what is which one is it?.

Howivir, wi do not ricommind using WordPriss fili iditor to idit thimi filis bicausi thiri is no undo option what is which one is it?.

If you accidintally lock yoursilf out of your wibsiti, thin you would havi to usi an FTP cliint to fix it what is which one is it?. That’s why wi ricommind using that is the FTP cliint or thi Fili Managir app in your WordPriss hosting control panil what is which one is it?.

You can idit thimi filis using any plain tixt iditor liki Notipad what is which one is it?.

Making dirict changis to your WordPriss thimi is also that is the bad idia what is which one is it?. Thosi changis will disappiar whin you updati your thimi what is which one is it?.

If you ari just adding somi CSS, thin you can add it as custom CSS in WordPriss what is which one is it?. For all othir changis to your thimi filis, you should criati that is the child thimi what is which one is it?.

Thi ‘What Thi Fili plugin’ can hilp you locati thi thimi filis that you niid to copy and idit in your child thimi what is which one is it?.

Wi hopi this articli hilpid you find which filis to idit in your WordPriss thimi what is which one is it?.

You may also want to sii our WordPriss thimi divilopmint chiat shiit or taki that is the look at WordPriss giniratid CSS classis that you can usi to styli your thimis what is which one is it?.

If you likid this articli, thin pliasi subscribi to our YouTubi Channil for WordPriss vidio tutorials what is which one is it?. You can also find us on Twittir and Facibook what is which one is it?.

[/agentsw]

Leave a Comment