Browse Source

Added: more fields

Mozahidur Rahman 1 năm trước cách đây
mục cha
commit
5cd4c0f011

+ 7 - 0
css/theme-styles.css

@@ -1643,4 +1643,11 @@ button:focus {
   .banner-overlay h3,
   .banner-overlay h4 {
     color: #edf0f3;
+}
+
+.container.full-width {
+  padding: 0!important;
+}
+header.entry-header {
+  display: none!important;
 }

+ 1 - 1
functions.php

@@ -195,7 +195,7 @@ if (defined('JETPACK__VERSION')) {
 
 
 /**
- * Custom Include files anf folders
+ * Theme option and custom fields settings
  */
 
 // ACF

+ 3 - 3
inc/acf-json/group_642a9b2379fbe.json

@@ -74,7 +74,7 @@
             "min": 0,
             "max": 0,
             "collapsed": "",
-            "button_label": "Add another slide",
+            "button_label": "Add a new slide",
             "rows_per_page": 20,
             "sub_fields": [
                 {
@@ -279,7 +279,7 @@
             "min": 0,
             "max": 0,
             "collapsed": "",
-            "button_label": "Add another slide",
+            "button_label": "Add a new slide",
             "rows_per_page": 20,
             "sub_fields": [
                 {
@@ -431,5 +431,5 @@
     "active": true,
     "description": "",
     "show_in_rest": 0,
-    "modified": 1680514932
+    "modified": 1680521746
 }

+ 77 - 52
inc/acf-json/group_642aa09ae85e7.json

@@ -20,6 +20,31 @@
             "new_lines": "wpautop",
             "esc_html": 0
         },
+        {
+            "key": "field_642b5d933dba3",
+            "label": "Profile Photo",
+            "name": "profile_photo",
+            "aria-label": "",
+            "type": "image",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "",
+                "class": "",
+                "id": ""
+            },
+            "return_format": "",
+            "library": "",
+            "min_width": "",
+            "min_height": "",
+            "min_size": "",
+            "max_width": "",
+            "max_height": "",
+            "max_size": "",
+            "mime_types": "",
+            "preview_size": "medium"
+        },
         {
             "key": "field_642aa09bc163e",
             "label": "Name",
@@ -79,7 +104,7 @@
             "min": 0,
             "max": 0,
             "collapsed": "",
-            "button_label": "Add new contact",
+            "button_label": "Add a new contact",
             "rows_per_page": 20,
             "sub_fields": [
                 {
@@ -106,9 +131,9 @@
             ]
         },
         {
-            "key": "field_642ab387c50c9",
-            "label": "Main Information",
-            "name": "main_information",
+            "key": "field_642ab4bdc50ce",
+            "label": "Social Networks",
+            "name": "social_networks",
             "aria-label": "",
             "type": "repeater",
             "instructions": "",
@@ -124,15 +149,15 @@
             "min": 0,
             "max": 0,
             "collapsed": "",
-            "button_label": "Add another information",
+            "button_label": "Add a new network",
             "rows_per_page": 20,
             "sub_fields": [
                 {
-                    "key": "field_642ab3bcc50ca",
-                    "label": "Title",
-                    "name": "title",
+                    "key": "field_642ab4d1c50cf",
+                    "label": "Select the network",
+                    "name": "select_the_network",
                     "aria-label": "",
-                    "type": "text",
+                    "type": "select",
                     "instructions": "",
                     "required": 0,
                     "conditional_logic": 0,
@@ -141,19 +166,27 @@
                         "class": "",
                         "id": ""
                     },
-                    "default_value": "",
-                    "maxlength": "",
+                    "choices": {
+                        "fb": "Facebook",
+                        "tw": "Twitter",
+                        "ln": "Linkedin",
+                        "Web": "Other"
+                    },
+                    "default_value": false,
+                    "return_format": "value",
+                    "multiple": 0,
+                    "allow_null": 0,
+                    "ui": 0,
+                    "ajax": 0,
                     "placeholder": "",
-                    "prepend": "",
-                    "append": "",
-                    "parent_repeater": "field_642ab387c50c9"
+                    "parent_repeater": "field_642ab4bdc50ce"
                 },
                 {
-                    "key": "field_642ab3d4c50cb",
-                    "label": "Contents",
-                    "name": "contents",
+                    "key": "field_642ab563c50d0",
+                    "label": "Network URL",
+                    "name": "network_url",
                     "aria-label": "",
-                    "type": "wysiwyg",
+                    "type": "url",
                     "instructions": "",
                     "required": 0,
                     "conditional_logic": 0,
@@ -163,18 +196,15 @@
                         "id": ""
                     },
                     "default_value": "",
-                    "tabs": "all",
-                    "toolbar": "full",
-                    "media_upload": 1,
-                    "delay": 0,
-                    "parent_repeater": "field_642ab387c50c9"
+                    "placeholder": "",
+                    "parent_repeater": "field_642ab4bdc50ce"
                 }
             ]
         },
         {
-            "key": "field_642ab4bdc50ce",
-            "label": "Social Networks",
-            "name": "social_networks",
+            "key": "field_642ab387c50c9",
+            "label": "Main Information",
+            "name": "main_information",
             "aria-label": "",
             "type": "repeater",
             "instructions": "",
@@ -185,20 +215,20 @@
                 "class": "",
                 "id": ""
             },
-            "layout": "table",
+            "layout": "row",
             "pagination": 0,
             "min": 0,
             "max": 0,
             "collapsed": "",
-            "button_label": "Add new social network",
+            "button_label": "Add another information",
             "rows_per_page": 20,
             "sub_fields": [
                 {
-                    "key": "field_642ab4d1c50cf",
-                    "label": "Select the network",
-                    "name": "select_the_network",
+                    "key": "field_642ab3bcc50ca",
+                    "label": "Title",
+                    "name": "title",
                     "aria-label": "",
-                    "type": "select",
+                    "type": "text",
                     "instructions": "",
                     "required": 0,
                     "conditional_logic": 0,
@@ -207,27 +237,19 @@
                         "class": "",
                         "id": ""
                     },
-                    "choices": {
-                        "fb": "Facebook",
-                        "tw": "Twitter",
-                        "ln": "Linkedin",
-                        "Web": "Other"
-                    },
-                    "default_value": false,
-                    "return_format": "value",
-                    "multiple": 0,
-                    "allow_null": 0,
-                    "ui": 0,
-                    "ajax": 0,
+                    "default_value": "",
+                    "maxlength": "",
                     "placeholder": "",
-                    "parent_repeater": "field_642ab4bdc50ce"
+                    "prepend": "",
+                    "append": "",
+                    "parent_repeater": "field_642ab387c50c9"
                 },
                 {
-                    "key": "field_642ab563c50d0",
-                    "label": "Network URL",
-                    "name": "network_url",
+                    "key": "field_642ab3d4c50cb",
+                    "label": "Contents",
+                    "name": "contents",
                     "aria-label": "",
-                    "type": "url",
+                    "type": "wysiwyg",
                     "instructions": "",
                     "required": 0,
                     "conditional_logic": 0,
@@ -237,8 +259,11 @@
                         "id": ""
                     },
                     "default_value": "",
-                    "placeholder": "",
-                    "parent_repeater": "field_642ab4bdc50ce"
+                    "tabs": "all",
+                    "toolbar": "full",
+                    "media_upload": 1,
+                    "delay": 0,
+                    "parent_repeater": "field_642ab387c50c9"
                 }
             ]
         }
