Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
makura-2025
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Raj Shah
makura-2025
Commits
7afda33b
Commit
7afda33b
authored
Feb 04, 2025
by
rajshah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip resources listing
parent
25a2aac5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
131 additions
and
29 deletions
+131
-29
custom-banner-with-right-image.php
blocks/custom-banner-with-right-image.php
+28
-27
functions.php
functions.php
+47
-2
single-resource.php
single-resource.php
+56
-0
No files found.
blocks/custom-banner-with-right-image.php
View file @
7afda33b
<?php
if
(
get_field
(
'enable_section'
))
:
?>
<!--
<?php
if
(
get_field
(
'enable_section'
))
:
?>
<!--
if(absolute image){
$(section).addClass(".inner-banner-absolute-image)
}
-->
<section class="
background
-
dark
pb
-
60
ABOUT
TOP
-
BANNER
-
SECTION
inner
-
banner
-
absolute
-
image
">
<div class="
container
">
<div class="
inner
-
banner
-
wrapper
">
<div class="
row
align
-
items
-
center
justify
-
content
-
between
">
<div class="
col
-
lg
-
6
col
-
12
">
<div class="
position
-
relative
left
-
text
-
wrapper
">
<?php the_field('description');
?>
<section
class=
"background-dark pb-60 ABOUT TOP-BANNER-SECTION inner-banner-absolute-image"
>
<div
class=
"container"
>
<div
class=
"inner-banner-wrapper"
>
<div
class=
"row align-items-center justify-content-between"
>
<div
class=
"col-lg-6 col-12"
>
<div
class=
"position-relative left-text-wrapper"
>
<?php
the_field
(
'description'
);
?>
<a href="
#"
class
="
btn
btn
-
primary
btn
-
padding
hover
-
up
btn
-
start
-
project
font
-
14
fw
-
500
btn
-
padding
btn
-
submit
">Download
Now [PDF]</a>
<a
href=
"#"
class=
"btn btn-primary btn-padding hover-up btn-start-project font-14 fw-500 btn-padding btn-submit"
>
Download
Now [PDF]
</a>
</div>
</div>
</div
>
<div class="
col
-
lg
-
5
col
-
md
-
5
mx
-
auto
col
-
12
text
-
center
right
-
image
">
<div class="
image
-
wrapper
">
<div class="
image
">
<!--<?php if(
$image
= get_field('image')): echo wp_get_attachment_image(
$image
); endif;
?>-->
<div
class=
"col-lg-5 col-md-5 mx-auto col-12 text-center right-image"
>
<div
class=
"image-wrapper
"
>
<div
class=
"image
"
>
<!--
<?php
if
(
$image
=
get_field
(
'image'
))
:
echo
wp_get_attachment_image
(
$image
);
endif
;
?>
-->
<?php
$image
= get_field('image');
$size
= 'full';
if (
$image
) {
echo wp_get_attachment_image(
$image
,
$size
);
} ?>
<?php
$image
=
get_field
(
'image'
);
$size
=
'full'
;
if
(
$image
)
{
echo
wp_get_attachment_image
(
$image
,
$size
);
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<?php endif;?>
\ No newline at end of file
</section>
<?php
endif
;
?>
\ No newline at end of file
functions.php
View file @
7afda33b
...
...
@@ -400,4 +400,49 @@ function calculate_reading_time($content)
$reading_time
=
ceil
(
$word_count
/
$reading_speed
);
return
$reading_time
;
}
//
!
article
read
time
\ No newline at end of file
// !article read time
//
//
//
//
// Define the CF7 API endpoint and form ID
// $form_id = '504'; // Replace with your actual form ID
// $api_url = 'http://localhost/makura/wp-json/contact-form-7/v1/contact-forms/' . $form_id . '/feedback';
// // Prepare data to send
// $data = array(
// 'first_name' => 'John', // Correspond to CF7 field names
// 'last_name' => 'Doe', // Correspond to CF7 field names
// 'email' => 'john@example.com',
// );
// // WordPress user credentials (use your admin username and the application password)
// $username = 'makura_user'; // Replace with your WordPress username
// $app_password = 'makura_backend@2024'; // Replace with your generated application password
// // Initialize cURL session
// $ch = curl_init($api_url);
// // Set cURL options
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// curl_setopt($ch, CURLOPT_POST, true);
// curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
// curl_setopt($ch, CURLOPT_HTTPHEADER, array(
// 'Authorization: Basic ' . base64_encode($username . ':' . $app_password)
// ));
// // Execute the cURL request and get the response
// $response = curl_exec($ch);
// // Check for cURL errors
// if ($response === false) {
// echo 'Error: ' . curl_error($ch);
// } else {
// echo 'Response: ' . $response;
// }
// // Close cURL session
//
curl_close
(
$ch
);
\ No newline at end of file
single-resource.php
0 → 100644
View file @
7afda33b
<?php
// Single Resources
get_header
();
?>
<div
class=
"container-fluid py-40 background-dark blog-breadcrumb-background-dark breadcrumb-background-dark py-40"
>
<div
class=
"container"
>
<div
class=
"row"
>
<nav
aria-label=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li
class=
"breadcrumb-item"
><a
href=
"
<?php
echo
site_url
(
'/'
);
?>
"
>
Home
</a></li>
<li
class=
"breadcrumb-item"
><a
href=
"
<?php
echo
get_permalink
(
get_page_by_path
(
'services'
));
?>
"
>
Resources
</a></li>
<li
class=
"breadcrumb-item active"
aria-current=
"page"
>
<?php
the_title
();
?>
</li>
</ol>
</nav>
</div>
</div>
</div>
<?php
$downloadable_resource
=
get_field
(
'downloadable_resource'
)
?:
[];
if
(
isset
(
$downloadable_resource
)
&&
is_array
(
$downloadable_resource
)
&&
!
empty
(
$downloadable_resource
))
:
$enable_downloadable_resources
=
$downloadable_resource
[
'enable_downloadable_resources'
];
if
(
$enable_downloadable_resources
&&
isset
(
$enable_downloadable_resources
))
:
$upload_downloadable_resource
=
$downloadable_resource
[
'upload_downloadable_resource'
]
?:
[];
// var_dump($upload_downloadable_resource);
$url
=
$upload_downloadable_resource
[
'url'
];
var_dump
(
$url
);
$subtype
=
$upload_downloadable_resource
[
'subtype'
];
var_dump
(
$subtype
);
switch
(
strtolower
(
$subtype
))
{
case
'pdf'
:
$icon_url
=
'/pdf-icon.png'
;
break
;
case
'doc'
:
case
'docx'
:
$icon_url
=
'/word-icon.png'
;
break
;
case
'xls'
:
case
'xlsx'
:
$icon_url
=
'/excel-icon.png'
;
break
;
case
'ppt'
:
case
'pptx'
:
$icon_url
=
'/ppt-icon.png'
;
break
;
default
:
$icon_url
=
'/default-icon.png'
;
}
var_dump
(
$icon_url
);
endif
;
endif
;
?>
<?php
get_template_part
(
'/blocks/faqs-block'
);
?>
<?php
get_footer
();
?>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment