Commit 8fb385e6 by rajshah

fixed and done resource listing

parent f73d30cf
<section class="resource-listing py-80 makura-new"> <!-- Resources - Resources Listing -->
<div class="container"> <?php
<div class="row"> $resources_listing = get_field('resources_listing') ?: [];
<div class="col-lg-4 col-xl-3"> if (isset($resources_listing) && is_array($resources_listing) && !empty($resources_listing)):
<div class="toc slide-up"> $enable_resources_listing = $resources_listing['enable_resources_listing'];
<div class="category-list"> if ($enable_resources_listing):
<ul> $resources_items = $resources_listing['resources_items'] ?: [];
<li class="active"><a href="#" class="sm-text" if (isset($resources_items) && is_array($resources_items) && !empty($resources_items)):
data-target="business-and-administrative-documents">Business & ?>
Administrative Documents</a></li> <section class="resource-listing py-80 makura-new">
<li><a href="#" class="sm-text" data-target="branding-and-design-resources">Branding & Design <div class="container">
Resources</a></li> <div class="row">
<li><a href="#" class="sm-text" data-target="content-and-social-media-management">Content & Social Media <div class="col-lg-4 col-xl-3">
Management</a></li> <div class="toc slide-up">
<li><a href="#" class="sm-text" data-target="seo-and-digital-marketing">SEO & Digital Marketing</a></li> <div class="category-list">
<li><a href="#" class="sm-text" data-target="email-and-communication-tools">Email & Communication <ul>
Tools</a></li> <?php foreach ($resources_items as $ri => $res_item):
</ul> $title = $res_item['title'] ?: '';
</div> ?>
</div> <li class="<?php echo ($ri === 0) ? 'active' : ''; ?>"><a href="#" class="sm-text"
</div> data-target="<?php echo strtolower(str_replace(' ', '-', $title)); ?>"><?php echo esc_html($title); ?></a>
<div class="col-lg-8 col-xl-9"> </li>
<div class="resource-wrapper"> <?php endforeach; ?>
<div class="resource-block slide-up" id="business-and-administrative-documents"> </ul>
<div class="section-title">
<h2>Business & Administrative Documents</h2>
<p>Access essential business and administrative templates to streamline processes, manage documentation,
and maintain professionalism.</p>
</div>
<div class="resources">
<div class="row">
<div class="col-sm-6">
<div class="resource-item d-xl-flex justify-content-start slide-up">
<div class="resource-image">
<a href="#" class="d-block">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-02.png" alt=""
class="img-fluid">
</a>
</div>
<div class="resource-content">
<h6><a href="#">Mercantile Domain Registration Cover Letter</a></h6>
<P class="sm-text">Cover Letter Generator for personal and official registration.</P>
<div class="format-and-btn-wrapper d-flex justify-content-between">
<p class="sm-text">Format: <img
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="resource-item d-xl-flex justify-content-start slide-up">
<div class="resource-image">
<a href="#" class="d-block">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-03.png" alt=""
class="img-fluid">
</a>
</div>
<div class="resource-content">
<h6><a href="#">Mercantile Domain Ownership Transfer</a></h6>
<P class="sm-text">Cover Letter Generator for personal and official registration.</P>
<div class="format-and-btn-wrapper d-flex justify-content-between">
<p class="sm-text">Format: <img
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="resource-item d-xl-flex justify-content-start slide-up">
<div class="resource-image">
<a href="#" class="d-block">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-04.png" alt=""
class="img-fluid">
</a>
</div>
<div class="resource-content">
<h6><a href="#">Quote Template</a></h6>
<P class="sm-text">Register free Cover Letter Generator for .np domain registration for personal
and official registration.</P>
<div class="format-and-btn-wrapper d-flex justify-content-between">
<p class="sm-text">Format: <img
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="resource-item d-xl-flex justify-content-start slide-up">
<div class="resource-image">
<a href="#" class="d-block">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-05.png" alt=""
class="img-fluid">
</a>
</div>
<div class="resource-content">
<h6><a href="#">Invoice Template</a></h6>
<P class="sm-text">Register free Cover Letter Generator for .np domain registration for personal
and official registration.</P>
<div class="format-and-btn-wrapper d-flex justify-content-between">
<p class="sm-text">Format: <img
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="resource-item d-xl-flex justify-content-start slide-up">
<div class="resource-image">
<a href="#" class="d-block">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-06.png" alt=""
class="img-fluid">
</a>
</div>
<div class="resource-content">
<h6><a href="#">Proposal Template (PPT)</a></h6>
<P class="sm-text">Register free Cover Letter Generator for .np domain registration for personal
and official registration.</P>
<div class="format-and-btn-wrapper d-flex justify-content-between">
<p class="sm-text">Format: <img
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="resource-item d-xl-flex justify-content-start slide-up">
<div class="resource-image">
<a href="#" class="d-block">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-07.png" alt=""
class="img-fluid">
</a>
</div>
<div class="resource-content">
<h6><a href="#">Meeting Agenda Template</a></h6>
<P class="sm-text">Register free Cover Letter Generator for .np domain registration for personal
and official registration.</P>
<div class="format-and-btn-wrapper d-flex justify-content-between">
<p class="sm-text">Format: <img
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="resource-block slide-up" id="branding-and-design-resources">
<div class="section-title">
<h2>Branding & Design Resources</h2>
<p>Access essential business and administrative templates to streamline processes, manage documentation,
and maintain professionalism.</p>
</div>
<div class="resources">
<div class="row">
<div class="col-sm-6">
<div class="resource-item d-xl-flex justify-content-start slide-up">
<div class="resource-image">
<a href="#" class="d-block">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-02.png" alt=""
class="img-fluid">
</a>
</div>
<div class="resource-content">
<h6><a href="#">Mercantile Domain Registration Cover Letter</a></h6>
<P class="sm-text">Cover Letter Generator for personal and official registration.</P>
<div class="format-and-btn-wrapper d-flex justify-content-between">
<p class="sm-text">Format: <img
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="resource-item d-xl-flex justify-content-start slide-up">
<div class="resource-image">
<a href="#" class="d-block">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-03.png" alt=""
class="img-fluid">
</a>
</div>
<div class="resource-content">
<h6><a href="#">Mercantile Domain Ownership Transfer</a></h6>
<P class="sm-text">Cover Letter Generator for personal and official registration.</P>
<div class="format-and-btn-wrapper d-flex justify-content-between">
<p class="sm-text">Format: <img
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="resource-item d-xl-flex justify-content-start slide-up">
<div class="resource-image">
<a href="#" class="d-block">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-04.png" alt=""
class="img-fluid">
</a>
</div>
<div class="resource-content">
<h6><a href="#">Quote Template</a></h6>
<P class="sm-text">Register free Cover Letter Generator for .np domain registration for personal
and official registration.</P>
<div class="format-and-btn-wrapper d-flex justify-content-between">
<p class="sm-text">Format: <img
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="resource-item d-xl-flex justify-content-start slide-up">
<div class="resource-image">
<a href="#" class="d-block">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-05.png" alt=""
class="img-fluid">
</a>
</div>
<div class="resource-content">
<h6><a href="#">Invoice Template</a></h6>
<P class="sm-text">Register free Cover Letter Generator for .np domain registration for personal
and official registration.</P>
<div class="format-and-btn-wrapper d-flex justify-content-between">
<p class="sm-text">Format: <img
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="resource-item d-xl-flex justify-content-start slide-up">
<div class="resource-image">
<a href="#" class="d-block">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-06.png" alt=""
class="img-fluid">
</a>
</div>
<div class="resource-content">
<h6><a href="#">Proposal Template (PPT)</a></h6>
<P class="sm-text">Register free Cover Letter Generator for .np domain registration for personal
and official registration.</P>
<div class="format-and-btn-wrapper d-flex justify-content-between">
<p class="sm-text">Format: <img
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="resource-item d-xl-flex justify-content-start slide-up">
<div class="resource-image">
<a href="#" class="d-block">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-07.png" alt=""
class="img-fluid">
</a>
</div>
<div class="resource-content">
<h6><a href="#">Meeting Agenda Template</a></h6>
<P class="sm-text">Register free Cover Letter Generator for .np domain registration for personal
and official registration.</P>
<div class="format-and-btn-wrapper d-flex justify-content-between">
<p class="sm-text">Format: <img
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> <div class="col-lg-8 col-xl-9">
<div class="resource-block slide-up" id="content-and-social-media-management"> <div class="resource-wrapper">
<div class="section-title"> <?php foreach ($resources_items as $ri => $res_item):
<h2>Content & Social Media Management</h2> $title = $res_item['title'] ?: '';
<p>Access essential business and administrative templates to streamline processes, manage documentation, $desc = $res_item['desc'] ?: '';
and maintain professionalism.</p> $select_resources = $res_item['select_resources'] ?: [];
</div> ?>
<div class="resources"> <div class="resource-block slide-up" id="<?php echo strtolower(str_replace(' ', '-', $title)); ?>">
<div class="row"> <div class="section-title">
<div class="col-sm-6"> <?php if (!empty($title)): ?>
<div class="resource-item d-xl-flex justify-content-start slide-up"> <h2><?php echo $title; ?></h2><?php endif; ?>
<div class="resource-image"> <?php if (!empty($desc)):
<a href="#" class="d-block"> echo $desc ?: '';
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-02.png" alt="" endif; ?>
class="img-fluid"> </div>
</a> <?php if (!empty($select_resources) && isset($select_resources) && is_array($select_resources)): ?>
</div> <div class="resources">
<div class="resource-content"> <div class="row">
<h6><a href="#">Mercantile Domain Registration Cover Letter</a></h6> <?php foreach ($select_resources as $sel_res):
<P class="sm-text">Cover Letter Generator for personal and official registration.</P> if ($sel_res instanceof WP_Post) {
<div class="format-and-btn-wrapper d-flex justify-content-between"> $post_id = $sel_res->ID;
<p class="sm-text">Format: <img $post_url = get_permalink($post_id);
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p> $post_title = $sel_res->post_title;
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a> $post_thumbnail_url = get_the_post_thumbnail_url($post_id, 'full');
</div> if (!$post_thumbnail_url) {
</div> $post_thumbnail_url = get_field('resources_fallback_featured_image', 'option');
</div> }
</div> $post_content = $sel_res->post_content;
<div class="col-sm-6"> $post_excerpt = $sel_res->post_excerpt;
<div class="resource-item d-xl-flex justify-content-start slide-up"> ?>
<div class="resource-image"> <div class="col-sm-6">
<a href="#" class="d-block"> <div class="resource-item d-xl-flex justify-content-start slide-up">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-03.png" alt="" <div class="resource-image">
class="img-fluid"> <a href="<?php echo esc_url($post_url); ?>" class="d-block">
</a> <img src="<?php echo esc_url($post_thumbnail_url); ?>"
</div> alt="<?php echo esc_attr($post_title); ?>" class="img-fluid">
<div class="resource-content"> </a>
<h6><a href="#">Mercantile Domain Ownership Transfer</a></h6> </div>
<P class="sm-text">Cover Letter Generator for personal and official registration.</P> <div class="resource-content">
<div class="format-and-btn-wrapper d-flex justify-content-between"> <h6><a href="<?php echo esc_url($post_url); ?>">
<p class="sm-text">Format: <img <?php echo esc_html($post_title); ?></a></h6>
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p> <P class="sm-text">
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a> <?php echo wp_trim_words($post_excerpt, 8, '...') ?: wp_trim_words($post_content, 8, '...'); ?>
</div> </P>
</div> <div class="format-and-btn-wrapper d-flex justify-content-between">
</div> <?php
</div> $downloadable_resource = get_field('downloadable_resource', $post_id) ?: [];
<div class="col-sm-6"> if (isset($downloadable_resource) && is_array($downloadable_resource) && !empty($downloadable_resource)):
<div class="resource-item d-xl-flex justify-content-start slide-up"> $enable_downloadable_resources = $downloadable_resource['enable_downloadable_resources'];
<div class="resource-image"> if ($enable_downloadable_resources && isset($enable_downloadable_resources)):
<a href="#" class="d-block"> $upload_downloadable_resource = $downloadable_resource['upload_downloadable_resource'] ?: [];
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-04.png" alt="" $url = $upload_downloadable_resource['url'];
class="img-fluid"> $subtype = $upload_downloadable_resource['subtype'];
</a> switch (strtolower($subtype)) {
</div> case 'pdf':
<div class="resource-content"> $icon_url = '/assets/img/pdf-icon.png';
<h6><a href="#">Quote Template</a></h6> break;
<P class="sm-text">Register free Cover Letter Generator for .np domain registration for personal case 'doc':
and official registration.</P> case 'docx':
<div class="format-and-btn-wrapper d-flex justify-content-between"> $icon_url = '/assets/img/word-icon.png';
<p class="sm-text">Format: <img break;
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p> case 'xls':
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a> case 'xlsx':
</div> $icon_url = '/assets/img/excel-icon.png';
</div> break;
</div> case 'ppt':
</div> case 'pptx':
<div class="col-sm-6"> $icon_url = '/assets/img/ppt-icon.png';
<div class="resource-item d-xl-flex justify-content-start slide-up"> break;
<div class="resource-image"> default:
<a href="#" class="d-block"> $icon_url = '/assets/img/pdf-icon.png';
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-05.png" alt="" }
class="img-fluid"> endif;
</a> endif;
</div> ?>
<div class="resource-content"> <p class="sm-text">Format: <img
<h6><a href="#">Invoice Template</a></h6> src="<?php echo get_parent_theme_file_uri() . $icon_url; ?>" alt="<?php echo esc_attr($subtype);?>"></p>
<P class="sm-text">Register free Cover Letter Generator for .np domain registration for personal <a href="<?php echo esc_url($post_url); ?>" class="mc-btn-underlined sm-text">View in
and official registration.</P> Detail</a>
<div class="format-and-btn-wrapper d-flex justify-content-between"> </div>
<p class="sm-text">Format: <img </div>
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p> </div>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a> </div>
</div> <?php }endforeach; ?>
</div> </div>
</div> </div>
</div> <?php endif; ?>
<div class="col-sm-6"> </div>
<div class="resource-item d-xl-flex justify-content-start slide-up"> <?php endforeach; ?>
<div class="resource-image">
<a href="#" class="d-block">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-06.png" alt=""
class="img-fluid">
</a>
</div>
<div class="resource-content">
<h6><a href="#">Proposal Template (PPT)</a></h6>
<P class="sm-text">Register free Cover Letter Generator for .np domain registration for personal
and official registration.</P>
<div class="format-and-btn-wrapper d-flex justify-content-between">
<p class="sm-text">Format: <img
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="resource-item d-xl-flex justify-content-start slide-up">
<div class="resource-image">
<a href="#" class="d-block">
<img src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/placeholder-07.png" alt=""
class="img-fluid">
</a>
</div>
<div class="resource-content">
<h6><a href="#">Meeting Agenda Template</a></h6>
<P class="sm-text">Register free Cover Letter Generator for .np domain registration for personal
and official registration.</P>
<div class="format-and-btn-wrapper d-flex justify-content-between">
<p class="sm-text">Format: <img
src="<?php echo get_parent_theme_file_uri(); ?>/assets/img/pdf-icon.png" alt=""></p>
<a href="#" class="mc-btn-underlined sm-text">View in Detail</a>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </section>
</div> <?php endif; endif; endif; ?>
</div> <!-- !Resources - Resources Listing -->
</section> \ No newline at end of file
\ No newline at end of file
...@@ -758,7 +758,7 @@ function my_acf_init_block_types() ...@@ -758,7 +758,7 @@ function my_acf_init_block_types()
// Resources - Resources Listing Block // Resources - Resources Listing Block
acf_register_block_type(array( acf_register_block_type(array(
'name' => 'Resources - Resources Listing Block', 'name' => 'Resources - Resources Listing Block',
'title' => __('Competitive Analysis Form Block'), 'title' => __('Resources Listing Block'),
'description' => __('Resources - Resources Listing Block for SEO Pages'), 'description' => __('Resources - Resources Listing Block for SEO Pages'),
'render_template' => 'blocks/resources/resource-listing.php', 'render_template' => 'blocks/resources/resource-listing.php',
'category' => 'formatting', 'category' => 'formatting',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment