{"id":3635,"date":"2017-09-09T14:45:09","date_gmt":"2017-09-09T14:45:09","guid":{"rendered":"https:\/\/ampforwp.com\/tutorials\/?post_type=ht_kb&#038;p=3635"},"modified":"2020-05-08T07:13:35","modified_gmt":"2020-05-08T07:13:35","slug":"amp-theme-framework-code-explained","status":"publish","type":"ht_kb","link":"https:\/\/ampforwp.com\/tutorials\/article\/amp-theme-framework-code-explained\/","title":{"rendered":"AMP Theme Framework Code Explained"},"content":{"rendered":"\n<p>In this article we&#8217;ll look into the theme structure and it&#8217;s working.<\/p>\n\n\n\n<h4>amp-theme.php<\/h4>\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;}\">&lt;?php\n\/*\nPlugin Name: AMP Theme Framework\nPlugin URI: https:\/\/wordpress.org\/plugins\/accelerated-mobile-pages\/\nDescription: This is a custom AMP theme built to show how easy it is to make custom AMP themes.\nVersion: 1.0\nAuthor:  Mohammed Kaludi, Ahmed Kaludi\nAuthor URI: http:\/\/ampforwp.com\/themes\nLicense: GPL2\nAMP: AMP Framework \n*\/\n\n\/\/ Exit if accessed directly.\nif ( ! defined( 'ABSPATH' ) ) exit;<\/pre><\/div>\n\n\n\n<p>This file is for WordPress to let it know that This is a plugin and treat it as such.<\/p>\n\n\n\n<h4>archive.php<\/h4>\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;}\">&lt;?php amp_header() ?&gt;\n\n&lt;?php amp_archive_title(); ?&gt;\n&lt;?php amp_loop_template(); ?&gt;\n\n&lt;?php amp_footer()?&gt;<\/pre><\/div>\n\n\n\n<ul><li><strong>amp_header()<\/strong> is used to call for getting the post_id, template and its parts (header).<\/li><li><strong>amp_archive_title()&nbsp;<\/strong>is used to get the title of an archive.<\/li><li><strong>amp_loop_template()<\/strong> is used to load the loop.<\/li><li><strong>amp_footer()&nbsp;<\/strong>is used to load the footer.<\/li><\/ul>\n\n\n\n<h4>footer.php<\/h4>\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;}\">&lt;\/div&gt;\n&lt;footer class=&quot;footer container&quot;&gt;\n &lt;?php amp_non_amp_link(); ?&gt;\n&lt;\/footer&gt;\n&lt;?php amp_footer_core(); ?&gt;<\/pre><\/div>\n\n\n\n<ul><li><strong>amp_non_amp_link()<\/strong> is used to display the non-AMP version of the site content.<\/li><li><strong>amp_footer_core()<\/strong> is used to complete the footer part by loading the template and hook functions.<\/li><\/ul>\n\n\n\n<h4>functions.php<\/h4>\n\n\n\n<p>this file is to add the support to all the components present in the AMP Theme Framework.<br>If you wish to add any component say &#8220;search&#8221; then you should use the following code.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">add_amp_theme_support('AMP-search');<\/pre>\n\n\n\n<p>AMP-search is used to initiate the support for the <a href=\"https:\/\/ampforwp.com\/tutorials\/article\/search\/\">search<\/a> component.<\/p>\n\n\n\n<p>following is the list of all the <a href=\"https:\/\/ampforwp.com\/tutorials\/article\/components-amp-theme-framework\/\">components<\/a>.<\/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;}\">&lt;?php \n\/\/ Loading the Components\n\/\/Search\nadd_amp_theme_support('AMP-search');\n\/\/Logo\nadd_amp_theme_support('AMP-logo');\n\/\/Social Icons\nadd_amp_theme_support('AMP-social-icons');\n\/\/Menu\nadd_amp_theme_support('AMP-menu');\n\/\/Call Now\nadd_amp_theme_support('AMP-call-now');\n\/\/Sidebar\nadd_amp_theme_support('AMP-sidebar');\n\/\/ Featured Image\nadd_amp_theme_support('AMP-featured-image');\n\/\/Author box\nadd_amp_theme_support('AMP-author-box');\n\/\/Loop\nadd_amp_theme_support('AMP-loop');\n\/\/ Categories and Tags list\nadd_amp_theme_support('AMP-categories-tags');\n\/\/ Comments\nadd_amp_theme_support('AMP-comments');\n\/\/Post Navigation\nadd_amp_theme_support('AMP-post-navigation');\n\/\/ Related Posts\nadd_amp_theme_support('AMP-related-posts');\n\/\/ Post Pagination\nadd_amp_theme_support('AMP-post-pagination');<\/pre><\/div>\n\n\n\n<h4>header.php<\/h4>\n\n\n\n<p>In this file, you&#8217;ll be adding the <a href=\"https:\/\/ampforwp.com\/tutorials\/article\/components-amp-theme-framework\/\">components<\/a> like <a href=\"https:\/\/ampforwp.com\/tutorials\/article\/sidebar\/\">sidebar<\/a>, <a href=\"https:\/\/ampforwp.com\/tutorials\/article\/search\/\">search<\/a> and <a href=\"https:\/\/ampforwp.com\/tutorials\/article\/social-icons\/\">social icons<\/a>.<\/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;}\">&lt;?php amp_header_core() ?&gt;\n &lt;header class=&quot;header container&quot;&gt;\n    &lt;?php amp_logo(); ?&gt;\n    &lt;?php amp_sidebar(['action'=&gt;'open-button']); ?&gt; \n    &lt;?php amp_call_now(); ?&gt;\n    &lt;?php amp_social([\n        'twitter' =&gt; 'https:\/\/www.twitter.com\/marqas36',\n        'facebook' =&gt; 'https:\/\/www.facebook.com'\n    ]);?&gt;    \n&lt;\/header&gt;\n\n\n&lt;?php amp_sidebar(['action'=&gt;'start',\n    'id'=&gt;'sidebar',\n    'layout'=&gt;'nodisplay',\n    'side'=&gt;'right'\n] ); ?&gt;\n&lt;?php amp_sidebar(['action'=&gt;'close-button']); ?&gt;\n&lt;?php amp_menu(); ?&gt;\n&lt;?php amp_search();?&gt;\n&lt;?php amp_social(); ?&gt; \n&lt;?php amp_sidebar(['action'=&gt;'end']); ?&gt;\n\n&lt;div class=&quot;content-wrapper container&quot;&gt;<\/pre><\/div>\n\n\n\n<p><strong>amp_header_core()<\/strong> is a must to add in this file which will get the core of AMP HTML<\/p>\n\n\n\n<p><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/logo\/\"><strong>amp_logo()<\/strong><\/a> is used to add the logo component and similarly, the other components can be loaded such as<\/p>\n\n\n\n<p><strong><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/sidebar\/\">amp_sidebar()<\/a><br><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/search\/\">amp_search()<\/a><br><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/menu\/\">amp_menu()<\/a><br><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/social-icons\/\">amp_social()<\/a><\/strong><\/p>\n\n\n\n<h4>index.php<\/h4>\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;}\">&lt;?php amp_header(); ?&gt;\n  \n&lt;?php amp_loop_template(); ?&gt;\n\n&lt;?php amp_footer(); ?&gt;<\/pre><\/div>\n\n\n\n<p>here in index.php<\/p>\n\n\n\n<ul><li><strong>amp_header()<\/strong> is used to load the header part.<\/li><li><strong>amp_loop_template()<\/strong> is used to load the loop.<\/li><li><strong>amp_footer()&nbsp;<\/strong>is used to load the footer.<\/li><\/ul>\n\n\n\n<h4>loop.php<\/h4>\n\n\n\n<p>this is one of the most important files for the theme which is responsible to load the content of the loop.<\/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;}\">&lt;?php while(amp_loop('start')): ?&gt;\n&lt;div class=&quot;loop-post&quot;&gt;\n    &lt;?php amp_loop_image(); ?&gt;\n    &lt;?php amp_loop_title(); ?&gt;\n    &lt;?php amp_loop_excerpt(); ?&gt;\n    &lt;?php amp_loop_category(); ?&gt;\n    &lt;?php amp_loop_date(); ?&gt;\n&lt;\/div&gt;\n&lt;?php endwhile; amp_loop('end');  ?&gt;\n&lt;?php amp_pagination(); ?&gt;<\/pre><\/div>\n\n\n\n<p>here we check the condition while the loop is start<\/p>\n\n\n\n<ul><li><strong>while(amp_loop(&#8216;start&#8217;)): <\/strong>we&#8217;ll load the following meta information about the post.<\/li><\/ul>\n\n\n\n<ul><li><strong>amp_loop_image()<\/strong> is used to load the image (featured image\/thumbnail).<\/li><li><strong>amp_loop_title()<\/strong> is used to get the title of the post.<\/li><li><strong>amp_loop_excerpt() <\/strong>is used to get the excerpt of the post if any.<\/li><li><strong>amp_loop_category()<\/strong> &nbsp;is to show the category to which this post belongs to.<\/li><li><strong>amp_loop_date()<\/strong> is to show the published date.<\/li><\/ul>\n\n\n\n<h4>page.php<\/h4>\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;}\">&lt;?php amp_header(); ?&gt;\n&lt;?php amp_title(); ?&gt;\n&lt;?php amp_featured_image(); ?&gt;\n&lt;?php amp_content(); ?&gt;\n&lt;?php amp_footer(); ?&gt;<\/pre><\/div>\n\n\n\n<p>It is used to load the AMP content for the page.<\/p>\n\n\n\n<ul><li><strong>amp_header()<\/strong> is used to add the header.<\/li><li><strong>amp_title()<\/strong> is used to get the title of the page.<\/li><li><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/featured-image\/\"><strong>amp_featured_image()<\/strong><\/a> is used for displaying the featured image if available.<\/li><li><strong>amp_content()<\/strong> It used to load the AMP content.<\/li><li><strong>amp_footer()<\/strong> is used for adding the footer section.<\/li><\/ul>\n\n\n\n<h4>search.php<\/h4>\n\n\n\n<h4>single.php<\/h4>\n\n\n\n<p>this file is responsible for displaying the posts in AMP theme.<\/p>\n\n\n\n<p>We can add any component we want to display in single as per our need.<\/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;}\">&lt;?php amp_header(); ?&gt;\n&lt;?php amp_title(); ?&gt;\n&lt;?php amp_featured_image();?&gt;\n&lt;?php amp_content(); ?&gt;\n&lt;?php amp_post_pagination();?&gt;\n&lt;?php amp_author_box(); ?&gt;\n&lt;?php amp_social(array('twitter'));?&gt;\n&lt;?php amp_categories_list();?&gt;\n&lt;?php amp_tags_list();?&gt;\n&lt;?php amp_comments();?&gt;\n&lt;?php amp_post_navigation();?&gt;\n&lt;?php amp_related_posts(); ?&gt;\n&lt;?php amp_footer()?&gt;<\/pre><\/div>\n\n\n\n<ul><li><strong>amp_header()<\/strong> is used to add the header part.<\/li><li><strong>amp_title()<\/strong> is used to get the title of the post.<\/li><li><strong><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/featured-image\/\">amp_featured_image()<\/a>&nbsp;<\/strong>is used to add the featured image in single.<strong><br>amp_content()&nbsp;<\/strong>is to load the content.<\/li><li><strong><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/post-pagination\/\">amp_post_pagination()<\/a>&nbsp;<\/strong>is to get the pagination.<\/li><li><strong><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/author-box\/\">amp_author_box()<\/a>&nbsp;<\/strong>is used for displaying the author section.<\/li><li><strong><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/social-icons\/\">amp_social()<\/a>&nbsp;<\/strong>is used to load the social sharing or social profile based on the component set up.<\/li><li><strong><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/categories-tags\/\">amp_categories_list()&nbsp;<\/a><\/strong>is used to display the categories list.<\/li><li><strong><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/categories-tags\/\">amp_tags_list()<\/a>&nbsp;<\/strong>is for displaying the tags of the post.<\/li><li><strong><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/comments\/\">amp_comments()<\/a>&nbsp;<\/strong>to display the comments section.<\/li><li><strong><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/post-navigation\/\">amp_post_navigation()<\/a>&nbsp;<\/strong>is to add the post navigation.<\/li><li><strong><a href=\"https:\/\/ampforwp.com\/tutorials\/article\/related-posts\/\">amp_related_posts()<\/a>&nbsp;<\/strong>it is used to display the related posts.<\/li><li><strong>amp_footer()<\/strong>&nbsp;it is used to load the footer section.<\/li><\/ul>\n\n\n\n<h4>style.php<\/h4>\n\n\n\n<p>this file contains all the css style for the entire theme.<\/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;}\">&lt;?php add_action('amp_post_template_css', 'ampforwp_custom_style', 11);\nfunction ampforwp_custom_style() {  \n global $redux_builder_amp;\n $get_customizer = new AMP_Post_Template( $post_id );\n?&gt;\n\/**** \n* AMP Framework Reset\n*****\/\n    body{ font-family: sans-serif; font-size: 16px; line-height:1.4; }\n    ol, ul{ list-style-position: inside }\n    p, ol, ul, figure{ margin: 0 0 1em; padding: 0; }\n    a, a:active, a:visited{ color:#ed1c24; text-decoration: none }\n    a:hover, a:active, a:focus{}\n    pre{ white-space: pre-wrap;}\n    .hidden{ display:none }\n    .clearfix{ clear:both }\n    blockquote{ background: #f1f1f1; margin: 10px 0 20px 0; padding: 15px;}\n    blockquote p:last-child {margin-bottom: 0;}\n    .amp-wp-unknown-size img {object-fit: contain;}\n    .amp-wp-enforced-sizes{ max-width: 100% }\n\n    \/* Image Alignment *\/\n    .alignright {\n        float: right;\n    }\n    .alignleft {\n        float: left;\n    }\n    .aligncenter {\n        display: block;\n        margin-left: auto;\n        margin-right: auto;\n    }\n    amp-iframe { max-width: 100%; margin-bottom : 20px; }\n\n    \/* Captions *\/\n    .wp-caption {\n        padding: 0;\n    }\n    .wp-caption-text {\n        font-size: 12px;\n        line-height: 1.5em;\n        margin: 0;\n        padding: .66em 10px .75em;\n        text-align: center;\n    }\n\n    \/* AMP Media *\/\n    amp-iframe,\n    amp-youtube,\n    amp-instagram,\n    amp-vine {\n        margin: 0 -16px 1.5em;\n    }\n    amp-carousel &gt; amp-img &gt; img {\n        object-fit: contain;\n    }\n\n\n\/****\n* Container\n*****\/\n.container {\n    max-width: 600px;\n    margin: 0 auto;\n}\n\n\/****\n* AMP Sidebar\n*****\/\n    amp-sidebar {\n        width: 250px;\n    }\n\n    \/* AMP Sidebar Toggle button *\/\n    .amp-sidebar-button{\n        position:relative\n    }\n    .amp-sidebar-toggle  {\n    }\n    .amp-sidebar-toggle span  {\n        display: block;\n        height: 2px;\n        margin-bottom: 5px;\n        width: 22px;\n        background: #000;\n    }\n    .amp-sidebar-toggle span:nth-child(2){\n        top: 7px;\n    }\n    .amp-sidebar-toggle span:nth-child(3){\n        top:14px;\n    }\n\n\n\/****\n* AMP Navigation Menu with Dropdown Support\n*****\/\n    .toggle-navigation ul{\n        list-style-type: none;\n        margin: 0;\n        padding: 0;\n        display: inline-block;\n        width: 100%\n    }\n    .toggle-navigation ul li{\n        font-size: 13px;\n        border-bottom: 1px solid rgba(0, 0, 0, 0.11);\n        padding: 11px 0px;\n        width: 25%;\n        float: left;\n        text-align: center;\n        margin-top: 6px\n    }\n    .toggle-navigation ul ul{\n        display: none\n    }\n    .toggle-navigation ul li a{\n        color: #eee;\n        padding: 15px;\n    }\n    .toggle-navigation{\n        display: none;\n        background: #444;\n    }\n\n\n\/**** \n* Loop\n*****\/\n.loop-wrapper .loop-img{\n    float: left;\n    margin-right: 15px;\n}\n.loop-category{\n    list-style-type:none\n}\n.loop-category li{\n    display:inline;\n    margin-right:1px;\n}\n\n\/**** \n* Single\n*****\/\n\n\n\/**** \n* Comments\n*****\/\n .comments_list ul{\n     margin:0;\n     padding:0\n }\n .comments_list ul.children{\n     padding-bottom:10px;\n margin-left: 4%;\n width: 96%;\n }\n .comments_list ul li p{\n        margin: 0;\n        font-size: 14px;\n        clear: both;\n        padding-top: 5px;\n }\n    .comments_list ul li .says{\n        margin-right: 4px;\n    }\n .comments_list ul li .comment-body{\n     padding: 10px 0px 15px 0px;\n }\n .comments_list li li{\n     margin: 20px 20px 10px 20px;\n     background: #f7f7f7;\n     box-shadow: none;\n     border: 1px solid #eee;\n }\n .comments_list li li li{\n     margin:20px 20px 10px 20px\n }\n .comment-author{ float:left }\n\n\/**** \n* RTL Styles\n*****\/\n    &lt;?php  if( is_rtl() ) {?&gt; &lt;?php } ?&gt;\n\n\/**** \n* Custom CSS\n*****\/\n&lt;?php echo $redux_builder_amp['css_editor']; ?&gt;\n\n&lt;?php } ?&gt;<\/pre><\/div>\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>In this article we&#8217;ll look into the theme structure and it&#8217;s working. amp-theme.php This file is for WordPress to let it know that This is a plugin and treat it as such. archive.php amp_header() is used to call for getting the post_id, template and its parts (header). amp_archive_title()&nbsp;is used to&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":[],"ht-kb-category":[81],"ht-kb-tag":[],"_links":{"self":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/3635"}],"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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/comments?post=3635"}],"version-history":[{"count":4,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/3635\/revisions"}],"predecessor-version":[{"id":17300,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/3635\/revisions\/17300"}],"wp:attachment":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/media?parent=3635"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-category?post=3635"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-tag?post=3635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}