-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage-about.php
More file actions
231 lines (218 loc) · 11.6 KB
/
page-about.php
File metadata and controls
231 lines (218 loc) · 11.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<?php
/*
Template Name: About Page
*/
get_header();
// Check if this page has Elementor data and auto-populate if empty
if (have_posts()) :
while (have_posts()) : the_post();
// Check if this page has Elementor data
$post_id = get_the_ID();
$elementor_data = get_post_meta($post_id, '_elementor_data', true);
// Debug: Always log what we find
error_log("About page loaded. Post ID: " . $post_id);
error_log("Existing Elementor data: " . (empty($elementor_data) ? 'EMPTY' : 'EXISTS'));
// If no Elementor data exists, create default structure
if (empty($elementor_data) || $elementor_data === '[]') {
error_log("Creating default Elementor content for About page");
// Create proper Elementor page structure matching the design
$default_content = [
[
'id' => '1a2b3c4d',
'elType' => 'section',
'settings' => [
'background_background' => 'classic',
'background_color' => '#1a1f2e',
'padding' => [
'unit' => 'px',
'top' => '100',
'right' => '20',
'bottom' => '100',
'left' => '20',
'isLinked' => false
]
],
'elements' => [
[
'id' => '2b3c4d5e',
'elType' => 'column',
'settings' => [
'_column_size' => 60,
'_inline_size' => null
],
'elements' => [
[
'id' => '3c4d5e6f',
'elType' => 'widget',
'widgetType' => 'heading',
'settings' => [
'title' => 'Expert DevOps Engineering from Croatia\'s Heartland',
'size' => 'xl',
'color' => '#ffffff',
'typography_typography' => 'custom',
'typography_font_size' => [
'unit' => 'px',
'size' => 48
],
'typography_line_height' => [
'unit' => 'em',
'size' => 1.2
]
]
],
[
'id' => '4d5e6f7g',
'elType' => 'widget',
'widgetType' => 'text-editor',
'settings' => [
'editor' => '<p>modul8.dev is a boutique DevOps and infrastructure automation studio based in Croatia. We partner with companies worldwide, embedding with your developers to deliver custom cloud-native infrastructure, IaC pipelines, and continuous delivery systems.</p><p style="margin-top: 20px;">We believe DevOps should feel seamless — code becomes deployment, deployment becomes production — all with ease and confidence.</p>',
'text_color' => '#94a3b8'
]
],
[
'id' => '5e6f7g8h',
'elType' => 'widget',
'widgetType' => 'icon-list',
'settings' => [
'icon_list' => [
[
'_id' => 'item1',
'text' => 'Fully integrated DevOps partnership',
'selected_icon' => [
'value' => 'fas fa-check',
'library' => 'fa-solid'
]
],
[
'_id' => 'item2',
'text' => 'Customized solutions (no one-size-fits-all)',
'selected_icon' => [
'value' => 'fas fa-check',
'library' => 'fa-solid'
]
],
[
'_id' => 'item3',
'text' => 'Developer productivity first',
'selected_icon' => [
'value' => 'fas fa-check',
'library' => 'fa-solid'
]
],
[
'_id' => 'item4',
'text' => 'Transparent and accountable from discovery to operations',
'selected_icon' => [
'value' => 'fas fa-check',
'library' => 'fa-solid'
]
]
],
'icon_color' => '#ef6c35',
'text_color' => '#ffffff'
]
]
]
],
[
'id' => '7g8h9i0j',
'elType' => 'column',
'settings' => [
'_column_size' => 40,
'_inline_size' => null
],
'elements' => [
[
'id' => '8h9i0j1k',
'elType' => 'widget',
'widgetType' => 'heading',
'settings' => [
'title' => 'DevOps Without the Hassle',
'size' => 'large',
'color' => '#ef6c35',
'align' => 'center'
]
],
[
'id' => '9i0j1k2l',
'elType' => 'widget',
'widgetType' => 'text-editor',
'settings' => [
'editor' => '<p style="text-align: center;">We don\'t just deliver tools — we bring a mindset. modul8.dev believes in partnerships that are agile, seamless from discovery and securely baked-in from the start.</p>',
'text_color' => '#94a3b8',
'align' => 'center'
]
]
]
]
]
],
[
'id' => '2l3m4n5o',
'elType' => 'section',
'settings' => [
'background_background' => 'classic',
'background_color' => '#1e2937',
'padding' => [
'unit' => 'px',
'top' => '80',
'right' => '20',
'bottom' => '80',
'left' => '20'
]
],
'elements' => [
[
'id' => '3m4n5o6p',
'elType' => 'column',
'settings' => [
'_column_size' => 100
],
'elements' => [
[
'id' => '4n5o6p7q',
'elType' => 'widget',
'widgetType' => 'heading',
'settings' => [
'title' => 'Meet the Team Behind Your Infrastructure',
'size' => 'xl',
'color' => '#ffffff',
'align' => 'center'
]
],
[
'id' => '5o6p7q8r',
'elType' => 'widget',
'widgetType' => 'text-editor',
'settings' => [
'editor' => '<p style="text-align: center;">Our team blends engineering rigor with automation fluency. From provisioning secure infrastructure to building repeatable CI/CD pipelines — we\'re not just tooling the stack, we\'re engineering peace of mind.</p>',
'text_color' => '#94a3b8',
'align' => 'center'
]
]
]
]
]
]
];
// Convert to JSON and save as Elementor data
$elementor_data_json = json_encode($default_content);
// Debug: Log the JSON data
error_log("Elementor data JSON: " . substr($elementor_data_json, 0, 200) . "...");
// Update post meta with Elementor data
update_post_meta($post_id, '_elementor_data', $elementor_data_json);
update_post_meta($post_id, '_elementor_edit_mode', 'builder');
update_post_meta($post_id, '_elementor_template_type', 'wp-page');
update_post_meta($post_id, '_elementor_version', '3.21.0');
update_post_meta($post_id, '_elementor_css', '');
// Clear any caches
if (class_exists('\Elementor\Plugin')) {
\Elementor\Plugin::$instance->files_manager->clear_cache();
}
error_log("Elementor data saved for page ID: " . $post_id);
}
// Display the content
the_content();
endwhile;
endif;
get_footer(); ?>