{"id":35941,"date":"2024-04-16T10:39:19","date_gmt":"2024-04-16T10:39:19","guid":{"rendered":"https:\/\/10web.io\/blog\/?p=35941"},"modified":"2024-04-24T11:31:51","modified_gmt":"2024-04-24T11:31:51","slug":"how-to-edit-code-in-wordpress","status":"publish","type":"post","link":"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/","title":{"rendered":"How to Edit Code in WordPress: A Beginners Guide"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Editing code in WordPress might seem difficult for beginners, but it&#8217;s a crucial skill for customizing your website to fit your unique needs. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">This guide will walk you through the basics of navigating the WordPress editor, making changes to HTML, CSS, and PHP, and ensuring your edits are safe and effective. Whether you want to improve the design, add custom functionality, or simply understand how your website works, this article will provide the tools and confidence you need to start editing code in WordPress.<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">FAQ<\/span><\/h2>\n<p><div class=\"faq-shortcode\">\n    <p class=\"faq_title\">How do you edit the code of a WordPress website?<\/p>\n    <div class=\"faq_content\"> To edit the code of a WordPress website, you can use the built-in <b>Theme Editor<\/b><span style=\"font-weight: 400;\"> or <\/span><b>Plugin Editor<\/b><span style=\"font-weight: 400;\"> in the WordPress dashboard under <\/span><b>Appearance<\/b><span style=\"font-weight: 400;\"> &gt; <\/span><b>Theme Editor<\/b><span style=\"font-weight: 400;\"> or <\/span><b>Plugins<\/b><span style=\"font-weight: 400;\"> &gt; <\/span><b>Plugin<\/b> <b>Editor<\/b><span style=\"font-weight: 400;\">. For more substantial code changes, it&#8217;s recommended to use FTP to access website files directly. <\/div>\n<\/div>\n<br \/>\n<div class=\"faq-shortcode\">\n    <p class=\"faq_title\">Does WordPress have a Code Editor?<\/p>\n    <div class=\"faq_content\"> Yes, WordPress includes a built-in code editor that allows you to edit theme and plugin files directly from the dashboard. However, for safety and version control, many developers prefer using external code editors and uploading changes via FTP. <\/div>\n<\/div>\n<br \/>\n<div class=\"faq-shortcode\">\n    <p class=\"faq_title\">How do I edit hard code in WordPress?<\/p>\n    <div class=\"faq_content\"> To edit hard-coded elements in WordPress, access the theme or plugin files either through the WordPress <\/span><b>Theme Editor<\/b><span style=\"font-weight: 400;\"> or by using an FTP client to modify files directly on your server. Always ensure to back up files before making changes.<\/div>\n<\/div>\n<br \/>\n<div class=\"faq-shortcode\">\n    <p class=\"faq_title\">How do I edit a code snippet in WordPress?<\/p>\n    <div class=\"faq_content\"> To edit a code snippet in WordPress, you can use the Theme Editor to modify the functions.php file of your theme or use a plugin like <\/span><b>Code Snippets<\/b><span style=\"font-weight: 400;\"> for safely adding and managing custom snippets without editing theme files directly. <\/div>\n<\/div>\n<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Why editing code in WordPress is essential<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Editing code directly in WordPress can provide numerous advantages, particularly for those who want comprehensive control over their website&#8217;s functionality and aesthetics. Delving into the site&#8217;s code allows for extensive customization and refinement beyond what standard themes and plugins offer. This capability is essential for anyone looking to tailor their WordPress site precisely to their vision or to meet unique operational needs. Here are some of the significant benefits:<\/span><\/p>\n<ol class=\"black\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Customization:<\/b><span style=\"font-weight: 400;\"> Tailor themes and plugins to precisely fit your design and functionality needs.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Increased control:<\/b><span style=\"font-weight: 400;\"> Directly manipulate various aspects of your site, from layout to user interactions.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Cost savings:<\/b><span style=\"font-weight: 400;\"> Reduce the need for external developers, potentially lowering overall website costs.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Enhanced problem solving:<\/b><span style=\"font-weight: 400;\"> Address and resolve site issues yourself, improving uptime and user experience.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Skill advancement:<\/b><span style=\"font-weight: 400;\"> Develop valuable web development skills, such as HTML, CSS, PHP, and JavaScript.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Improved marketability:<\/b><span style=\"font-weight: 400;\"> Boost your professional qualifications and appeal to potential employers or clients.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Better SEO implementation:<\/b><span style=\"font-weight: 400;\"> Directly implement and adjust SEO strategies through code modifications.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Quick changes:<\/b><span style=\"font-weight: 400;\"> Implement updates and changes faster than relying on third-party solutions.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Improved security: <\/b><span style=\"font-weight: 400;\">Understand and enhance the security of your site by directly managing code vulnerabilities.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Greater independence:<\/b><span style=\"font-weight: 400;\"> Gain confidence and autonomy in website management and updates.<\/span><\/li>\n<\/ol>\n<h2><span style=\"font-weight: 400;\">What can be Edited in your WordPress Site?<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">In WordPress, the ability to edit using HTML, CSS, and PHP allows for comprehensive customization of your website. Here\u2019s how each of the three main languages play a role in WordPress editing:<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">1. HTML<\/span><\/h3>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Pages and posts:<\/b><span style=\"font-weight: 400;\"> You can directly edit the HTML of individual pages and posts using the Text editor in WordPress. This allows for custom formatting beyond what&#8217;s provided by the visual editor.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Widgets:<\/b><span style=\"font-weight: 400;\"> Many widgets allow HTML content, enabling you to add custom links, text formatting, and images.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Theme files:<\/b><span style=\"font-weight: 400;\"> Advanced users can edit the HTML parts of theme template files to alter the structure of theme layouts.<\/span><\/li>\n<\/ul>\n<h3><span style=\"font-weight: 400;\">2. CSS<\/span><\/h3>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Theme customization:<\/b><span style=\"font-weight: 400;\"> You can add custom CSS to your WordPress theme to alter the visual style of your site. This includes changes to colors, fonts, margins, and other layout properties. WordPress includes a built-in Customizer that you can use to add custom CSS.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Child themes:<\/b><span style=\"font-weight: 400;\"> To make extensive CSS changes, you might consider creating a child theme. This allows you to override CSS from the parent theme without losing your changes when the parent theme updates.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Plugins:<\/b><span style=\"font-weight: 400;\"> Some plugins allow for custom CSS to be added to handle specific elements like forms or sliders differently.<\/span><\/li>\n<\/ul>\n<h3><span style=\"font-weight: 400;\">3. PHP (Hypertext Preprocessor):<\/span><\/h3>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Theme and plugin development:<\/b><span style=\"font-weight: 400;\"> PHP is crucial for developing or modifying themes and plugins. WordPress is built on PHP, so understanding PHP allows you to create dynamic page elements, handle data, and customize WordPress behavior.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>WordPress templates:<\/b><span style=\"font-weight: 400;\"> Themes are mostly composed of PHP files that serve as templates. These templates can be modified to change how posts, pages, or entire sections of your site are displayed.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Functions file:<\/b><span style=\"font-weight: 400;\"> Each theme has a <\/span><span style=\"font-weight: 400;\">functions.php<\/span><span style=\"font-weight: 400;\"> file, which allows you to add or modify features. This could include custom post types, shortcodes, or new widgets.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Understanding these three languages will greatly enhance your ability to tailor your WordPress site to meet your needs exactly. Whether it&#8217;s tweaking the design with CSS, adding custom functionality with PHP, or simply adjusting the layout with HTML, these skills are central to effective WordPress management.<\/span><\/p>\n\r\n<style>\r\n  #ctablocks_inline_92{\r\n          background-color: #000000;\r\n        color: #ffffff;\r\n    border-radius: 6px;\r\n  }\r\n\r\n  #ctablocks_inline_92 p{\r\n    color: #ffffff;\r\n  }\r\n  #ctablocks_inline_92 .button{\r\n        background-color: rgb(51,57,241);\r\n      color: #ffffff;\r\n    border-color: #3339f1 !important;\r\n  }\r\n  #ctablocks_inline_92 .button:hover{\r\n    background: rgba(51,57,241,0.8);\r\n    color: #ffffff;\r\n    opacity: 1;\r\n  }\r\n        #ctablocks_inline_92 .ctablocks_content_info p {\r\n        padding-left: 36px;\r\n      }\r\n      #ctablocks_inline_92 .ctablocks_content_button {\r\n          margin-left: 37px;\r\n      }\r\n  @media screen and (min-width: 768px) and (max-width: 1260px) {\r\n      #ctablocks_inline_92 .ctablocks_content_button {\r\n          margin-left: 37px !important;\r\n      }\r\n  }\r\n  ;\r\n<\/style>\r\n<div id=\"ctablocks_inline_92\" class=\"ctablocks_container inline_type\r\n        \">\r\n\r\n  <div class=\"ctablocks_content clear\">\r\n    <div class=\"ctablocks_content_info\">\r\n      \r\n            <div class=\"title-wrap\">\r\n\t\t\t\t\t                  <img decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/info-icon-cta.png\" alt=\"Simplify WordPress with 10Web\" title=\"Simplify WordPress with 10Web\">\r\n\t\t\t\t\t            <h4>Simplify WordPress with 10Web<\/h4>\r\n        <\/div>\r\n              <p>Automate manual work with 10Web Managed WordPress Hosting and 10Web AI Website Builder. Optimize your WordPress website effortlessly. <\/p>\r\n          <\/div>\r\n    <div class=\"ctablocks_content_button\">\r\n              <a href=\"https:\/\/10web.io\/ai-website-builder\/\" class=\"button\" data-gtag=\"sign-up-blog\" data-buttontype=\"sign-up\" data-gtag=\"cta-92\" data-buttontype=\"cta-inline\"\r\n\t        >Learn How<\/a>\r\n            \r\n    <\/div>\r\n  <\/div>\r\n    <\/div>\r\n\n<h2><span style=\"font-weight: 400;\">How to edit code in WordPress<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Editing HTML in WordPress can be achieved through various methods depending on which editor or interface you&#8217;re using. Here\u2019s how to edit HTML code in WordPress using three different methods:<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Method 1: Edit WordPress HTML in block editor<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">The WordPress Block Editor (also known as Gutenberg) allows you to add and edit HTML directly within blocks. Here\u2019s how to do it:<\/span><\/p>\n<ol class=\"black\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Go to your WordPress <\/span><b>Dashboard<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Go to <\/span><b>Pages<\/b><span style=\"font-weight: 400;\"> or <\/span><b>Posts<\/b><span style=\"font-weight: 400;\"> and either create a new one or edit an existing one.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35923\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Click the <\/span><b>+<\/b><span style=\"font-weight: 400;\"> button to add a new block.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML2.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35928\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML2.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML2-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML2-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML2-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML2-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML2-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML2-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML2-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Search for <\/span><b>HTML<\/b><span style=\"font-weight: 400;\"> and select the <\/span><b>Custom HTML<\/b><span style=\"font-weight: 400;\"> block.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML3.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35926\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML3.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML3-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML3-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML3-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML3-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML3-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML3-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML3-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Enter your HTML code directly into the <\/span><b>Custom HTML<\/b><span style=\"font-weight: 400;\"> block.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML4.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35925\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML4.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML4-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML4-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML4-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML4-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML4-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML4-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML4-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Preview the changes by clicking on the <\/span><b>Preview<\/b><span style=\"font-weight: 400;\"> button located at the top of the editor.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML5.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35930\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML5.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML5-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML5-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML5-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML5-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML5-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML5-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML5-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Once you\u2019ve made your changes, click <\/span><b>Publish<\/b><span style=\"font-weight: 400;\"> or <\/span><b>Update<\/b><span style=\"font-weight: 400;\"> to save your changes.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML6.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35929\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML6.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML6-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML6-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML6-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML6-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML6-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML6-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML6-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<\/ol>\n<h3><span style=\"font-weight: 400;\">Method 2: Edit WordPress HTML in classic editor<\/span><\/h3>\n<p><i><span style=\"font-weight: 400;\">If you don\u2019t have the Classic Editor installed, you can add it from the WordPress Plugin repository.<\/span><\/i><\/p>\n<ol class=\"black\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Go to the <\/span><b>Pages<\/b><span style=\"font-weight: 400;\"> or <\/span><b>Posts<\/b><span style=\"font-weight: 400;\"> section of your <\/span><b>Dashboard<\/b><span style=\"font-weight: 400;\">.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35923\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/HTML-1-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Open the page or post you want to edit.<br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">In the top right of the editor area, switch from the <\/span><b>Visual<\/b> <b>editor<\/b><span style=\"font-weight: 400;\"> tab to the <\/span><b>Code editor<\/b><span style=\"font-weight: 400;\"> tab to see the HTML markup.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic1.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35927\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic1.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic1-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic1-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic1-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic1-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic1-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic1-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic1-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">You can now add, delete, or modify the HTML directly in the editor.<br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Click <\/span><b>Update<\/b><span style=\"font-weight: 400;\"> to save your changes.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic2.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35931\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic2.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic2-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic2-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic2-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic2-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic2-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic2-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Classic2-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<\/ol>\n<h3><span style=\"font-weight: 400;\">Method 3: Edit WordPress HTML in widgets<\/span><\/h3>\n<ol class=\"black\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Go to <\/span><b>Appearance<\/b><span style=\"font-weight: 400;\"> &gt; <\/span><b>Widgets<\/b><span style=\"font-weight: 400;\"> in your WordPress <\/span><b>Dashboard<\/b><span style=\"font-weight: 400;\">.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets1.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35920\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets1.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets1-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets1-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets1-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets1-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets1-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets1-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets1-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Drag the <\/span><b>Custom HTML<\/b><span style=\"font-weight: 400;\"> widget to your desired widget area or click on it and select the area to add it.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets2.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35933\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets2.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets2-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets2-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets2-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets2-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets2-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets2-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets2-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Input your HTML directly into the content area of the widget.<br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Click <\/span><b>Save<\/b><span style=\"font-weight: 400;\"> on the widget and then preview your site to see the changes.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets3.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35932\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets3.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets3-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets3-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets3-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets3-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets3-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets3-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Widgets3-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">\u200b\u200bEditing HTML in these areas allows you to have fine control over the content and layout of your WordPress site. Always ensure to check how the changes look on the front end of your website to confirm that everything appears as expected.<\/span><\/p>\n\r\n<style>\r\n  #ctablocks_inline_92{\r\n          background-color: #000000;\r\n        color: #ffffff;\r\n    border-radius: 6px;\r\n  }\r\n\r\n  #ctablocks_inline_92 p{\r\n    color: #ffffff;\r\n  }\r\n  #ctablocks_inline_92 .button{\r\n        background-color: rgb(51,57,241);\r\n      color: #ffffff;\r\n    border-color: #3339f1 !important;\r\n  }\r\n  #ctablocks_inline_92 .button:hover{\r\n    background: rgba(51,57,241,0.8);\r\n    color: #ffffff;\r\n    opacity: 1;\r\n  }\r\n        #ctablocks_inline_92 .ctablocks_content_info p {\r\n        padding-left: 36px;\r\n      }\r\n      #ctablocks_inline_92 .ctablocks_content_button {\r\n          margin-left: 37px;\r\n      }\r\n  @media screen and (min-width: 768px) and (max-width: 1260px) {\r\n      #ctablocks_inline_92 .ctablocks_content_button {\r\n          margin-left: 37px !important;\r\n      }\r\n  }\r\n  ;\r\n<\/style>\r\n<div id=\"ctablocks_inline_92\" class=\"ctablocks_container inline_type\r\n        \">\r\n\r\n  <div class=\"ctablocks_content clear\">\r\n    <div class=\"ctablocks_content_info\">\r\n      \r\n            <div class=\"title-wrap\">\r\n\t\t\t\t\t                  <img decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/info-icon-cta.png\" alt=\"Simplify WordPress with 10Web\" title=\"Simplify WordPress with 10Web\">\r\n\t\t\t\t\t            <h4>Simplify WordPress with 10Web<\/h4>\r\n        <\/div>\r\n              <p>Automate manual work with 10Web Managed WordPress Hosting and 10Web AI Website Builder. Optimize your WordPress website effortlessly. <\/p>\r\n          <\/div>\r\n    <div class=\"ctablocks_content_button\">\r\n              <a href=\"https:\/\/10web.io\/ai-website-builder\/\" class=\"button\" data-gtag=\"sign-up-blog\" data-buttontype=\"sign-up\" data-gtag=\"cta-92\" data-buttontype=\"cta-inline\"\r\n\t        >Learn How<\/a>\r\n            \r\n    <\/div>\r\n  <\/div>\r\n    <\/div>\r\n\n<h2><span style=\"font-weight: 400;\">How to edit the source code in your WordPress theme<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Editing the source code of your WordPress theme is essential when you want to customize your site beyond the standard options provided by themes. Here are three methods to safely edit your WordPress theme\u2019s source code:<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Method 1: Use child theme<\/span><\/h3>\n<ol class=\"black\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Go to your WordPress installation directory, navigate to<\/span> <b>wp-content\/themes<\/b><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"> and create a new folder. Name it something like<\/span> <span style=\"font-weight: 400;\">[parent-theme-name]-child<\/span> <span style=\"font-weight: 400;\">(e.g., <\/span><span style=\"font-weight: 400;\">twentytwentyone-child<\/span><span style=\"font-weight: 400;\">).<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35918\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Inside the child theme folder, create a file named <\/span><b>style.css<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Add the following header to the file:<br \/>\n<\/span>Theme Name: Twenty Twenty-One Child<br \/>\nTemplate: twentytwentyone<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Replace <\/span><b>Twenty Twenty-One Child<\/b><span style=\"font-weight: 400;\"> with the name of your child theme and <\/span><b>twentytwentyone<\/b><span style=\"font-weight: 400;\"> with the directory name of the parent theme.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme2.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35922\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme2.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme2-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme2-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme2-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme2-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme2-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme2-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme2-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Navigate to your WordPress <\/span><b>Dashboard<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Go to <\/span><b>Appearance &gt; Themes<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Find your child theme and click <\/span><b>Activate<\/b><span style=\"font-weight: 400;\">.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme3.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35924\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme3.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme3-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme3-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme3-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme3-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme3-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme3-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme3-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<\/ol>\n<ol><\/ol>\n<h3><span style=\"font-weight: 400;\">Method 2: Use plugins<\/span><\/h3>\n<ol class=\"black\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Install and activate a plugin such as <\/span><b>Code Snippets<\/b><span style=\"font-weight: 400;\"> from the WordPress plugin repository.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Plugin1.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35919\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Plugin1.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Plugin1-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Plugin1-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Plugin1-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Plugin1-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Plugin1-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Plugin1-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Plugin1-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Navigate to the newly added snippets menu in your WordPress <\/span><b>Dashboard<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Click <\/span><b>Add New<\/b><span style=\"font-weight: 400;\"> to create a new snippet.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Enter your PHP, CSS, or JavaScript code, then save and activate the snippet.<\/span><\/li>\n<\/ol>\n<h3><span style=\"font-weight: 400;\">Method 3: Use the Dashboard WordPress code editor<\/span><\/h3>\n<ol class=\"black\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Go to <\/span><b>Appearance<\/b><span style=\"font-weight: 400;\"> &gt; <\/span><b>Theme Editor<\/b><span style=\"font-weight: 400;\"> in your WordPress <\/span><b>Dashboard<\/b><span style=\"font-weight: 400;\">.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35918\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme1-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">On the right-hand side, you\u2019ll see a list of theme files. Select the file you wish to edit, such as <\/span><span style=\"font-weight: 400;\">style.css<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">functions.php<\/span><span style=\"font-weight: 400;\">, or any template file.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme4.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-35921\" srcset=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme4.png 1920w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme4-742x416.png 742w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme4-1484x835.png 1484w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme4-150x84.png 150w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme4-768x432.png 768w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme4-1536x864.png 1536w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme4-371x208.png 371w, https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Theme4-600x338.png 600w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Make your changes in the editor. Be cautious with syntax and code errors.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Click<\/span><b> Update File<\/b><span style=\"font-weight: 400;\"> to save your changes<\/span><span style=\"font-weight: 400;\">.<\/span><\/li>\n<\/ol>\n<h2><span style=\"font-weight: 400;\">Best practices when learning how to edit code in WordPress<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Editing code in WordPress can enhance your site\u2019s functionality and personalize its design, but it requires a careful approach to avoid potential issues. Here are some best practices to follow when learning to edit code in WordPress:<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">1. Backup your site before saving <\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Always ensure you have a recent backup of your entire WordPress site, including your database. This allows you to restore your site to its previous state if something goes wrong after your edits.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">2. Use a staging environment<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Instead of making changes directly on your live site, use a staging environment. This is a clone of your live site where you can test changes without affecting your actual website. It helps catch errors before they impact your visitors.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">3. Always test your codes<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">After making changes, thoroughly test your site to ensure there are no issues. Check the functionality affected by the changes, and also look for unintended side effects elsewhere on your site.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">4. Documentation<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Keep detailed notes on the changes you make, including what was changed, why, and when. This documentation will be invaluable if you need to revisit your edits in the future or if another developer needs to understand your modifications.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">5. Follow WordPress coding standards<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">WordPress has specific coding standards for HTML, CSS, PHP, JavaScript, and accessibility. Adhering to these standards ensures that your code is clean, readable, and consistent with WordPress core, which makes maintenance and updates easier.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">6. Keep your changes minimal<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Only change what is necessary. Smaller, more focused changes are easier to manage, troubleshoot, and understand. This approach helps reduce the risk of introducing bugs.<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Conclusion<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">In conclusion, editing code in WordPress is a valuable skill for beginners looking to customize their websites beyond the basics. By understanding the fundamental principles of accessing and modifying PHP and CSS files, users can significantly enhance their site&#8217;s functionality and aesthetic appeal. It&#8217;s important to approach this process with caution, ensuring backups are made to prevent any disruptions.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> With practice, beginners will not only improve their coding skills but also gain the confidence to take full control of their WordPress site&#8217;s design and operations.<\/span><\/p>\n<p>\r\n<style>\r\n  #ctablocks_scrollbox-with-icon_91{\r\n            color: #ffffff;\r\n    border-radius: 6px;\r\n  }\r\n\r\n  #ctablocks_scrollbox-with-icon_91 p{\r\n    color: #ffffff;\r\n  }\r\n  #ctablocks_scrollbox-with-icon_91 .button{\r\n          background-color: rgb(51,57,241);\r\n        color: #ffffff;\r\n    border-color: #3339f1 !important;\r\n  }\r\n  #ctablocks_scrollbox-with-icon_91 .button:hover{\r\n    background: rgba(51,57,241,0.8);\r\n    color: #ffffff;\r\n    opacity: 1;\r\n  }\r\n  #ctablocks_scrollbox-with-icon_91.ctablocks_container {\r\n    left: 100%;\r\n  }\r\n  @media screen and (max-width: 1300px) {\r\n      #ctablocks_scrollbox-with-icon_91.ctablocks_container {\r\n          left: 0;\r\n          margin: 0 auto;\r\n      }\r\n  }\r\n  #ctablocks_scrollbox-with-icon_91 .ctablocks_content {\r\n      background-color: #000000;\r\n  }\r\n<\/style>\r\n<div id=\"ctablocks_scrollbox-with-icon_91\" class=\"ctablocks_container scrollbox-with-icon_type\r\n      \">\r\n\r\n  <div class=\"ctablocks_content clear\">\r\n    <div class=\"ctablocks_content_info\">\r\n              <h4>Simplify WordPress with 10Web<\/h4>\r\n        <h4 class=\"mobile-title\">Simplify WordPress with 10Web<\/h4>\r\n              <p>Skip and automate manual work with 10Web Managed WordPress Hosting and the 10Web AI Website Builder.<\/p>\r\n          <\/div>\r\n    <div class=\"ctablocks_content_button\">\r\n              <a href=\"https:\/\/10web.io\/ai-website-builder\/\" class=\"button\" data-gtag=\"sign-up-blog\" data-buttontype=\"sign-up\" data-gtag=\"cta-91\" data-buttontype=\"cta-scrollbox-with-icon\"\r\n\t        >Learn How<\/a>\r\n            \r\n    <\/div>\r\n  <\/div>\r\n    <span class=\"close_ctablocks\">\r\n      <img decoding=\"async\" class=\"close-icon\" src=\"https:\/\/10web.io\/blog\/wp-content\/plugins\/cta-blocks\/assets\/images\/close_w.svg\" class=\"close\">\r\n      <img decoding=\"async\" class=\"floating-icon\" src=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/Info-icon_Blog.png\" alt=\"Simplify WordPress with 10Web\" title=\"Simplify WordPress with 10Web\">\r\n<!--      <img decoding=\"async\" class=\"arrow-icon white\" src=\"\/cta-blocks\/assets\/images\/arrow-icon.svg\" class=\"close\">\r\n-->      <img decoding=\"async\" class=\"arrow-icon purple\" src=\"https:\/\/10web.io\/blog\/wp-content\/plugins\/cta-blocks\/assets\/images\/arrow-icon-purple.svg\" class=\"close\">\r\n  <\/span>\r\n<\/div>\r\n<br \/>\n <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Editing code in WordPress might seem difficult for beginners, but it&#8217;s a crucial skill for customizing your website to fit your unique needs. This guide will walk you through the basics of navigating the WordPress editor, making changes to HTML, CSS, and PHP, and ensuring your edits are safe and effective. Whether you want to improve the design, add custom&#8230;<\/p>\n","protected":false},"author":11,"featured_media":34935,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"two_page_speed":[],"footnotes":"","tenweb_blog_toc":"<ul><li><a href=\"#faq\">FAQ<\/a><li><a href=\"#why-editing-code-in-wordpress-is-essential\">Why editing code in WordPress is essential<\/a><li><a href=\"#what-can-be-edited-in-your-wordpress-site\">What can be Edited in your WordPress Site?<\/a><ul><li><a href=\"#1-html\">1. HTML<\/a><li><a href=\"#2-css\">2. CSS<\/a><li><a href=\"#3-php-hypertext-preprocessor\">3. PHP (Hypertext Preprocessor):<\/a><\/li><\/ul><li><a href=\"#how-to-edit-code-in-wordpress\">How to edit code in WordPress<\/a><ul><li><a href=\"#method-1-edit-wordpress-html-in-block-editor\">Method 1: Edit WordPress HTML in block editor<\/a><li><a href=\"#method-2-edit-wordpress-html-in-classic-editor\">Method 2: Edit WordPress HTML in classic editor<\/a><li><a href=\"#method-3-edit-wordpress-html-in-widgets\">Method 3: Edit WordPress HTML in widgets<\/a><\/li><\/ul><li><a href=\"#how-to-edit-the-source-code-in-your-wordpress-theme\">How to edit the source code in your WordPress theme<\/a><ul><li><a href=\"#method-1-use-child-theme\">Method 1: Use child theme<\/a><li><a href=\"#method-2-use-plugins\">Method 2: Use plugins<\/a><li><a href=\"#method-3-use-the-dashboard-wordpress-code-editor\">Method 3: Use the Dashboard WordPress code editor<\/a><\/li><\/ul><li><a href=\"#best-practices-when-learning-how-to-edit-code-in-wordpress\">Best practices when learning how to edit code in WordPress<\/a><ul><li><a href=\"#1-backup-your-site-before-saving\">1. Backup your site before saving <\/a><li><a href=\"#2-use-a-staging-environment\">2. Use a staging environment<\/a><li><a href=\"#3-always-test-your-codes\">3. Always test your codes<\/a><li><a href=\"#4-documentation\">4. Documentation<\/a><li><a href=\"#5-follow-wordpress-coding-standards\">5. Follow WordPress coding standards<\/a><li><a href=\"#6-keep-your-changes-minimal\">6. Keep your changes minimal<\/a><\/li><\/ul><li><a href=\"#conclusion\">Conclusion<\/a><\/li><\/ul>","tenweb_blog_competitor_type":"","tenweb_blog_competitor_names":"","tenweb_blog_twb_version":0,"tenweb_blog_type":""},"categories":[463],"tags":[],"class_list":["post-35941","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.0 (Yoast SEO v23.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Edit Code in WordPress: A Beginners Guide - 10Web<\/title>\n<meta name=\"description\" content=\"Learn how to edit code in WordPress easily with our beginner-friendly guide. Start enhancing your website today!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Edit Code in WordPress: A Beginners Guide\" \/>\n<meta property=\"og:description\" content=\"Learn how to edit code in WordPress easily with our beginner-friendly guide. Start enhancing your website today!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"10Web - Build &amp; Host Your WordPress Website\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/10Web.io\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-16T10:39:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-24T11:31:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/edit_code_in_wordpress.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1569\" \/>\n\t<meta property=\"og:image:height\" content=\"880\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Tigran Nazaryan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@10Web_io\" \/>\n<meta name=\"twitter:site\" content=\"@10Web_io\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tigran Nazaryan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Edit Code in WordPress: A Beginners Guide - 10Web","description":"Learn how to edit code in WordPress easily with our beginner-friendly guide. Start enhancing your website today!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"How to Edit Code in WordPress: A Beginners Guide","og_description":"Learn how to edit code in WordPress easily with our beginner-friendly guide. Start enhancing your website today!","og_url":"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/","og_site_name":"10Web - Build &amp; Host Your WordPress Website","article_publisher":"https:\/\/www.facebook.com\/10Web.io\/","article_published_time":"2024-04-16T10:39:19+00:00","article_modified_time":"2024-04-24T11:31:51+00:00","og_image":[{"width":1569,"height":880,"url":"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/edit_code_in_wordpress.jpg","type":"image\/jpeg"}],"author":"Tigran Nazaryan","twitter_card":"summary_large_image","twitter_creator":"@10Web_io","twitter_site":"@10Web_io","twitter_misc":{"Written by":"Tigran Nazaryan","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/#article","isPartOf":{"@id":"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/"},"author":{"name":"Tigran Nazaryan","@id":"https:\/\/10web.io\/blog\/#\/schema\/person\/9466e64f67fc213397b384bbe3af3bd0"},"headline":"How to Edit Code in WordPress: A Beginners Guide","datePublished":"2024-04-16T10:39:19+00:00","dateModified":"2024-04-24T11:31:51+00:00","mainEntityOfPage":{"@id":"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/"},"wordCount":1815,"commentCount":0,"publisher":{"@id":"https:\/\/10web.io\/blog\/#organization"},"image":{"@id":"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/edit_code_in_wordpress.jpg","articleSection":["Guides"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/","url":"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/","name":"How to Edit Code in WordPress: A Beginners Guide - 10Web","isPartOf":{"@id":"https:\/\/10web.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/edit_code_in_wordpress.jpg","datePublished":"2024-04-16T10:39:19+00:00","dateModified":"2024-04-24T11:31:51+00:00","description":"Learn how to edit code in WordPress easily with our beginner-friendly guide. Start enhancing your website today!","breadcrumb":{"@id":"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/#primaryimage","url":"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/edit_code_in_wordpress.jpg","contentUrl":"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2024\/04\/edit_code_in_wordpress.jpg","width":1569,"height":880},{"@type":"BreadcrumbList","@id":"https:\/\/10web.io\/blog\/how-to-edit-code-in-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/10web.io\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Edit Code in WordPress: A Beginners Guide"}]},{"@type":"WebSite","@id":"https:\/\/10web.io\/blog\/#website","url":"https:\/\/10web.io\/blog\/","name":"10Web Blog - Build & Host Your WordPress Website","description":"10Web is an All-in-One Website Building Platform, offering Managed WordPress Hosting on Google Cloud, Beautiful Templates, Premium Plugins and Services.","publisher":{"@id":"https:\/\/10web.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/10web.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/10web.io\/blog\/#organization","name":"10Web","url":"https:\/\/10web.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/10web.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2025\/04\/Logo-768x686-1.png","contentUrl":"https:\/\/10web.io\/blog\/wp-content\/uploads\/sites\/2\/2025\/04\/Logo-768x686-1.png","width":768,"height":686,"caption":"10Web"},"image":{"@id":"https:\/\/10web.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/10Web.io\/","https:\/\/x.com\/10Web_io","https:\/\/www.instagram.com\/10web.io\/","https:\/\/www.linkedin.com\/company\/10web\/mycompany\/","https:\/\/www.youtube.com\/c\/10Web"]},{"@type":"Person","@id":"https:\/\/10web.io\/blog\/#\/schema\/person\/9466e64f67fc213397b384bbe3af3bd0","name":"Tigran Nazaryan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/10web.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ce2393558e7591a237212f11acac58fb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ce2393558e7591a237212f11acac58fb?s=96&d=mm&r=g","caption":"Tigran Nazaryan"},"description":"Tigran Nazaryan is an experienced science and technology professional. After seeing great potential in the automation of web development, he co-founded and became CInO of 10Web. Tigran is passionate about creating solutions to bring AI automation into web development and turning great ideas into powerful technological achievements.","sameAs":["https:\/\/www.linkedin.com\/in\/tnazaryan\/"],"url":"https:\/\/10web.io\/blog\/author\/tigran\/"}]}},"acf":[],"_links":{"self":[{"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/posts\/35941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/comments?post=35941"}],"version-history":[{"count":0,"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/posts\/35941\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/media\/34935"}],"wp:attachment":[{"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/media?parent=35941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/categories?post=35941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/10web.io\/blog\/wp-json\/wp\/v2\/tags?post=35941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}