{"id":7875,"date":"2019-04-24T06:41:45","date_gmt":"2019-04-24T06:41:45","guid":{"rendered":"https:\/\/ampforwp.com\/tutorials\/?post_type=ht_kb&#038;p=7875"},"modified":"2020-05-07T11:34:13","modified_gmt":"2020-05-07T11:34:13","slug":"how-to-disable-inline-styling-added-by-amp-plugin","status":"publish","type":"ht_kb","link":"https:\/\/ampforwp.com\/tutorials\/article\/how-to-disable-inline-styling-added-by-amp-plugin\/","title":{"rendered":"How to disable inline styling on the AMP Pages"},"content":{"rendered":"\n<p>If you want to disable inline style in AMP pages then follow these steps.<\/p>\n\n\n\n<p><strong>1<\/strong>. Go to <strong>WordPress admin area <\/strong>-&gt; Appearance -&gt; <strong>Theme Editor<\/strong> -&gt;  <br><\/p>\n\n\n\n<p><strong>2.<\/strong> Add this below code inside the <strong>functions.php<\/strong> file.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;PHP&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;php&quot;}\">add_action('amp_post_template_css','prefix_remove_inline_style');\nfunction prefix_remove_inline_style(){\nremove_action( 'amp_post_template_css', 'AMPforWP\\AMPVendor\\amp_post_template_add_styles', 99 );\n}<\/pre><\/div>\n\n\n\n<p><strong>3.<\/strong> After that click on Update file button.<\/p>\n\n\n\n<p><p style=\"background-color: #ffdddd; border-left: 2px solid #f44336;padding:10px;\"> <strong> Note:<\/strong>\n You can also add above code from the Cpanel by going to your website directory -&gt; <strong>wp-content<\/strong> -&gt; <strong>themes<\/strong>-&gt;  <strong>theme name<\/strong> &gt; <strong>functions.php<\/strong>.<\/p><\/p>\n\n\n\n<p><strong>That\u2019s it for this tutorial!<\/strong><\/p>\n\n\n\n<p>We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.<\/p>\n<div id=\"div-1\" class=\"hkb-feedback\">\n\t\t\t<strong class=\"ht-mobile-exit__title\">Ask your Questions Directly!<\/strong><br>\n\t\t\t<div class=\"hkb_widget_exit__content\" style=\"font-size: 14px;\">If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!<\/div>\n\t\t\t<a href=\"https:\/\/ampforwp.com\/support\/#contact\" id=\"button\" target=\"_blank\" rel=\"noopener noreferrer\"><button>Yes, I have a Question<\/button><\/a>\n\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>If you want to disable inline style in AMP pages then follow these steps. 1. Go to WordPress admin area -&gt; Appearance -&gt; Theme Editor -&gt; 2. Add this below code inside the functions.php file. 3. After that click on Update file button. Note: You can also add above code&#8230;<\/p>\n","protected":false},"author":18,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":[],"ht-kb-category":[34],"ht-kb-tag":[],"_links":{"self":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/7875"}],"collection":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/comments?post=7875"}],"version-history":[{"count":19,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/7875\/revisions"}],"predecessor-version":[{"id":17280,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/7875\/revisions\/17280"}],"wp:attachment":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/media?parent=7875"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-category?post=7875"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-tag?post=7875"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}