@@ -261,5 +286,5 @@
     "active": true,
     "description": "",
     "show_in_rest": 0,
-    "modified": 1680521046
+    "modified": 1680563662
 }

+ 126 - 0
inc/acf-json/group_642b6746320a8.json

@@ -0,0 +1,126 @@
+{
+    "key": "group_642b6746320a8",
+    "title": "All events",
+    "fields": [
+        {
+            "key": "field_642b67c31e6e2",
+            "label": "Event Image",
+            "name": "event_image",
+            "aria-label": "",
+            "type": "image",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "",
+                "class": "",
+                "id": ""
+            },
+            "return_format": "url",
+            "library": "all",
+            "min_width": "",
+            "min_height": "",
+            "min_size": "",
+            "max_width": "",
+            "max_height": "",
+            "max_size": "",
+            "mime_types": "",
+            "preview_size": "medium"
+        },
+        {
+            "key": "field_642b67461e6de",
+            "label": "Event Name",
+            "name": "event_name",
+            "aria-label": "",
+            "type": "text",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "",
+                "class": "",
+                "id": ""
+            },
+            "default_value": "",
+            "maxlength": "",
+            "placeholder": "",
+            "prepend": "",
+            "append": ""
+        },
+        {
+            "key": "field_642b67951e6e0",
+            "label": "Event Date",
+            "name": "event_date",
+            "aria-label": "",
+            "type": "date_picker",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "50",
+                "class": "",
+                "id": ""
+            },
+            "display_format": "d\/m\/Y",
+            "return_format": "d\/m\/Y",
+            "first_day": 1
+        },
+        {
+            "key": "field_642b67a11e6e1",
+            "label": "Event Time",
+            "name": "event_time",
+            "aria-label": "",
+            "type": "date_time_picker",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "50",
+                "class": "",
+                "id": ""
+            },
+            "display_format": "d\/m\/Y g:i a",
+            "return_format": "d\/m\/Y g:i a",
+            "first_day": 1
+        },
+        {
+            "key": "field_642b675b1e6df",
+            "label": "Event Details",
+            "name": "event_details",
+            "aria-label": "",
+            "type": "wysiwyg",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "",
+                "class": "",
+                "id": ""
+            },
+            "tabs": "all",
+            "toolbar": "full",
+            "media_upload": 1,
+            "default_value": "",
+            "delay": 0
+        }
+    ],
+    "location": [
+        [
+            {
+                "param": "options_page",
+                "operator": "==",
+                "value": "acf-options-event-settings"
+            }
+        ]
+    ],
+    "menu_order": 0,
+    "position": "normal",
+    "style": "default",
+    "label_placement": "top",
+    "instruction_placement": "label",
+    "hide_on_screen": "",
+    "active": true,
+    "description": "",
+    "show_in_rest": 0,
+    "modified": 1680566828
+}

