{"flag":true,"single":true,"pageTitle":"Wordpress intro, Post types, file structure, and template Hierarchy","post":{"id":227,"user_id":"1","slug":"wordpress-intro-post-types-file-structure-and-template-hierarchy-h7nl","title":"Wordpress intro, Post types, file structure, and template Hierarchy","body":"<p><strong><span style=\"font-size: 14pt;\">1. Post types:<\/span><br><\/strong>Stored in table <strong>wp_posts <\/strong>and column <strong>post_type <\/strong>in database<\/p>\r\n<ol>\r\n<li><strong>Post (Post Type: &lsquo;post&rsquo;)<br><\/strong>used for blogs mostly, {single, single-post, category, tag, taxonomy, archive, author, date.php, search,home,index}.php template files used by post.<\/li>\r\n<li><strong>Page (Post Type: &lsquo;page&rsquo;)<br><\/strong>{page, $custom, front-page, search, index}.php templates used<\/li>\r\n<li><strong>Attachment (Post Type: &lsquo;attachment&rsquo;)<\/strong><br>{MIME_type.php, attachment.php, single-attachment.php, single.php ,index.php}<\/li>\r\n<li style=\"font-weight: bold;\"><strong>Revision (Post Type: &lsquo;revision&rsquo;);<\/strong><br><br><\/li>\r\n<li style=\"font-weight: bold;\"><strong>5.Navigation menu (Post Type: &lsquo;nav_menu_item&rsquo;)<\/strong><\/li>\r\n<\/ol>\r\n<p><span style=\"font-size: 14pt;\"><strong>2. Recommended File Structure<\/strong><\/span><\/p>\r\n<p>&nbsp;<\/p>\r\n<pre class=\"language-markup\"><code>wp-content&gt; themes &gt; mythme\r\n  &gt; assets (dir)\r\n  &gt; css (dir)\r\n  &gt; images (dir)\r\n  &gt; js (dir)\r\n  &gt; inc (dir)\r\n  &gt; template-parts (dir)\r\n  404.php\r\n  footer.php\r\n  functions.php\r\n  header.php\r\n  index.php\r\n  page.php\r\n  screenshot.png\r\n  sidebar.php\r\n  single.php\r\n  style.css<\/code><\/pre>\r\n<p><strong><span style=\"font-size: 14pt;\">3. Template Hirerarchy (how WordPress determines which template file(s) to use on individual pages)<\/span><\/strong><\/p>\r\n<p><span style=\"font-size: 14pt;\"><img src=\"https:\/\/developer.wordpress.org\/files\/2014\/10\/Screenshot-2019-01-23-00.20.04.png\"><\/span><\/p>","category_id":"29","is_private":"0","created_at":"2023-11-16T00:55:19.000000Z","updated_at":"2023-11-16T00:56:54.000000Z","category":{"id":29,"user_id":"1","name":"Wordpress","slug":"wordpress-uzoa","parent_id":"1","created_at":"2023-11-10T02:49:29.000000Z","updated_at":"2023-11-10T02:49:29.000000Z"},"user":{"id":1,"name":"R GONDAL","email":"rizikmw@gmail.com","email_verified_at":null,"two_factor_confirmed_at":null,"current_team_id":"1","profile_photo_path":null,"created_at":"2023-03-12T10:49:33.000000Z","updated_at":"2025-01-10T12:59:00.000000Z","profile_photo_url":"https:\/\/ui-avatars.com\/api\/?name=R+G&color=7F9CF5&background=EBF4FF"}},"pageDesc":"1. Post types:Stored in table wp_posts and column post_type in database  Post (Post Type: &lsquo;post&rsquo;)used for blogs mostly, {single, - Wordpress intro, Post types, file structure, and template Hierarchy (Updated: November 16, 2023) - Read more about Wordpress intro, Post types, file structure, and template Hierarchy at my programming site [SITE]","categories":[]}