{"id":44985,"date":"2021-09-20T16:35:18","date_gmt":"2021-09-20T13:35:18","guid":{"rendered":"https:\/\/themeisle.com\/blog\/?p=44985"},"modified":"2024-01-31T02:58:15","modified_gmt":"2024-01-31T00:58:15","slug":"php-in-wordpress","status":"publish","type":"post","link":"https:\/\/themeisle.com\/blog\/php-in-wordpress\/","title":{"rendered":"How to Add PHP in WordPress: 4 Easy Methods"},"content":{"rendered":"\n<p>PHP powers 78.8% of websites and is crucial for WordPress customization. This straightforward guide explains PHP basics and shows four easy ways to add or edit PHP in WordPress, enhancing your site&rsquo;s functionality.<\/p>\n\n\n\n<!--more-->\n\n\n\n<div class=\"wp-block-group keyt\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>Key Takeaways<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A basic grasp of PHP is essential if you want to implement significant changes or add new code to your WordPress site.<\/li>\n\n\n\n<li>Using plugins is a hassle-free way to incorporate PHP code into WordPress without needing to edit files directly.<\/li>\n\n\n\n<li>Editing PHP files manually through a child theme or FTP is best for those seeking the utmost customization and control.<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n    \r\n    <style>\r\n        :root {\r\n        --jtoc-progress-bar-color: #4267cf;\n        }\r\n                    .wpj-jtoc.--jtoc-theme-none.--jtoc-has-custom-styles {\r\n        --jtoc-width: 100%;\n--jtoc-toc-padding: 24px;\n--jtoc-toc-border: 1px solid;\n--jtoc-toc-border-color: #dedede;\n--jtoc-background-color: #f6f7f9;\n--jtoc-header-height: 20px;\n--jtoc-header-margin: 0;\n--jtoc-header-padding: 0;\n--jtoc-title-color: #393939;\n--jtoc-title-font-size: 1.2em;\n--jtoc-title-label-font-weight: 400;\n--jtoc-body-margin: 16px 0 0 0;\n--jtoc-body-padding: 0;\n--jtoc-headings-margin: 10px 0 0 0;\n--jtoc-link-font-size: 1em;\n--jtoc-link-font-weight: 400;\n--jtoc-link-color: #848484;\n--jtoc-link-color-hover: #4a66c8;\n--jtoc-link-color-active: #4a66c8;\n        }\r\n        .--jtoc-the-content{\r\ndisplay:none;\r\n}\r\n.--jtoc-is-active>.wpj-jtoc--item-content>a:before{\r\nmargin-left:3px;\r\n}\r\n.wpj-jtoc--nav>.wpj-jtoc--items li a::before{\r\ncontent:'\\203A';\r\ndisplay:block;\r\nfloat:left;\r\nheight:100%;\r\nfont-weight:700;\r\ncolor:#4267CF;\r\nline-height: 20px;\r\nmargin-right: 3px;\r\n}\r\n.sidebar .wpj-jtoc--toc{\r\nborder:0;\r\npadding:0;\r\n}\r\n.sidebar .wpj-jtoc--header,\r\n.sidebar .wpj-jtoc--body{\r\nbackground:transparent;\r\n}\r\n\r\n.sidebar .--jtoc-is-active>.wpj-jtoc--item-content>a{\r\ntext-decoration:none;\r\n}\r\n.sidebar-left .widget-first{\r\nposition:sticky;\r\ntop:70px;\r\nmargin-bottom:1250px;\r\n}\r\n.sidebar-left{\r\ndisplay:none;\r\nmax-width:300px;\r\nposition:absolute;\r\nleft:-330px;\r\ntop:0;\r\nheight:100%;\r\n}\r\n@media only screen and (max-width: 1900px) {\r\n.single-post .sidebar-left{\r\ndisplay:none !important;\r\n}\r\n.--jtoc-the-content{\r\ndisplay:block;\r\n}\r\n@media only screen and (max-width: 400px) {\r\n.wpj-jtoc--item .wpj-jtoc--item-content{\r\nmargin-top:5px;\r\n}\r\n.wpj-jtoc--header-main .wpj-jtoc--title{\r\nfont-size:1.1em;\r\n}\r\n}    <\/style>\r\n\r\n\r\n    <!-- jtoc progress bar widget -->\r\n    <div class=\"wpj-jtoc--widget-progress --progress-top\">\r\n        <div class=\"wpj-jtoc--widget-progress-bar\"><\/div>\r\n    <\/div>\r\n\r\n<div id=\"wpj-jtoc\" class=\"wpj-jtoc wpj-jtoc--main --jtoc-the-content --jtoc-theme-none --jtoc-title-align-left --jtoc-toggle-icon --jtoc-toggle-position-right --jtoc-toggle-1 --jtoc-header-as-toggle --jtoc-headings-full-row-clickable --jtoc-floating-toc-top --jtoc-floating-has-shadow --jtoc-has-custom-styles --jtoc-is-unfolded\" >\r\n            \r\n    <!-- TOC -->\r\n    <div class=\"wpj-jtoc--toc \">\r\n                            <div class=\"wpj-jtoc--header\">\r\n                <div class=\"wpj-jtoc--header-main\">\r\n                                        <div class=\"wpj-jtoc--title\">\r\n                        <!-- <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-columns-3\"><rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\"\/><path d=\"M9 3v18\"\/><path d=\"M15 3v18\"\/><\/svg> -->\r\n                        <span class=\"wpj-jtoc--title-label\">Table of contents<\/span>\r\n                    <\/div>\r\n                                                        <\/div>\r\n            <\/div>\r\n                                <div class=\"wpj-jtoc--body\">\r\n                        <nav class=\"wpj-jtoc--nav\">\r\n                <ol class=\"wpj-jtoc--items\"><li class=\"wpj-jtoc--item --jtoc-h2\">\r\n        <div class=\"wpj-jtoc--item-content\" data-depth=\"2\">\r\n                        <a href=\"#intro\" title=\"An introduction to PHP in WordPress\" data-numeration=\"1\" >An introduction to PHP in WordPress<\/a>\r\n                    <\/div> <\/li><li class=\"wpj-jtoc--item --jtoc-h2\">\r\n        <div class=\"wpj-jtoc--item-content\" data-depth=\"2\">\r\n                        <a href=\"#easy-methods\" title=\"Easy methods to add PHP in WordPress\" data-numeration=\"2\" >Easy methods to add PHP in WordPress<\/a>\r\n                    <\/div> <ol class=\"wpj-jtoc--items\"><li class=\"wpj-jtoc--item --jtoc-h3\">\r\n        <div class=\"wpj-jtoc--item-content\" data-depth=\"3\">\r\n                        <a href=\"#shortcodes\" title=\"1. Convert PHP into WordPress shortcodes\" data-numeration=\"2.1\" >1. Convert PHP into WordPress shortcodes<\/a>\r\n                    <\/div> <\/li><li class=\"wpj-jtoc--item --jtoc-h3\">\r\n        <div class=\"wpj-jtoc--item-content\" data-depth=\"3\">\r\n                        <a href=\"#plugin\" title=\"2. Add sitewide code snippets with a plugin\" data-numeration=\"2.2\" >2. Add sitewide code snippets with a plugin<\/a>\r\n                    <\/div> <\/li><li class=\"wpj-jtoc--item --jtoc-h3\">\r\n        <div class=\"wpj-jtoc--item-content\" data-depth=\"3\">\r\n                        <a href=\"#child-theme\" title=\"3. Customize your child theme in WordPress\" data-numeration=\"2.3\" >3. Customize your child theme in WordPress<\/a>\r\n                    <\/div> <\/li><li class=\"wpj-jtoc--item --jtoc-h3\">\r\n        <div class=\"wpj-jtoc--item-content\" data-depth=\"3\">\r\n                        <a href=\"#ftp-client\" title=\"4. Use an FTP client to edit PHP files manually\" data-numeration=\"2.4\" >4. Use an FTP client to edit PHP files manually<\/a>\r\n                    <\/div> <\/li><\/ol><\/li><\/ol>            <\/nav>\r\n                                                        <\/div>\r\n            <\/div>\r\n<\/div>\r\n\n\n\n\t\t<div class=\"ti-tweet-clear\"><\/div>\n\t\t\t<div class=\"ti-tweet_wrapper\">\n\t\t    \t<div class=\"ti-tweet_text\">\n\t\t    \t\t<a href=\"https:\/\/twitter.com\/share?text=How+to+add+%23PHP+in+%23WordPress%3F+4+easy+methods+for+every+%23website+%F0%9F%90%98&amp;via=themeisle&amp;related=themeisle&amp;url=https:\/\/themeisle.com\/blog\/php-in-wordpress\/\" target=\"_blank\" rel=\"nofollow\">How to add #PHP in #WordPress? 4 easy methods for every #website &#128024;<\/a>\n\t\t    \t<\/div>\n\t\t    \t<div class=\"ti-tweet_sharebtn\">\n\t\t    \t<a href=\"https:\/\/twitter.com\/share?text=How+to+add+%23PHP+in+%23WordPress%3F+4+easy+methods+for+every+%23website+%F0%9F%90%98&amp;via=themeisle&amp;related=themeisle&amp;url=https:\/\/themeisle.com\/blog\/php-in-wordpress\/\" target=\"_blank\" rel=\"nofollow\">Click To Tweet \n\t\t    \t\t<span><\/span>\n\t\t    \t<\/a>\n\t\t    <\/div>\n\t\t<\/div>\n\n\n<div class=\"su-divider su-divider-style-dotted\" style=\"margin:40px 0;border-width:1px;border-color:#999999\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"intro\">An introduction to PHP in WordPress<\/h2>\n\n\n\n<p><a href=\"https:\/\/themeisle.com\/blog\/php\/\" target=\"_blank\" rel=\"noopener\">PHP is a &lsquo;general purpose&rsquo; programming language<\/a> that is popular in website development. More importantly, <a href=\"https:\/\/themeisle.com\/blog\/update-wordpress-php-version\/\">WordPress is built using PHP<\/a>. That makes it essential to have a basic understanding of how PHP works if you want to make big changes to the content management system (CMS) or to add new code to your site.<\/p>\n\n\n\n<p>You don&rsquo;t need to be a programmer to edit or add PHP in WordPress. Depending on what you want to do, it&rsquo;s easy to find plenty of tutorials that will guide you through the entire process, and even provide code snippets you can use. For example, we have a full article that walks you through several changes you can <a href=\"https:\/\/themeisle.com\/blog\/wordpress-functions-php-guide\/\">make to the <em>functions.php <\/em>file<\/a>.<\/p>\n\n\n<div class=\"su-divider su-divider-style-dotted\" style=\"margin:40px 0;border-width:1px;border-color:#999999\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"easy-methods\">Easy methods to add PHP in WordPress<\/h2>\n\n\n\n<p>If you&rsquo;re not comfortable working with code, it can seem intimidating to edit WordPress and PHP files. However, WordPress offers several ways to add PHP code to your website, ranging from plugins to the manual approach. As long as you <a href=\"https:\/\/themeisle.com\/blog\/backup-a-wordpress-site-for-free\/\">back up your website<\/a> before making any big changes or <a href=\"https:\/\/themeisle.com\/blog\/wordpress-staging-site\/\">use a staging site<\/a>, you should feel free to experiment as needed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"shortcodes\">1. Convert PHP into WordPress shortcodes<\/h3>\n\n\n\n<p>As usual, plugins offer the simplest approach for solving a specific problem in WordPress. There are several plugins you can use to add custom code to your WordPress files without having to edit them directly.<\/p>\n\n\n\n<p>One option is to turn your PHP code snippets <a href=\"https:\/\/themeisle.com\/blog\/what-are-shortcodes-in-wordpress\/\">into shortcodes<\/a> that you can easily use in the WordPress editor or <a href=\"https:\/\/themeisle.com\/blog\/wordpress-widget-editor\/\">widget areas<\/a>. This is useful if you&rsquo;re looking to add PHP to a specific post or page on your site.<\/p>\n\n\n\n<p>To do this, you can use the free Insert PHP Code Snippet plugin:<\/p>\n\n\n<div class=\"wp-pic-wrapper align-center large\" style=\"margin:20px 0;\"><div class=\"wp-pic large plugin wp-pic-ajax scheme2\" id=\"wp-pic-insert-php-code-snippet\" data-type=\"plugin\" data-slug=\"insert-php-code-snippet\" data-image=\"\" data-expiration=\"\" data-layout=\"large\" data-slugs=\"[]\"><div class=\"wp-pic-body-loading\"><div class=\"signal\"><\/div><\/div><\/div><\/div><!-- .wp-pic-wrapper--><link rel=\"stylesheet\" id=\"dashicons-css\" href=\"https:\/\/themeisle.com\/blog\/wp-includes\/css\/dashicons.min.css?ver=6.8.5\" type=\"text\/css\" media=\"all\">\n<link rel=\"stylesheet\" id=\"wppic-style-css\" href=\"https:\/\/themeisle.com\/blog\/wp-content\/plugins\/wp-plugin-info-card\/dist\/wppic-styles.css?ver=6.1.1\" type=\"text\/css\" media=\"all\">\n<script type=\"text\/javascript\" src=\"https:\/\/themeisle.com\/blog\/wp-includes\/js\/jquery\/jquery.min.js?ver=3.7.1\" id=\"jquery-core-js\"><\/script>\n<script type=\"text\/javascript\" src=\"https:\/\/themeisle.com\/blog\/wp-includes\/js\/jquery\/jquery-migrate.min.js?ver=3.4.1\" id=\"jquery-migrate-js\"><\/script>\n<script type=\"text\/javascript\" id=\"wppic-script-js-extra\">\n\/* <![CDATA[ *\/\nvar wppicAjax = {\"ajaxurl\":\"https:\\\/\\\/themeisle.com\\\/blog\\\/wp-admin\\\/admin-ajax.php\"};\n\/* ]]> *\/\n<\/script>\n<script type=\"text\/javascript\" src=\"https:\/\/themeisle.com\/blog\/wp-content\/plugins\/wp-plugin-info-card\/assets\/js\/wppic-script.min.js?ver=6.1.1\" id=\"wppic-script-js\"><\/script>\n\n\n\n\n<p>With this plugin, you&rsquo;ll be able to create custom shortcodes for PHP code snippets. You add can these snippets using the plugin, and it will generate shortcodes that you can use anywhere on your website to run those functions.<\/p>\n\n\n\n<p>After you install and activate the plugin, you&rsquo;ll see a new tab in the dashboard labeled <em>XYZ PHP Code<\/em>. Select that tab and go to <em>PHPCode Snippets &rarr; Add New PHP Code Snippet<\/em>:<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=947672948  fetchpriority=\"high\" decoding=\"async\" width=\"1401\" height=\"513\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/new-php-code-snippet.png\" alt=\"Adding a new PHP code snippet\" class=\"wp-image-44988\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1401\/h:513\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/new-php-code-snippet.png 1401w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:110\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/new-php-code-snippet.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:375\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/new-php-code-snippet.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:281\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/new-php-code-snippet.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:18\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/new-php-code-snippet.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:176\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/new-php-code-snippet.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:291\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/new-php-code-snippet.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1200\/h:439\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/new-php-code-snippet.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:108\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/new-php-code-snippet.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:143\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/new-php-code-snippet.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:99\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/new-php-code-snippet.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1401\/h:513\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/new-php-code-snippet.png 2x\" sizes=\"(max-width: 700px) 100vw, 700px\"><\/figure><\/div>\n\n\n<p>The plugin will ask you to set a &ldquo;name&rdquo; for your snippet, which should describe its purpose and to add its code within the <em>PHP code <\/em>field:<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=1527849753  fetchpriority=\"high\" decoding=\"async\" width=\"1403\" height=\"483\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/php-code-example.png\" alt=\"An example of a PHP snippet\" class=\"wp-image-44989\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1403\/h:483\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/php-code-example.png 1403w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:103\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/php-code-example.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:353\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/php-code-example.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:264\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/php-code-example.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:17\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/php-code-example.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:165\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/php-code-example.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:273\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/php-code-example.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1200\/h:413\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/php-code-example.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:102\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/php-code-example.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:134\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/php-code-example.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:93\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/php-code-example.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1403\/h:483\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/php-code-example.png 2x\" sizes=\"(max-width: 700px) 100vw, 700px\"><\/figure><\/div>\n\n\n<p>Keep in mind that Insert PHP Code Snippet doesn&rsquo;t validate the code you add. If the code doesn&rsquo;t work, you&rsquo;ll need to troubleshoot it on your own.<\/p>\n\n\n\n<p>Once you add a code snippet using the plugin, it will appear under the <em>PHPCode Snippets <\/em>tab. You have options for pausing individual scripts, as well as editing, deleting, and previewing them:<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=2065340778  fetchpriority=\"high\" decoding=\"async\" width=\"2362\" height=\"704\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png\" alt=\"Editing PHP\" class=\"wp-image-44990\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1920\/h:572\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png 2362w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:89\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:305\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:229\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1536\/h:458\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png 1536w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1920\/h:571\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png 2048w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:15\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:143\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:237\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1200\/h:358\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:88\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:116\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:80\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1920\/h:572\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/editing-php-code.png 2x\" sizes=\"(max-width: 700px) 100vw, 700px\"><\/figure><\/div>\n\n\n<p>The shortcode for placing the snippet is available under the <em>Snippet Short Code <\/em>column. Once you preview the code to make sure it works, you can go ahead and add the shortcode anywhere on your site.<\/p>\n\n\n<div class=\"su-divider su-divider-style-default\" style=\"margin:40px 0;border-width:15px;border-color:#4267cf\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"plugin\">2. Add sitewide code snippets with a plugin<\/h3>\n\n\n\n<p>Another plugin that can help you add PHP in WordPress is the free Code Snippets plugin.<\/p>\n\n\n<div class=\"wp-pic-wrapper align-center large\" style=\"margin:20px 0;\"><div class=\"wp-pic large plugin wp-pic-ajax scheme2\" id=\"wp-pic-code-snippets\" data-type=\"plugin\" data-slug=\"code-snippets\" data-image=\"\" data-expiration=\"\" data-layout=\"large\" data-slugs=\"[]\"><div class=\"wp-pic-body-loading\"><div class=\"signal\"><\/div><\/div><\/div><\/div><!-- .wp-pic-wrapper-->\n\n\n\n<p>With this plugin, you can easily add general code snippets to your site by going to <em>Code Snippets &rarr; Add New<\/em>. When you add your PHP code snippet, you can choose between running it everywhere or only on the frontend or backend of your site:<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=490720916  data-opt-src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg\"  decoding=\"async\" width=\"2054\" height=\"1781\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:eco\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg\" alt=\"Adding PHP with the free Code Snippets plugin\" class=\"wp-image-45023\" old-srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1245\/h:1080\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 2054w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:260\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:888\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:666\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1245\/h:1080\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 1536w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1245\/h:1080\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 2048w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:43\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:277\/h:240\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 277w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:458\/h:397\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 458w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:692\/h:600\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 692w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:171\/h:148\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 171w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:225\/h:195\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 225w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:156\/h:135\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 156w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1245\/h:1080\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 2x\"><noscript><img data-opt-id=490720916  decoding=\"async\" width=\"2054\" height=\"1781\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg\" alt=\"Adding PHP with the free Code Snippets plugin\" class=\"wp-image-45023\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1245\/h:1080\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 2054w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:260\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:888\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:666\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1245\/h:1080\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 1536w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1245\/h:1080\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 2048w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:43\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:277\/h:240\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 277w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:458\/h:397\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 458w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:692\/h:600\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 692w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:171\/h:148\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 171w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:225\/h:195\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 225w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:156\/h:135\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 156w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1245\/h:1080\/q:mauto\/f:best\/dpr:2\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/code-snippets-plugin.jpg 2x\" sizes=\"(max-width: 700px) 100vw, 700px\"></noscript><\/figure><\/div>\n\n\n<p>In addition to adding PHP code to WordPress, the plugin can also help you <a href=\"https:\/\/themeisle.com\/blog\/wordpress-custom-javascript\/\">add custom JavaScript<\/a>, CSS or HTML.<\/p>\n\n\n<div class=\"su-divider su-divider-style-default\" style=\"margin:40px 0;border-width:15px;border-color:#4267cf\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"child-theme\">3. Customize your child theme in WordPress<\/h3>\n\n\n\n<p>WordPress comes with a tool called <em>Theme Editor <\/em>that enables you to edit your theme files directly from the dashboard. Ideally, you&rsquo;ll do this while <a href=\"https:\/\/themeisle.com\/blog\/wordpress-child-themes\/\">using a child theme<\/a>, so you don&rsquo;t lose any modifications that you make when you update the parent theme.<\/p>\n\n\n\n<p>To access the theme editor, go to <em>Appearance &rarr; Theme Editor<\/em>. You&rsquo;ll see a simple text editor to the left and a list of files to the right:<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=754054310  data-opt-src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png\"  decoding=\"async\" width=\"2187\" height=\"716\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:eco\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png\" alt=\"WordPress theme editor\" class=\"wp-image-44991\" old-srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1920\/h:628\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 2187w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:98\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:335\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:251\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1536\/h:503\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 1536w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1920\/h:628\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 2048w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:16\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:157\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:260\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1200\/h:393\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:97\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:128\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:88\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1920\/h:628\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 2x\"><noscript><img data-opt-id=754054310  decoding=\"async\" width=\"2187\" height=\"716\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png\" alt=\"WordPress theme editor\" class=\"wp-image-44991\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1920\/h:628\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 2187w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:98\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:335\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:251\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1536\/h:503\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 1536w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1920\/h:628\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 2048w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:16\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:157\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:260\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1200\/h:393\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:97\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:128\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:88\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1920\/h:628\/q:mauto\/f:best\/dpr:2\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-editor.png 2x\" sizes=\"(max-width: 700px) 100vw, 700px\"></noscript><\/figure><\/div>\n\n\n<p>The <em>Theme Files <\/em>list gives you direct access to all of your theme&rsquo;s customizable files. Beneath each entry, you&rsquo;ll also see its full filename. Most of the options here will be PHP files.<\/p>\n\n\n\n<p>You can switch which theme you&rsquo;re editing using the <em>Select theme to edit <\/em>drop-down menu. Moreover, you can look up documentation for specific functions using the <em>Documentation <\/em>drop-down menu beneath the editor:<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=208384529  data-opt-src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png\"  decoding=\"async\" width=\"2033\" height=\"756\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:eco\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png\" alt=\"The theme editor\" class=\"wp-image-44992\" old-srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1920\/h:713\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 2033w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:112\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:381\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:286\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1536\/h:571\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 1536w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:19\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:178\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:295\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1200\/h:446\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:110\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:145\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:100\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1920\/h:713\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 2x\"><noscript><img data-opt-id=208384529  decoding=\"async\" width=\"2033\" height=\"756\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png\" alt=\"The theme editor\" class=\"wp-image-44992\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1920\/h:713\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 2033w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:112\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:381\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:286\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1536\/h:571\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 1536w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:19\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:178\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:295\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1200\/h:446\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:110\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:145\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:100\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1920\/h:713\/q:mauto\/f:best\/dpr:2\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/theme-documentation.png 2x\" sizes=\"(max-width: 700px) 100vw, 700px\"></noscript><\/figure><\/div>\n\n\n<p>Looking up a function will send you to its WordPress Development Codex page (if there&rsquo;s one available). Keep in mind that if you&rsquo;re editing a custom theme, you might not be able to find documentation for specific functions. Once you make the changes you want, you can click on <em>Update File <\/em>to save them. <\/p>\n\n\n\n<p>If you&rsquo;re specifically looking to add code snippets to your site, you&rsquo;ll likely want to edit the <em>functions.php<\/em> file.<\/p>\n\n\n<div class=\"su-divider su-divider-style-default\" style=\"margin:40px 0;border-width:15px;border-color:#4267cf\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"ftp-client\">4. Use an FTP client to edit PHP files manually<\/h3>\n\n\n\n<p>The main downside of using the WordPress <em>Theme Editor <\/em>is that the editor itself is very barebones. If you&rsquo;ve ever used a full code editor, then you know you&rsquo;re missing out on a lot of functionality by modifying files from your dashboard.<\/p>\n\n\n\n<p>A better alternative is to access your website&rsquo;s files via FTP and use your favorite text editor to update them. To do so, you&rsquo;ll need an FTP client <a href=\"https:\/\/themeisle.com\/blog\/what-is-ftp-wordpress\/\">such as FileZilla<\/a>. <\/p>\n\n\n\n<p>If this is your first time using an FTP client, you&rsquo;ll need to look up your website&rsquo;s login details. Your FTP credentials are <em>not <\/em>the same as the ones you use for logging into WordPress.<\/p>\n\n\n\n<p>Traditionally, your web host will create an FTP account for your when you sign up for a plan. That account&rsquo;s details should be accessible in your hosting control panel:<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=1350354894  data-opt-src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png\"  decoding=\"async\" width=\"1771\" height=\"555\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:eco\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png\" alt=\"Accessing your FTP credentials\" class=\"wp-image-44995\" old-srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1771\/h:555\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 1771w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:94\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:321\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:241\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1536\/h:481\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 1536w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:16\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:150\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:249\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1200\/h:376\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:93\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:122\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:85\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1771\/h:555\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 2x\"><noscript><img data-opt-id=1350354894  decoding=\"async\" width=\"1771\" height=\"555\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png\" alt=\"Accessing your FTP credentials\" class=\"wp-image-44995\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1771\/h:555\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 1771w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:94\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:321\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:241\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1536\/h:481\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 1536w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:16\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:150\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:249\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1200\/h:376\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:93\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:122\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:85\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1771\/h:555\/q:mauto\/f:best\/dpr:2\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/ftp-credentials.png 2x\" sizes=\"(max-width: 700px) 100vw, 700px\"></noscript><\/figure><\/div>\n\n\n<p>To <a href=\"https:\/\/themeisle.com\/blog\/what-is-ftp-wordpress\/\">connect to your website via FTP<\/a> you&rsquo;ll need the host address, your FTP username and password, and specific port details (if they&rsquo;re available). Once you have that information, you can connect to your website using FileZilla or any other FTP client.<\/p>\n\n\n\n<p>After accessing your website, you&rsquo;ll need to find the WordPress <em>root <\/em>folder, which contains all of your site&rsquo;s files. Usually, that folder is called <em>public<\/em> or <em>public_html, <\/em>or is named after your website:<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=671966567  data-opt-src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png\"  decoding=\"async\" width=\"1400\" height=\"811\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:eco\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png\" alt=\"Accessing your WordPress directory\" class=\"wp-image-45011\" old-srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1400\/h:811\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 1400w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:174\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:593\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:445\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:29\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:414\/h:240\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 414w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:685\/h:397\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 685w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1036\/h:600\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 1036w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:255\/h:148\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 255w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:337\/h:195\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 337w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:233\/h:135\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 233w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1400\/h:811\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 2x\"><noscript><img data-opt-id=671966567  decoding=\"async\" width=\"1400\" height=\"811\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png\" alt=\"Accessing your WordPress directory\" class=\"wp-image-45011\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1400\/h:811\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 1400w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:174\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:593\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:445\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:29\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:414\/h:240\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 414w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:685\/h:397\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 685w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1036\/h:600\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 1036w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:255\/h:148\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 255w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:337\/h:195\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 337w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:233\/h:135\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 233w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1400\/h:811\/q:mauto\/f:best\/dpr:2\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/wordpress-root-folder-2.png 2x\" sizes=\"(max-width: 700px) 100vw, 700px\"></noscript><\/figure><\/div>\n\n\n<p>Once you have access to the <em>root <\/em>folder, you can modify <em>any <\/em>of your WordPress files and add custom PHP code to them. Generally speaking, we recommend against modifying any files if you&rsquo;re not sure what they do.<\/p>\n\n\n\n<p>To edit files, you&rsquo;ll need a general understanding of how the <em>root <\/em>directory is structured. Within the main folder, you&rsquo;ll find site-wide configuration files. That includes <a href=\"https:\/\/themeisle.com\/blog\/htaccess-file-in-wordpress\/\">the <em>.htaccess<\/em> file<\/a>, which you can modify to add interesting functionality in WordPress.<\/p>\n\n\n\n<p>Theme and plugin files can be found inside the <em>wp-content <\/em>folder. If you go to <em>wp-content\/plugins <\/em>or <em>themes<\/em>, you&rsquo;ll see that each theme and plugin has its own folder. If you open one of your theme&rsquo;s folders, for example, you&rsquo;ll be able to edit all of the same files you get access to with the WordPress <em>Theme Editor <\/em>tool.<\/p>\n\n\n\n<p>To edit a file, right-click on it and select the <em>View\/Edit <\/em>option. Doing so will open the file using your local default text editor:<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=378115708  data-opt-src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png\"  decoding=\"async\" width=\"1407\" height=\"475\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:eco\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png\" alt=\"Editing PHP using local text editor\" class=\"wp-image-44997\" old-srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1407\/h:475\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 1407w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:101\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:346\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:259\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:17\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:162\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:268\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1200\/h:405\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:100\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:132\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:91\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1407\/h:475\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 2x\"><noscript><img data-opt-id=378115708  decoding=\"async\" width=\"1407\" height=\"475\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png\" alt=\"Editing PHP using local text editor\" class=\"wp-image-44997\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1407\/h:475\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 1407w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:101\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:346\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:259\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:17\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:162\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:268\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1200\/h:405\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:100\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:132\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:91\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1407\/h:475\/q:mauto\/f:best\/dpr:2\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/local-text-editor.png 2x\" sizes=\"(max-width: 700px) 100vw, 700px\"></noscript><\/figure><\/div>\n\n\n<p>When you&rsquo;re done making changes to any file, save it and your FTP client will upload the new version to your server. That&rsquo;s it!<\/p>\n\n\n<div class=\"su-divider su-divider-style-dotted\" style=\"margin:40px 0;border-width:1px;border-color:#999999\"><a href=\"#\" style=\"color:#999999\">Go to top<\/a><\/div>\n\n\n\n<h2 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"conclusion-php\">Conclusion &#129488;<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>Editing and adding PHP in WordPress is relatively simple. As long as you&rsquo;re comfortable working with code, or even just copying and pasting it, you can add snippets that will enhance your site&rsquo;s functionality in amazing ways. <\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n\t\t<div class=\"ti-tweet-clear\"><\/div>\n\t\t\t<div class=\"ti-tweet_wrapper\">\n\t\t    \t<div class=\"ti-tweet_text\">\n\t\t    \t\t<a href=\"https:\/\/twitter.com\/share?text=How+to+add+%23PHP+in+%23WordPress%3F+4+easy+methods+for+every+%23website+%F0%9F%90%98&amp;via=themeisle&amp;related=themeisle&amp;url=https:\/\/themeisle.com\/blog\/php-in-wordpress\/\" target=\"_blank\" rel=\"nofollow\">How to add #PHP in #WordPress? 4 easy methods for every #website &#128024;<\/a>\n\t\t    \t<\/div>\n\t\t    \t<div class=\"ti-tweet_sharebtn\">\n\t\t    \t<a href=\"https:\/\/twitter.com\/share?text=How+to+add+%23PHP+in+%23WordPress%3F+4+easy+methods+for+every+%23website+%F0%9F%90%98&amp;via=themeisle&amp;related=themeisle&amp;url=https:\/\/themeisle.com\/blog\/php-in-wordpress\/\" target=\"_blank\" rel=\"nofollow\">Click To Tweet \n\t\t    \t\t<span><\/span>\n\t\t    \t<\/a>\n\t\t    <\/div>\n\t\t<\/div>\n<\/div>\n<\/div>\n\n\n\n<p>However, whenever you&rsquo;re adding code to WordPress, you should always <a href=\"https:\/\/themeisle.com\/blog\/backup-a-wordpress-site-for-free\/\">back up your site<\/a> first in case something goes wrong. For example, adding PHP with improper syntax might <a href=\"https:\/\/themeisle.com\/blog\/wordpress-recovery-mode\/\">trigger WordPress recovery mode<\/a>.<\/p>\n\n\n<div class=\"su-note\" style=\"border-color:#e5e1b2;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFFBCC;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n\n\n\n<p>To recap, the four main ways to add PHP in WordPress are:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Turning your PHP into shortcodes with the <a href=\"https:\/\/wordpress.org\/plugins\/insert-php-code-snippet\/\" target=\"_blank\" rel=\"noopener\">Insert PHP Code Snippet plugin<\/a><\/li>\n\n\n\n<li>Adding PHP snippets to your site with <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\" target=\"_blank\" rel=\"noopener\">the Code Snippets plugin<\/a><\/li>\n\n\n\n<li>Customizing <a href=\"https:\/\/themeisle.com\/blog\/wordpress-child-themes\/\">your child theme<\/a> using the <em>Theme Editor<\/em><\/li>\n\n\n\n<li><a href=\"https:\/\/themeisle.com\/blog\/what-is-ftp-wordpress\/\">Using an FTP client<\/a> to edit WordPress files manually<\/li>\n<\/ol>\n\n\n<\/div><\/div>\n\n\n\n<p>If you&rsquo;re ready to get started, you can check out our collection of <a href=\"https:\/\/themeisle.com\/blog\/code-snippets-for-wordpress\/\">ten useful code snippets for WordPress sites<\/a>. If you want to go even further, we have a guide on <a href=\"https:\/\/themeisle.com\/blog\/how-to-become-a-wordpress-developer\/\">how to become a WordPress developer<\/a>.<\/p>\n\n\n\n<p><strong><em>Do you have any questions about how to add PHP in WordPress? Let&rsquo;s talk about them in the comments section below!<\/em><\/strong><\/p>\n\n\n<style>.ticss-d144f107 strong{font-weight: 700;\n    letter-spacing: -0.2px;\n    line-height: 1.2;\n    display: inline-block;}<\/style>\n\n\n<div class=\"wp-block-columns speed-guide has-white-color has-text-color has-background has-link-color wp-elements-2f81f6c5526477b5b4d52d1ca4513949 is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\" style=\"background-color:#4267cf\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:40%\">\n<figure class=\"wp-block-image size-medium\"><img data-opt-id=30701221  data-opt-src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png\"  decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:eco\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png\" alt=\"speed guide\" class=\"wp-image-113040\" old-srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:1024\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:150\/h:150\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 150w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:768\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:50\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:240\/h:240\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 240w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:397\/h:397\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 397w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:600\/h:600\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 600w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:148\/h:148\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 148w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:195\/h:195\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 195w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:135\/h:135\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 135w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1080\/h:1080\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1080\/h:1080\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 2x\"><noscript><img data-opt-id=30701221  decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png\" alt=\"speed guide\" class=\"wp-image-113040\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:1024\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:150\/h:150\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 150w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:768\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:50\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:240\/h:240\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 240w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:397\/h:397\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 397w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:600\/h:600\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 600w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:148\/h:148\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 148w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:195\/h:195\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 195w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:135\/h:135\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 135w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1080\/h:1080\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1080\/h:1080\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 2x\" sizes=\"(max-width: 300px) 100vw, 300px\"></noscript><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-center ticss-58e79f2f\" style=\"font-size:14px\"><strong>FREE GUIDE<\/strong><\/p>\n\n\n\n<p class=\"ticss-d144f107\" style=\"font-size:25px\"><strong>4 Essential Steps to Speed Up Your&nbsp;WordPress Website<\/strong><\/p>\n\n\n\n<p class=\"ticss-3b627beb\">Follow the simple steps in our 4-part mini series and reduce your loading times by 50-80%.&nbsp;&#128640;<\/p>\n\n\n<p><\/p><div class=\"frm_forms  with_frm_style frm_style_themeisle\" id=\"frm_form_4_container\" data-token=\"070f6a2e6c757d51d88e95dd83fc2573\">\n<form enctype=\"multipart\/form-data\" method=\"post\" class=\"frm-show-form  frm_pro_form \" id=\"form_site-speed-guide-below-post\" data-token=\"070f6a2e6c757d51d88e95dd83fc2573\">\n<div class=\"frm_form_fields \">\n<fieldset>\n<legend class=\"frm_screen_reader\">Site Speed Guide - Below Post<\/legend>\r\n\r\n<div class=\"frm_fields_container\">\n<input type=\"hidden\" name=\"frm_action\" value=\"create\">\n<input type=\"hidden\" name=\"form_id\" value=\"4\">\n<input type=\"hidden\" name=\"frm_hide_fields_4\" id=\"frm_hide_fields_4\" value=\"\">\n<input type=\"hidden\" name=\"form_key\" value=\"site-speed-guide-below-post\">\n<input type=\"hidden\" name=\"item_meta[0]\" value=\"\">\n<input type=\"hidden\" id=\"frm_submit_entry_4\" name=\"frm_submit_entry_4\" value=\"a54c34454d\"><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/blog\/wp-json\/wp\/v2\/posts\/44985\"><input type=\"hidden\" name=\"item_meta[18]\" id=\"field_6px6q2\" value=\"\/blog\/wp-json\/wp\/v2\/posts\/44985\" data-frmval=\"\/blog\/wp-json\/wp\/v2\/posts\/44985\">\n<div id=\"frm_field_15_container\" class=\"frm_form_field form-field  frm_required_field frm_none_container\">\r\n\t<label for=\"field_6px6q\" id=\"field_6px6q_label\" class=\"frm_primary_label\">Your Email\r\n\t\t<span class=\"frm_required\" aria-hidden=\"true\">*<\/span>\r\n\t<\/label>\r\n\t<input type=\"email\" id=\"field_6px6q\" name=\"item_meta[15]\" value=\"\" autocomplete=\"email\" placeholder=\"your@email.com\" data-reqmsg=\"Your Email cannot be blank.\" aria-required=\"true\" data-invmsg=\"Your Email is invalid\" aria-invalid=\"false\">\r\n\t\r\n\t\r\n<\/div>\n<div id=\"frm_field_17_container\" class=\"frm_form_field form-field  frm_none_container vertical_radio\">\r\n\t<div id=\"field_6px6q3_label\" class=\"frm_primary_label\">Subscribe to our newsletter\r\n\t\t<span class=\"frm_required\" aria-hidden=\"true\"><\/span>\r\n\t<\/div>\r\n\t<div class=\"frm_opt_container\" aria-labelledby=\"field_6px6q3_label\" role=\"group\">\t\t<div class=\"frm_checkbox\" id=\"frm_checkbox_17-0\">\t\t\t<label for=\"field_6px6q3-0\">\n\t\t\t<input type=\"checkbox\" name=\"item_meta[17][]\" id=\"field_6px6q3-0\" value=\"true\" data-invmsg=\"Subscribe to our newsletter is invalid\" aria-invalid=\"false\"> Subscribe to our newsletter<\/label><\/div>\n<\/div>\r\n\t\r\n\t\r\n<\/div>\n<div id=\"frm_field_14_container\" class=\"frm_form_field form-field \">\r\n\t<div class=\"frm_submit frm_flex\">\r\n<button class=\"frm_button_submit frm_final_submit\" type=\"submit\" formnovalidate=\"formnovalidate\">FREE ACCESS<\/button>\r\n\r\n\r\n\r\n<\/div>\r\n<\/div>\n\t<input type=\"hidden\" name=\"item_key\" value=\"\">\n\t\t\t<div id=\"frm_field_24_container\">\n\t\t\t<label for=\"field_6ebah\">\n\t\t\t\tIf you are human, leave this field blank.\t\t\t<\/label>\n\t\t\t<input id=\"field_6ebah\" type=\"text\" class=\"frm_form_field form-field frm_verify\" name=\"item_meta[24]\" value=\"\">\n\t\t<\/div>\n\t\t<input name=\"frm_state\" type=\"hidden\" value=\"tGKtIG19U6wyYcew8uBttR9iA+UDLPFwd4SrAzWrbJEwF9M0QAXa6pd1+Qu8+H8p\"><\/div>\n<\/fieldset>\n<\/div>\n\n<p style=\"display: none !important;\" class=\"akismet-fields-container\" data-prefix=\"ak_\"><label>&Delta;<textarea name=\"ak_hp_textarea\" cols=\"45\" rows=\"8\" maxlength=\"100\"><\/textarea><\/label><input type=\"hidden\" id=\"ak_js_1\" name=\"ak_js\" value=\"245\"><script>document.getElementById( \"ak_js_1\" ).setAttribute( \"value\", ( new Date() ).getTime() );<\/script><\/p><\/form>\n<\/div>\n\n<\/div>\n<\/div>\n\n\n\n<div class=\"su-tabs su-tabs-style-default su-tabs-mobile-stack\" data-active=\"1\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-tabs-nav\"><span class=\"\" data-url=\"\" data-target=\"blank\" tabindex=\"0\" role=\"button\">References<\/span><\/div><div class=\"su-tabs-panes\"><div class=\"su-tabs-pane su-u-clearfix su-u-trim\" data-title=\"References\">\n\n\n\n[1] <a href=\"https:\/\/w3techs.com\/technologies\/details\/pl-php\" target=\"_blank\" rel=\"noopener nofollow\">https:\/\/w3techs.com\/technologies\/details\/pl-php<\/a>\n\n\n<\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"PHP is one of the most popular programming languages on the web. If you use WordPress, you\u2019re also using PHP, even if you don\u2019t interact directly with any code. PHP in WordPress makes most of the features that you use possible. There are a lot of ways to edit PHP in WordPress or to add code to your site. Which approach you use will depend on your level of comfort editing WordPress files, but the process is a lot easier than you might imagine.","protected":false},"author":14,"featured_media":45038,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_stopmodifiedupdate":true,"_modified_date":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[26],"tags":[],"hashtags":[],"class_list":["post-44985","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"wppr_data":{"cwp_meta_box_check":"No"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.8 (Yoast SEO v26.1.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Add PHP in WordPress: 4 Easy Methods<\/title>\n<meta name=\"description\" content=\"There are several ways to add PHP in WordPress, ranging from using a plugin to making additions manually. Here&#039;s how each method works.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/themeisle.com\/blog\/php-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 Add PHP in WordPress: 4 Easy Methods\" \/>\n<meta property=\"og:description\" content=\"There are several ways to add PHP in WordPress, ranging from using a plugin to making additions manually. Here&#039;s how each method works.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/themeisle.com\/blog\/php-in-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"Themeisle Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-20T13:35:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-31T00:58:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/PHP.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"2180\" \/>\n\t<meta property=\"og:image:height\" content=\"1090\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"John Hughes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Hughes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/themeisle.com\/blog\/php-in-wordpress\/\"},\"author\":{\"name\":\"John Hughes\",\"@id\":\"https:\/\/themeisle.com\/blog\/#\/schema\/person\/0f080762cdcc47aee80f11536fe87242\"},\"headline\":\"How to Add PHP in WordPress: 4 Easy Methods\",\"datePublished\":\"2021-09-20T13:35:18+00:00\",\"dateModified\":\"2024-01-31T00:58:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/themeisle.com\/blog\/php-in-wordpress\/\"},\"wordCount\":1642,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/themeisle.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/PHP.jpeg\",\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/themeisle.com\/blog\/php-in-wordpress\/\",\"url\":\"https:\/\/themeisle.com\/blog\/php-in-wordpress\/\",\"name\":\"How to Add PHP in WordPress: 4 Easy Methods\",\"isPartOf\":{\"@id\":\"https:\/\/themeisle.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/PHP.jpeg\",\"datePublished\":\"2021-09-20T13:35:18+00:00\",\"dateModified\":\"2024-01-31T00:58:15+00:00\",\"description\":\"There are several ways to add PHP in WordPress, ranging from using a plugin to making additions manually. Here\\\\'s how each method works.\",\"breadcrumb\":{\"@id\":\"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/themeisle.com\/blog\/php-in-wordpress\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#primaryimage\",\"url\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/PHP.jpeg\",\"contentUrl\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/PHP.jpeg\",\"width\":2180,\"height\":1090,\"caption\":\"PHP\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/themeisle.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Add PHP in WordPress: 4 Easy Methods\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/themeisle.com\/blog\/#website\",\"url\":\"https:\/\/themeisle.com\/blog\/\",\"name\":\"Themeisle Blog\",\"description\":\"WordPress Tutorials and Reviews for Beginners and Advanced\",\"publisher\":{\"@id\":\"https:\/\/themeisle.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/themeisle.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/themeisle.com\/blog\/#organization\",\"name\":\"VertiStudio\",\"alternateName\":\"Vertigo Studio SA\",\"url\":\"https:\/\/themeisle.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/themeisle.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2024\/02\/VertiStudio_logo1.png\",\"contentUrl\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2024\/02\/VertiStudio_logo1.png\",\"width\":718,\"height\":156,\"caption\":\"VertiStudio\"},\"image\":{\"@id\":\"https:\/\/themeisle.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/themeisle.com\/blog\/#\/schema\/person\/0f080762cdcc47aee80f11536fe87242\",\"name\":\"John Hughes\",\"description\":\"John is a self-taught WordPress designer and developer. He has been working with the CMS for over a decade, and has experience operating as a freelancer and as part of an agency. He\u2019s dabbled in everything from accessible design to website security. Plus, he has extensive knowledge of online business topics like affiliate marketing.\",\"sameAs\":[\"http:\/\/wordcandy.co\"],\"url\":\"https:\/\/themeisle.com\/blog\/author\/john-h\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Add PHP in WordPress: 4 Easy Methods","description":"There are several ways to add PHP in WordPress, ranging from using a plugin to making additions manually. Here&#039;s how each method works.","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:\/\/themeisle.com\/blog\/php-in-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"How to Add PHP in WordPress: 4 Easy Methods","og_description":"There are several ways to add PHP in WordPress, ranging from using a plugin to making additions manually. Here&#039;s how each method works.","og_url":"https:\/\/themeisle.com\/blog\/php-in-wordpress\/","og_site_name":"Themeisle Blog","article_published_time":"2021-09-20T13:35:18+00:00","article_modified_time":"2024-01-31T00:58:15+00:00","og_image":[{"width":2180,"height":1090,"url":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/PHP.jpeg","type":"image\/jpeg"}],"author":"John Hughes","twitter_card":"summary_large_image","twitter_misc":{"Written by":"John Hughes","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#article","isPartOf":{"@id":"https:\/\/themeisle.com\/blog\/php-in-wordpress\/"},"author":{"name":"John Hughes","@id":"https:\/\/themeisle.com\/blog\/#\/schema\/person\/0f080762cdcc47aee80f11536fe87242"},"headline":"How to Add PHP in WordPress: 4 Easy Methods","datePublished":"2021-09-20T13:35:18+00:00","dateModified":"2024-01-31T00:58:15+00:00","mainEntityOfPage":{"@id":"https:\/\/themeisle.com\/blog\/php-in-wordpress\/"},"wordCount":1642,"commentCount":0,"publisher":{"@id":"https:\/\/themeisle.com\/blog\/#organization"},"image":{"@id":"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/PHP.jpeg","articleSection":["WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/themeisle.com\/blog\/php-in-wordpress\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/themeisle.com\/blog\/php-in-wordpress\/","url":"https:\/\/themeisle.com\/blog\/php-in-wordpress\/","name":"How to Add PHP in WordPress: 4 Easy Methods","isPartOf":{"@id":"https:\/\/themeisle.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/PHP.jpeg","datePublished":"2021-09-20T13:35:18+00:00","dateModified":"2024-01-31T00:58:15+00:00","description":"There are several ways to add PHP in WordPress, ranging from using a plugin to making additions manually. Here\\'s how each method works.","breadcrumb":{"@id":"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/themeisle.com\/blog\/php-in-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#primaryimage","url":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/PHP.jpeg","contentUrl":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2021\/09\/PHP.jpeg","width":2180,"height":1090,"caption":"PHP"},{"@type":"BreadcrumbList","@id":"https:\/\/themeisle.com\/blog\/php-in-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/themeisle.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Add PHP in WordPress: 4 Easy Methods"}]},{"@type":"WebSite","@id":"https:\/\/themeisle.com\/blog\/#website","url":"https:\/\/themeisle.com\/blog\/","name":"Themeisle Blog","description":"WordPress Tutorials and Reviews for Beginners and Advanced","publisher":{"@id":"https:\/\/themeisle.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/themeisle.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/themeisle.com\/blog\/#organization","name":"VertiStudio","alternateName":"Vertigo Studio SA","url":"https:\/\/themeisle.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/themeisle.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2024\/02\/VertiStudio_logo1.png","contentUrl":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2024\/02\/VertiStudio_logo1.png","width":718,"height":156,"caption":"VertiStudio"},"image":{"@id":"https:\/\/themeisle.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/themeisle.com\/blog\/#\/schema\/person\/0f080762cdcc47aee80f11536fe87242","name":"John Hughes","description":"John is a self-taught WordPress designer and developer. He has been working with the CMS for over a decade, and has experience operating as a freelancer and as part of an agency. He\u2019s dabbled in everything from accessible design to website security. Plus, he has extensive knowledge of online business topics like affiliate marketing.","sameAs":["http:\/\/wordcandy.co"],"url":"https:\/\/themeisle.com\/blog\/author\/john-h\/"}]}},"_links":{"self":[{"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/posts\/44985","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/comments?post=44985"}],"version-history":[{"count":27,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/posts\/44985\/revisions"}],"predecessor-version":[{"id":98724,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/posts\/44985\/revisions\/98724"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/media\/45038"}],"wp:attachment":[{"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/media?parent=44985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/categories?post=44985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/tags?post=44985"},{"taxonomy":"hashtags","embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/hashtags?post=44985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}