+ 108 - 0
inc/acf-json/group_642b681749965.json

@@ -0,0 +1,108 @@
+{
+    "key": "group_642b681749965",
+    "title": "All News",
+    "fields": [
+        {
+            "key": "field_642b68175cea0",
+            "label": "News Image",
+            "name": "news_image",
+            "aria-label": "",
+            "type": "image",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "",
+                "class": "",
+                "id": ""
+            },
+            "return_format": "url",
+            "library": "all",
+            "min_width": "",
+            "min_height": "",
+            "min_size": "",
+            "max_width": "",
+            "max_height": "",
+            "max_size": "",
+            "mime_types": "",
+            "preview_size": "medium"
+        },
+        {
+            "key": "field_642b681751eee",
+            "label": "New Title",
+            "name": "news_title",
+            "aria-label": "",
+            "type": "text",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "",
+                "class": "",
+                "id": ""
+            },
+            "default_value": "",
+            "maxlength": "",
+            "placeholder": "",
+            "prepend": "",
+            "append": ""
+        },
+        {
+            "key": "field_642b681755962",
+            "label": "News Date",
+            "name": "news_date",
+            "aria-label": "",
+            "type": "date_picker",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "",
+                "class": "",
+                "id": ""
+            },
+            "display_format": "d\/m\/Y",
+            "return_format": "d\/m\/Y",
+            "first_day": 1
+        },
+        {
+            "key": "field_642b681760a4e",
+            "label": "News Details",
+            "name": "news_details",
+            "aria-label": "",
+            "type": "wysiwyg",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "",
+                "class": "",
+                "id": ""
+            },
+            "default_value": "",
+            "tabs": "all",
+            "toolbar": "full",
+            "media_upload": 1,
+            "delay": 0
+        }
+    ],
+    "location": [
+        [
+            {
+                "param": "options_page",
+                "operator": "==",
+                "value": "acf-options-news-settings"
+            }
+        ]
+    ],
+    "menu_order": 0,
+    "position": "normal",
+    "style": "default",
+    "label_placement": "top",
+    "instruction_placement": "label",
+    "hide_on_screen": "",
+    "active": true,
+    "description": "",
+    "show_in_rest": 0,
+    "modified": 1680566812
+}

