{"id":12811,"date":"2019-07-19T12:05:29","date_gmt":"2019-07-19T12:05:29","guid":{"rendered":"https:\/\/ampforwp.com\/tutorials\/?post_type=ht_kb&#038;p=12811"},"modified":"2020-05-07T12:14:10","modified_gmt":"2020-05-07T12:14:10","slug":"how-to-remove-unused-sections-from-amp-options-panel","status":"publish","type":"ht_kb","link":"https:\/\/ampforwp.com\/tutorials\/article\/how-to-remove-unused-sections-from-amp-options-panel\/","title":{"rendered":"How to remove unused sections from AMP options panel"},"content":{"rendered":"\n<p>If you want to remove unused sections from AMP options panel which you don&#8217;t want then first you need to create a custom plugin by following this <a href=\"https:\/\/ampforwp.com\/tutorials\/article\/how-to-create-a-custom-plugin-on-top-of-amp-for-wp\/\">tutorial<\/a>.<\/p>\n\n\n\n<p>You need to just copy the below code and paste in that custom plugin<\/p>\n\n\n\n<p><strong>For example:<\/strong><\/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_filter('ampforwp_remove_unused_options','ampforwp_remove_amp_panel_options');\nfunction ampforwp_remove_amp_panel_options($section){\nif($section['id'] == 'ID_of_that_option'){\n$section['hidden'] = true;\n}\nreturn $section;\n}<\/pre><\/div>\n\n\n\n<p><strong>For example:<\/strong><\/p>\n\n\n\n<p>If you want to remove &#8220;<strong>Push Notification<\/strong>&#8221; from AMP options panel first you need to find &#8220;Push Notification&#8221; in plugin folder like below the screenshot.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"526\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/6-7-1024x526.png\" alt=\"\" class=\"wp-image-12829\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/6-7-1024x526.png 1024w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/6-7-300x154.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/6-7-768x394.png 768w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/6-7-50x26.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/6-7-60x31.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/6-7-100x51.png 100w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/6-7.png 1365w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><p style=\"background-color: #ffdddd; border-left: 2px solid #f44336; padding:10px;\"><strong>Note:<\/strong>  Which option you want to remove copy this ID and paste in this custom code<\/p><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"619\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/7-5-1024x619.png\" alt=\"\" class=\"wp-image-12832\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/7-5-1024x619.png 1024w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/7-5-300x181.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/7-5-768x464.png 768w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/7-5-50x30.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/7-5-60x36.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/7-5-100x60.png 100w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/7-5.png 1050w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You need to paste that ID here in the custom plugin like below the screenshot.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"975\" height=\"338\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/8-5.png\" alt=\"\" class=\"wp-image-12835\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/8-5.png 975w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/8-5-300x104.png 300w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/8-5-768x266.png 768w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/8-5-50x17.png 50w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/8-5-60x21.png 60w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/8-5-100x35.png 100w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/figure>\n\n\n\n<h4>Before removing Push Notification from AMP option panel<\/h4>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"396\" height=\"562\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/4-7.png\" alt=\"\" class=\"wp-image-12823\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/4-7.png 396w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/4-7-211x300.png 211w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/4-7-35x50.png 35w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/4-7-42x60.png 42w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/4-7-70x100.png 70w\" sizes=\"(max-width: 396px) 100vw, 396px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 id=\"mce_36\">After removing Push Notification from AMP option panel<\/h4>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"481\" height=\"609\" src=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/5-7.png\" alt=\"\" class=\"wp-image-12824\" srcset=\"https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/5-7.png 481w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/5-7-237x300.png 237w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/5-7-39x50.png 39w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/5-7-47x60.png 47w, https:\/\/ampforwp.com\/tutorials\/wp-content\/uploads\/2019\/07\/5-7-79x100.png 79w\" sizes=\"(max-width: 481px) 100vw, 481px\" \/><\/figure>\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 remove unused sections from AMP options panel which you don&#8217;t want then first you need to create a custom plugin by following this tutorial. You need to just copy the below code and paste in that custom plugin For example: For example: If you want to&#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\/12811"}],"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=12811"}],"version-history":[{"count":21,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/12811\/revisions"}],"predecessor-version":[{"id":17285,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/12811\/revisions\/17285"}],"wp:attachment":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/media?parent=12811"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-category?post=12811"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-tag?post=12811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}