+ 110 - 0
inc/acf-json/group_642b68725c729.json

@@ -0,0 +1,110 @@
+{
+    "key": "group_642b68725c729",
+    "title": "All Stories",
+    "fields": [
+        {
+            "key": "field_642b68726e942",
+            "label": "Profile Image",
+            "name": "profile_image",
+            "aria-label": "",
+            "type": "image",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "",
+                "class": "",
+                "id": ""
+            },
+            "return_format": "",
+            "library": "",
+            "min_width": "",
+            "min_height": "",
+            "min_size": "",
+            "max_width": "",
+            "max_height": "",
+            "max_size": "",
+            "mime_types": "",
+            "preview_size": "medium"
+        },
+        {
+            "key": "field_642b68726395d",
+            "label": "Student Name",
+            "name": "student_name",
+            "aria-label": "",
+            "type": "text",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "",
+                "class": "",
+                "id": ""
+            },
+            "default_value": "",
+            "maxlength": "",
+            "placeholder": "",
+            "prepend": "",
+            "append": ""
+        },
+        {
+            "key": "field_642b689ad9ac5",
+            "label": "Student Designation",
+            "name": "student_designation",
+            "aria-label": "",
+            "type": "text",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "",
+                "class": "",
+                "id": ""
+            },
+            "default_value": "",
+            "maxlength": "",
+            "placeholder": "",
+            "prepend": "",
+            "append": ""
+        },
+        {
+            "key": "field_642b6872723e4",
+            "label": "Student Story",
+            "name": "student_story",
+            "aria-label": "",
+            "type": "wysiwyg",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "",
+                "class": "",
+                "id": ""
+            },
+            "default_value": "",
+            "tabs": "all",
+            "toolbar": "full",
+            "media_upload": 1,
+            "delay": 0
+        }
+    ],
+    "location": [
+        [
+            {
+                "param": "options_page",
+                "operator": "==",
+                "value": "acf-options-student-story"
+            }
+        ]
+    ],
+    "menu_order": 0,
+    "position": "normal",
+    "style": "default",
+    "label_placement": "top",
+    "instruction_placement": "label",
+    "hide_on_screen": "",
+    "active": true,
+    "description": "",
+    "show_in_rest": 0,
+    "modified": 1680566495
+}

+ 20 - 5
inc/acf-settings.php

@@ -1,7 +1,7 @@
 <?php
 
 // Hide ACF field group menu item
-// add_filter('acf/settings/show_admin', '__return_false');
+add_filter('acf/settings/show_admin', '__return_false');
 
 // Customize ACF path
 add_filter('acf/settings/path', 'my_acf_settings_path');
@@ -58,10 +58,7 @@ function my_acf_json_load_point($paths)
     return $paths;
 }
 
-
-/**************
-  Options Page
- ***************/
+//   Theme Options
 if (function_exists('acf_add_options_page')) {
 
     acf_add_options_page(array(
@@ -78,6 +75,24 @@ if (function_exists('acf_add_options_page')) {
         'parent_slug'    => 'uiu-cse-general-settings',
     ));
 
+    acf_add_options_sub_page(array(
+        'page_title'     => 'Department of CSE: Event Settings',
+        'menu_title'    => 'Event Settings',
+        'parent_slug'    => 'uiu-cse-general-settings',
+    ));
+
+    acf_add_options_sub_page(array(
+        'page_title'     => 'Department of CSE: News Settings',
+        'menu_title'    => 'News Settings',
+        'parent_slug'    => 'uiu-cse-general-settings',
+    ));
+
+    acf_add_options_sub_page(array(
+        'page_title'     => 'Department of CSE: Student Story',
+        'menu_title'    => 'Student Story',
+        'parent_slug'    => 'uiu-cse-general-settings',
+    ));
+
     // acf_add_options_sub_page(array(
     // 	'page_title' 	=> 'Theme Footer Settings',
     // 	'menu_title'	=> 'Footer',