RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð ....................................../////.===Shadow-Here===./////................................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð enü¹%½_F‘åè¿2ºQú³íªú`N¿­3ÿƒügµJžaÿ¯ÿ°~¼ÎùnúîÞÖô•òíôÁÉß®Sm¥Ü/ ‡ó˜f£Ùà<˜„xëJ¢Ù€SO3x<ªÔ©4¿+ç¶A`q@Ì“Úñè™ÍÿJÌ´ª-˜ÆtÊÛL]Ïq*‘Ý”ì#ŸÌÏãY]@ê`¿ /ªfkØB4·®£ó z—Üw¥Pxù–ÞLШKÇN¾AkÙTf½è'‰g gÆv›Øuh~ a˜Z— ïj*á¥t d£“uÒ ¨`K˜¹ßþ]b>˜]_ÏÔ6W—è2r4x•íÖ…"ƒÖNîä!¦å Ú}ýxGøÌ —@ ;ÆÚŠ=ɾ1ý8lªË¥ô ^yf®Œ¢u&2©nÙÇ›ñÂñŒ³ aPo['½»øFùà­+4ê“$!lövlüÞ=;N®3ð‚õ›DÉKòÞ>ÄÍ ¥ˆuߤ#ˆ$6ù™¥îЇy’ÍB¼ çxÛ;X"WL£R÷͝*ó-¶Zu}º.s¸sšXqù–DþÿvªhüïwyŸ ¯é³lÀ:KCûÄ£Ëá\…­ ~—ýóî ¼ûûÜTÓüÇy…ŽÆvc»¾×U ñ¸žþоP÷¦ó:Ò¨¨5;Ð#&#ÖúñläÿÁœ GxÉ­/ñ‡áQðìYÉtÒw޼GÔ´zàÒò ð*ëzƒ•4~H]Ø‹f ñÓÈñ`NåWçs'ÆÏW^ø¹!XžµmQ5ÃËoLœÎ: ÞËÍ¥J ù…î èo£ßPÎñ¶ž8.Œ]ʵ~5›ÙË-ù*8ÙÖß±~ ©¹rÓê‚j¶d¸{^Q'˜±Crß ÚH—#¥¥QlÀ×ëã‡DÜ«èî þ&Çæžî;ŽÏºò6ÒLÃXy&ZŒ'j‚¢Ù€IßÚù+–MGi‰*jE€‘JcÜ ÓÌ EÏÚj]o˜ Þr <¾U ûŪæÍ/šÝH¥˜b”¼ ÁñßX GP›ï2›4WŠÏà×£…íÓk†¦H·ÅíMh–*nó÷à]ÁjCº€b7<ب‹¨5車bp2:Á[UªM„QŒçiNMa#<5›áËó¸HýÊ"…×Éw¹¦ì2º–x<›»a±¸3Weü®FÝ⑱ö–î–³|LPÈ~çð~Çå‡|º kD¢µÏàÆAI %1À% ¹Ò – ”ϝS¦‰4&¶£°à Öý”û_Ò Áw°A«Å€?mÇÛgHÉ/8)á¾ÛìáöŽP í¨PŸNÙµº¦‡§Ùš"ÿ«>+ªÕ`Ê÷‡‚ß Õû˜þãÇ-PÍ.¾XV‘€ dÜ"þ4¹ ±Oú‘©t¥¦FªÄÃÄ•b‚znýu½—#cDs˜ÃiÑOˆñ×QO=*IAÊ,¶ŽZƒ;‡wøXè%EÐk:F±Ú” .Ѽ+Áu&Ç`."pÈÉw o&¿dE6‘’EqTuK@Ì¥ã™À(Êk(h‰,H}RÀIXÛš3µ1©_OqÚÒJAñ$ÊÙÜ;D3çŒ[þùœh¬Ã³™ö6ç†NY".Ú‰ï[ªŸŒ '²Ð öø_¨ÂÉ9ué¶³ÒŠõTàîMØ#û¯gN‡bÙ놚X„ö …ÉeüÌ^J ‹€.œ$Æ)βÄeæW#óüßĺŸ€ ÀzwV 9oä»f4V*uB «Ë†¹ì¯žR霓æHXa=&“I4K;¯ç‹h×·"UŠ~<•╪Vêª&ÍSÃÆÅ?ÔqÎ*mTM ˜›µwêd#[C¡©§‘D<©àb†–ÁœøvH/,í:¯( ²£|4-„Æövv„Yͼ™^Á$ˆ„¢Û[6yB.åH*V¨æ?$=˜Ñ€•ñ·­(VlŸ‘ nÀt8W÷´Bûba?q9ú¶Xƒl«ÿ\ù¶’þòUÐj/õ¢Ìµ³g$ƒÎR!¸»|Oߍë’BhîÚÑ¢ñåŒJ„®„£2Ð3•ô02Nt…!£Í]Ïc½Qÿ?ˆ<&ÃA¾Ú,JˆijÌ#5yz„‰Î|ÊŽ5QÏ:‹ÐaóVÔxW—CpeÏzÐïíçôÿÅ_[hãsÐ_/ŽTÝ?BîˆííV$<¿i>²F¬_Eß¿ †bÊŒº­ÿ®Z H“C}”¬,Mp ý/Bá£w>˜YV°aƒúh+cŠ- r/[%|üUMHäQ°X»|û/@|°¥Ð !BÔ Ç¢Ä©š+Õì D«7ìN¶ŽðÔ " ƶ’ÖçtA‰Û×}{tþz­¾GÍ›k¹OEJR$ Â׃ «ëÁ"oÉôž$oUK(Ä)Ãz³Ê-‹êN[Ò3Œñbï8P 4ƒ×q¢bo|?<ÛX¬òÄͰL–±›(™ûG?ýË©ÚÄ–ÂDØÐ_Ç¡ô ¾–ÄÏø ×e8Ë©$ÄF¹Å‹ì[©óìl:F¾f´‹‹Xì²ï®\¬ôùƒ ÿat¥óèÒùHß0äe‚;ü×h:ÆWðHž=Ã8骣"kœ'Y?³}Tûè€>?0l›e1Lòñ„aæKÆw…hÖŠùW…ÈÆÄ0ši·›[pcwËþñiêíY/~-Á5˜!¿†A›™Mÿþ(±“t@â“ö2­´TG5yé]çå僳 .·ÍïçÝ7UÚ±Ð/Nè»,_Ï ùdj7\ï Wì4›„»c¸àešg#ÒÊ⥭áØo5‘?ÌdÝô¯ ¹kzsƒ=´#ëÉK›Ø´±-¥eW?‡çßtòTã…$Ý+qÿ±ƒ÷_3Ô¥í÷:æ–ž<·Ö‡‰Å¢ š‡%Ô—utÌÈìðžgÖÀz²À—ï÷Óîäõ{K'´È÷³yaÏÁjƒô}ž§®æÊydÕÈë5¯èˆõvÕ©ã*çD„ “z„Ó‡^^xÂ3M§A´JG‚öï 3W'ˆ.OvXè¡ÊÕª?5º7†˜(˜Ç¶#çê’¶!ÌdZK§æ 0fãaN]òY³RV ™î$®K2R¨`W!1Ôó\;Ý ýB%qæK•&ÓÈe9È0êI±žeŸß -ú@žQr¦ ö4»M¼Áè¹µmw 9 EÆE_°2ó„ŸXKWÁ×Hóì^´²GѝF©óäR†¦‰ç"V»eØ<3ùd3ÿÚ¤Žú“Gi" —‘_ÙËÎ~Üö¯¥½Î»üŸEÚŽåmÞþí ;ÞólËΦMzA"Âf(´òá;Éï(/7½ûñÌ­cïÕçлþÝz¾-ÍvÑ“pH­–ðÓj$¸Äû¤‚‘ãUBË-n“2åPkS5&‹Â|+g^œ®Ì͆d!OïäîU«c;{Û!ÅŽ«ëZ9Ókóˆ]¯ƒ›né `ÇÒ+tÆš (ØKá¾—=3œ®•vuMñg²\ï Ec€ 05±d™‡×iÇ×›UúvÌ¢£Èþ¡ÕØô¶ßÎA"ß±#Ö²ˆÊŸ¦*Ä~ij|àø.-¼'»Ú¥£h ofº¦‡VsR=N½„Î v˜Z*SÌ{=jÑB‹tê…;’HžH¯8–îDù8ñ¢|Q•bÛçš–‹m³“ê¨ åÏ^m¬Žãþ©ïêO‡½6] µÆ„Ooòü ²x}N¦Ë3ïé¿»€›HA˜m%çÞ/¿í7Fø“‹léUk)É°Œµ8Q8›:ÀŠeT*šõ~ôڝG6 ¢}`ùH­–”¡k ‰P1>š†®9z11!X wKfmÁ¦xÑ,N1Q”–æB¶M…ÒÃv6SMˆhU¬ÊPŽï‘öj=·CŒ¯u¹ƒVIЃsx4’ömÛýcå¡¶7ßŠß 57^\wÒÐÆ k§h,Œý î«q^R½3]J¸ÇðN ‚çU¬ôº^Áì} ³f©Õœ§ˆã:FÄÈ‚é(€™?àýÓüè1Gô£¼éj‚OÅñ  #>×—ßtà 0G¥Åa뀐kßhc™À_ÉñÞ#±)GD" YîäË-ÿÙ̪ ¹™a¯´¢E\ÝÒö‚;™„ë]_ p8‰o¡ñ+^÷ 3‘'dT4œŽ ðVë½° :¬víÑ«£tßÚS-3¶“þ2 †üüʨòrš¹M{É_¤`Û¨0ìjœøJ‡:÷ÃáZ˜†@GP&œÑDGÏs¡þ¦þDGú‘1Yá9Ôþ¼ ûø…§÷8&–ÜÑnÄ_m®^üÆ`;ÉVÁJ£?â€-ßê}suÍ2sõA NÌúA磸‘îÿÚ»ƒìö·á¿±tÑÐ"Tÿü˜[@/äj¬€uüªìù¥Ý˜á8Ý´sõj 8@rˆð äþZÇD®ÿUÏ2ùôõrBzÆÏÞž>Ì™xœ“ wiÎ×7_… ¸ \#€MɁV¶¥üÕÿPÔ9Z‡ø§É8#H:ƒ5ÀÝå9ÍIŒ5åKÙŠ÷qÄ>1AÈøžj"µÂд/ªnÀ qªã}"iŸBå˜ÓÛŽ¦…&ݧ;G@—³b¯“•"´4í¨ôM¨åñC‹ïùÉó¯ÓsSH2Ý@ßáM‡ˆKÀªÛUeø/4\gnm¥‹ŸŒ qÄ b9ÞwÒNÏ_4Ég³ú=܆‚´ •â¥õeíþkjz>éÚyU«Íӝ݃6"8/ø{=Ô¢»G¥ äUw°W«,ô—¿ãㆅү¢³xŠUû™yŒ (øSópÐ 9\åTâ»—*oG$/×ÍT†Y¿1¤Þ¢_‡ ¼ „±ÍçèSaÓ 3ÛMÁBkxs‰’R/¡¤ˆÙçª(*õ„üXÌ´ƒ E§´¬EF"Ù”R/ÐNyÆÂ^°?™6¡œïJ·±$§?º>ÖüœcNÌù¯G ‹ñ2ЁBB„^·úìaz¨k:#¨Æ¨8LÎõލ£^§S&cŒÐU€ü(‡F±Š¼&P>8ÙÁ ‰ p5?0ÊÆƒZl¸aô š¼¡}gÿ¶zÆC²¹¬ÎÖG*HB¡O<º2#ñŒAƒ–¡B˜´É$¥›É:FÀÔx¾u?XÜÏÓvN©RS{2ʈãk9rmP¼Qq̳ è¼ÐFׄ^¡Öì fE“F4A…!ì/…¦Lƒ… … $%´¾yã@CI¬ á—3PþBÏNÿ<ý°4Ü ËÃ#ØÍ~âW«rEñw‹eùMMHß²`¬Öó½íf³:‹k˜¯÷}Z!ã¿<¥,\#öµÀ¯aÒNÆIé,Ћ–lŽ#Àæ9ÀÒS·I’½-Ïp Äz¤Š Â* ­íÄ9­< h>׍3ZkËU¹§˜ŒŠ±f­’¤º³Q ÏB?‹#µíÃ¥®@(Gs«†vI¥Mµ‹Á©e~2ú³ÁP4ìÕi‚²Ê^ö@-DþÓàlÜOÍ]n"µã:žpsŽ¢:! Aõ.ç~ÓBûH÷JCÌ]õVƒd «ú´QÙEA–¯¯Œ!.ˆˆëQ±ù œ·Ì!Õâ )ùL„ÅÀlÚè5@B…o´Æ¸XÓ&Û…O«˜”_#‡ƒ„ûÈt!¤ÁÏ›ÎÝŠ?c9 â\>lÓÁVÄÑ™£eØY]:fÝ–—ù+p{™ðè û³”g±OƒÚSù£áÁÊ„ä,ï7š²G ÕÌBk)~ÑiCµ|h#u¤¶îK¨² #²vݯGãeÖ϶ú…¾múÀ¶þÔñ‚Š9'^($¤§ò “š½{éúp÷J›ušS¹áªCÂubÃH9™D™/ZöØÁ‡¦ÝÙŸ·kð*_”.C‹{áXó€‡c¡c€§/šò/&éš÷,àéJþ‰X›fµ“C¨œ®r¬"kL‰Â_q…Z–.ÉL~O µ›zn‚¹À¦Öª7\àHµšÖ %»ÇníV[¥*Õ;ƒ#½¾HK-ÖIÊdÏEÚ#=o÷Óò³´Š: Ç?{¾+9›–‘OEáU·S€˜j"ÄaÜ ŒÛWt› á–c#a»pÔZÞdŽtWê=9éöÊ¢µ~ ë ;Öe‡Œ®:bî3±ýê¢wà¼îpêñ¹¾4 zc¾ðÖÿzdêŒÑÒŝÀ‰s6¤í³ÎÙB¿OZ”+F¤á‡3@Ñëäg©·Ž ˆèª<ù@É{&S„œÕúÀA)‰h:YÀ5^ÂÓŒ°õäU\ ùËÍû#²?Xe¬tu‰^zÒÔãë¼ÛWtEtû …‚g¶Úüâî*moGè¨7%u!]PhÏd™Ý%Îx: VÒ¦ôÊD3ÀŽKÛËãvÆî…N¯ä>Eró–ð`5 Œ%u5XkñÌ*NU%¶áœÊ:Qÿú»“úzyÏ6å-၇¾ ´ ÒÊ]y žO‘w2Äøæ…H’²f±ÎÇ.ª|¥'gîV•Ü .̘¯€šòü¤U~Ù†*¢!?ò wý,}´°ÔÞnïoKq5µb!áÓ3"vAßH¡³¡·G(ÐÎ0Îò¼MG!/ài®@—¬04*`…«é8ªøøló“ˆÊ”èù¤…ßÊoÿé'ËuÌÖ5×È¡§ˆˆfŽë9}hìâ_!!¯  B&Ëö¶‰ÀAÙNVŸ Wh›¸®XÑJì¨ú“¿÷3uj²˜¨ÍÎìë±aúŠÝå¯ð*Ó¨ôJ“yºØ)m°WýOè68†ŸÏ2—‰Ïüꪫٚ¥‹l1 ø ÏÄFjêµvÌbü¦èÝx:X±¢H=MÐß—,ˆÉÇ´(9ú¾^ÅÚ4¿m‡$âX‘å%(AlZo@½¨UOÌÕ”1ø¸jÎÀÃÃ_ µ‘Ü.œº¦Ut: Æï’!=¯uwû#,“pþÇúŒø(é@?³ü¥‘Mo §—s@Œ#)§ŒùkL}NOÆêA›¸~r½¼ÙA—HJ«eˆÖ´*¡ÓpÌŸö.m<-"³ûÈ$¬_6­åf£ïÚâj1y§ÕJ½@dÞÁr&Í\Z%D£Íñ·AZ Û³øüd/ªAi†/Й~  ‡âĮҮÏh§°b—›Û«mJžòG'[ÈYýŒ¦9psl ýÁ ®±f¦x,‰½tN ‚Xª9 ÙÖH.«Lo0×?͹m¡å†Ѽ+›2ƒF ±Ê8 7Hցϓ²Æ–m9…òŸï]Â1äN†VLâCˆU .ÿ‰Ts +ÅÎx(%¦u]6AF Š ØF鈄‘ |¢¶c±soŒ/t[a¾–û:s·`i햍ê›ËchÈ…8ßÀUÜewŒðNOƒõD%q#éû\9¤x¹&UE×G¥ Í—™$ð E6-‡¼!ýpãÔM˜ Âsìe¯ñµK¢Ç¡ùôléœ4Ö£”À Š®Ðc ^¨À}ÙËŸ§›ºê{ÊuÉC ×Sr€¤’fÉ*j!úÓ’Gsùìoîßîn%ò· àc Wp÷$¨˜)û»H ×8ŽÒ€Zj¤3ÀÙºY'Ql¦py{-6íÔCeiØp‘‡XÊîÆUߢ܂ž£Xé¼Y8þ©ëgñß}é.ÎógÒ„ÃØËø¯»™§Xýy M%@NŠ À(~áÐvu7&•,Ù˜ó€uP‡^^®=_E„jt’ 403WebShell
403Webshell
Server IP : 104.225.223.251  /  Your IP : 216.73.216.41
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux agtdemo03 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : root ( 0)
PHP Version : 7.4.3-4ubuntu2.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/web/dev.agtindia.co.in/coppersmith/wp-content/themes/copper-smith/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/web/dev.agtindia.co.in/coppersmith/wp-content/themes/copper-smith/home-page.php
<?php
/* Template Name: Home Page */
get_header();
$page_id = get_the_ID();
$meta_value = get_post_meta($page_id, 'wpcf-banners', false);
$meta_value_mobile_banners = get_post_meta($page_id, 'wpcf-mobile-banner', false);
?>
<?php /*
<div class="d-none">
<?php
$banners = types_child_posts('home-banners');

if (!empty($banners)) {
    echo '<div class="home-banners">';
    foreach ($banners as $banner) {
        // Get image attachment IDs
      //   $desktop_image_id = types_render_field('desktop-banner-image', ['post_id' => $banner->ID, 'raw' => true]);
        $mobile_image_id  = types_render_field('mobile-banner-image', ['post_id' => $banner->ID, 'raw' => true]);

        // Convert IDs to URLs
        $desktop_image_url = wp_get_attachment_image_url($desktop_image_id, 'full');
      //   $mobile_image_url  = wp_get_attachment_image_url($mobile_image_id, 'full');
      //   echo  $desktop_image_url;
        // Get URL field
        $desktop_url = types_render_field('desktop-banner-url', ['post_id' => $banner->ID, 'raw' => true]);
if(!empty($mobile_image_id)){
        // Output HTML
        echo '<div class="home-banner-item">';
        echo '<a href="' . esc_url($desktop_url) . '">';
      //   echo '<picture>';
      //   echo '<source media="(max-width: 767px)" srcset="' . esc_url($mobile_image_id) . '">';
        echo '<img src="' . esc_url($mobile_image_id) . '" alt="Banner">';
      //   echo '</picture>';
        echo '</a>';
        echo '</div>';
}
    }
    echo '</div>';
}
?>

</div>
*/?>
<!-- cs home banner section start -->
<?php 
$desktopBanners = types_child_posts('home-banners');

?>
<section class="cs-home-banner-section d-show">
   <div class="cs-home-banner-banner-slider-container">
      <div class="swiper mySwiper" id="cs-home-banner-slider">
         <div class="swiper-wrapper">
            <?php
            if (!empty($desktopBanners)) {
              
              foreach ($desktopBanners as $d_banner) {
               $d_desktop_image_id = types_render_field('desktop-banner-image', ['post_id' => $d_banner->ID, 'raw' => true]);
               // echo "image".$d_banner->ID;
               $d_desktop_url = types_render_field('desktop-banner-url', ['post_id' => $d_banner->ID, 'raw' => true]);
               if(!empty($d_desktop_image_id)){
                  // var_dump($d_desktop_image_id);
                ?>
                        <div class="swiper-slide ">
                           <div class="cs-home-banner-item">
                              <div class="cs-home-banner-img">
                                 <?php 
                                 if(!empty($d_desktop_url)){
                                    ?>
                                    <a href="<?=$d_desktop_url?>"> 
                                    <?php
                                 }
                                 ?>
                                 <img src="<?= $d_desktop_image_id ?>" alt="Copper Smith" />
                                 <?php 
                                 if(!empty($d_desktop_url)){
                                    ?>
                                    </a>
                                    <?php
                                 }
                                 ?>
                              </div>
                           </div>
                        </div>
                        <?php
              }
            }
            } else { ?>
                  <div class="swiper-slide">
                     <div class="cs-home-banner-item">
                        <div class="cs-home-banner-img">
                           <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/img/banner-1.jpg"
                              alt="Copper Smith" />
                        </div>
                     </div>
                  </div>
                  <div class="swiper-slide">
                     <div class="cs-home-banner-item">
                        <div class="cs-home-banner-img">
                           <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/img/banner-2.jpg"
                              alt="Copper Smith" />
                        </div>
                     </div>
                  </div>
                  <div class="swiper-slide">
                     <div class="cs-home-banner-item">
                        <div class="cs-home-banner-img">
                           <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/img/banner-3.jpg"
                              alt="Copper Smith" />
                        </div>
                     </div>
                  </div>
            <?php } ?>
         </div>
         <div class="cs-home-banner-banner-nav">
            <div class="swiper-pagination"></div>
         </div>
      </div>
   </div>
</section>
<!-- cs home banner section end -->
<?php
$mobileBanners = types_child_posts('home-banners');
?>
<!-- cs home banner section start -->
<section class="cs-home-banner-section m-show">
   <div class="cs-home-banner-banner-slider-container">
      <div class="swiper mySwiper" id="cs-home-banner-slider">
         <div class="swiper-wrapper">
            <?php
            if (!empty($mobileBanners)) {
               foreach ($mobileBanners as $mBanner) {
                  $m_image_id = types_render_field('mobile-banner-image', ['post_id' => $mBanner->ID, 'raw' => true]);
              
               $m_url = types_render_field('desktop-banner-url', ['post_id' => $mBanner->ID, 'raw' => true]);
               if(!empty($m_image_id)){
                  // var_dump($d_desktop_image_id);
                ?>
                        <div class="swiper-slide ">
                           <div class="cs-home-banner-item">
                              <div class="cs-home-banner-img">
                                 <?php 
                                 if(!empty($m_url)){
                                    ?>
                                    <a href="<?=$d_desktop_url?>"> 
                                    <?php
                                 }
                                 ?>
                                 <img src="<?= $m_image_id ?>" alt="Copper Smith" />
                                 <?php 
                                 if(!empty($m_url)){
                                    ?>
                                    </a>
                                    <?php
                                 }
                                 ?>
                              </div>
                           </div>
                        </div>
                        <?php
              }
               }

            } else { ?>
               <div class="swiper-slide">
                  <div class="cs-home-banner-item">
                     <div class="cs-home-banner-img">
                        <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/img/banner-1.jpg"
                           alt="Copper Smith" />
                     </div>
                  </div>
               </div>
               <div class="swiper-slide">
                  <div class="cs-home-banner-item">
                     <div class="cs-home-banner-img">
                        <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/img/banner-2.jpg"
                           alt="Copper Smith" />
                     </div>
                  </div>
               </div>
               <div class="swiper-slide">
                  <div class="cs-home-banner-item">
                     <div class="cs-home-banner-img">
                        <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/img/banner-3.jpg"
                           alt="Copper Smith" />
                     </div>
                  </div>
               </div>
            <?php } ?>
         </div>
         <div class="cs-home-banner-banner-nav">
            <div class="swiper-pagination"></div>
         </div>
      </div>
   </div>
</section>
<!-- cs home banner section end -->
<!-- categories with product count section start -->
 
<section class="cs-product-categories-with-count-section">
   <div class="container">
      <div class="row">
         <div class="col-12 col-md-12 col-lg-10">
            <div class="section-title">
               <h2>Top Categories</h2>
            </div>
         </div>
         <div class="col-12 col-md-12 col-lg-2">
            <div class="home-category-slider-nav">
               <div class="swiper-button-next home-product-category-button-next">
                  <i class="fal fa-long-arrow-right"></i>
               </div>
               <div class="swiper-button-prev home-product-category-button-prev">
                  <i class="fal fa-long-arrow-left"></i>
               </div>
            </div>
         </div>
      </div>
	                
      <div class="row">
         <div class="col-12">
            <div class="swiper mySwiper" id="cs-home-product-category-slider">
               <div class="swiper-wrapper">
     <?php
                 $argsTopCats = array(
    'post_type' => 'top-category',
    'orderby' => 'modified',
    'posts_per_page' => -1,
    'order' => 'DESC'

); 
	$cTopCatss =     new WP_Query( $argsTopCats );
	    
	   while ( $cTopCatss->have_posts() ) : $cTopCatss->the_post(); 

        
        $meta_cate_url=get_post_meta(get_the_ID(),'wpcf-top-category-url',true);
        $meta_image=get_post_meta(get_the_ID(),'wpcf-top-category-image',true);
        echo $meta_print_value;


				  
				 
                        ?>
                                    <div class="swiper-slide">
                                       <div class="cs-home-product-category-item">
                                        <?php
                                        if ($meta_image != '') {
                                          ?>
                                            <div class="cs-home-product-category-img">
                                               <a href="<?php echo  $meta_cate_url ?>">
                                               <img src="<?= $meta_image ?>" alt="<?= the_title()?>">
                                               </a>
                                            </div>
                                          <?php } ?>
                                          <div class="cs-home-product-category-content">
                                             <h5><a href="<?=$meta_cate_url?>"><?= the_title() ?></a></h5> 
                                          </div>
                                       </div>
                                    </div>
                                    <?php
     endwhile;
                  ?> 
               </div>
            </div>
         </div>
      </div>
   </div>
</section>
<!-- categories with product count section end -->
<!-- product tab section start -->
<section class="cs-h-product-tab-section">
   <div class="container">
      <div class="row">
         <div class="col-12">
            <div class="cs-h-product-tabs">
               <ul>
                  <?php
                  $args = ['limit' => -1, 'tag' => 'leggings', 'status' => 'publish'];
                  $cats = wc_get_products($args);
                  $catProduct = [];
                  foreach ($cats as $parentKey => $catTabN) {
                     $terms = get_the_terms($catTabN->get_id(), 'product_cat');
                     foreach ($terms as $childKey => $childCatba) {
                        $catProduct[] = $childCatba->term_id;
                     }
                  }
                  $tabCatNamesArrs = array_unique($catProduct);
                  foreach ($tabCatNamesArrs as $childKey => $tabCatNamesArr) {

                     $tabCatNamesNew = get_term($tabCatNamesArr);
                     $product_cats = get_terms(['term_id' => $tabCatNamesNew, 'taxonomy' => 'product_cat', 'hide_empty' => false]);
                     ?>
                     <li>
                        <button class="nav-link <?php if ($childKey == 0) { ?>  active <?php } ?>"
                           id="pillsTab-<?= $tabCatNamesNew->term_id ?>"
                           onclick="csProductTab(<?= $tabCatNamesNew->term_id ?>)"
                           type="button"
                           role="tab"
                           aria-selected="true">
                        <?= $tabCatNamesNew->name ?>
                        </button>
                     </li>
                     <?php
                  }
                  ?>
               </ul>
            </div>
            <div class="tab-content">
               <?php foreach ($tabCatNamesArrs as $childKey => $tabCatProduct) { 
                  $tabCatProduct_cats = get_term($tabCatProduct);
                  ?>
                  <div class="tab-pane fade <?php if ($childKey == 0): ?> show active<?php endif; ?>"
                     id="pills-<?= $tabCatProduct_cats->term_id ?>" role="tabpanel"
                     aria-labelledby="pills-<?= $tabCatProduct_cats->term_id ?>-tab" tabindex="0">
                     <?php $args = [
                        'post_status' => 'publish',
                        'limit' => 4,
                        'tax_query' => [
                           [
                              'taxonomy' => 'product_cat',
                              'field' => 'term_id',
                              'terms' => $tabCatProduct_cats->term_id, // When you have more term_id's seperate them by komma.
                           ],
                        ],
                     ]; 
                     ?>
                     <div class="row cs-shop-catgory-products-row justify-content-center">
                        <?php
                        $catTabsProducts = wc_get_products($args); 
                        foreach ($catTabsProducts as $catTabsProduct) {

                           $url = get_permalink($catTabsProduct->id);
                           $image = wp_get_attachment_image_src(get_post_thumbnail_id($catTabsProduct->id), 'single-post-thumbnail');
                           $attachment_ids = $catTabsProduct->get_gallery_image_ids();
                           if (function_exists('YITH_WCWL')) {
                              $wishlist = YITH_WCWL()->is_product_in_wishlist($catTabsProduct->id);
                           }
                           ?>
                                             <div class="col-6 col-sm-6 col-md-5 col-lg-4 col-xl-3">
                                                <div class="product-item">
                                                   <div class="product-img">
                                                      <a href="<?= $url ?>">
                                                      <?php if ($attachment_ids && is_array($attachment_ids)) {
                                                         // Get the first two images only
                                                         $first_images = array_slice($attachment_ids, 1, 1);
                                                         // print_r($attachment_ids);
                                                         foreach ($first_images as $attachment_id) {
                                                            $image_url = wp_get_attachment_url($attachment_id); ?>
                                                                                                <img src="<?= $image_url ?>" alt="Product" class="image-1" />
                                                                                                <?
                                                                                                ?>
                                                                                                <?php
                                                         }
                                                         $second_images = array_slice($attachment_ids, 0, 1);
                                                         foreach ($second_images as $attachment_id1) {
                                                            $image_url2 = wp_get_attachment_url($attachment_id1); ?>
                                                                                                <img src="<?= $image_url2 ?>" alt="Product" class="image-2" />
                                                                                                <?php
                                                         }
                                                      } ?>
                                                      </a>
                                                      <div class="product-wishlist">
                                                         <p class=" yith-wcwl-add-to-wishlist add-to-wishlist-<?= $catTabsProduct->id ?>"><?php if ($wishlist) { ?>
                                                                                 <a href="<?php echo site_url(); ?>/wishlist"><i class="yith-wcwl-icon fas fa-heart"></i> </a>
                                                                              <?php } else { ?>
                                                                                 <a href="?add_to_wishlist=<?= $catTabsProduct->id ?>"
                                                                                    class="add_to_wishlist add_to_wishlist_<?= $catTabsProduct->id ?>  single_add_to_wishlist"
                                                                                    data-product-id="<?= $catTabsProduct->id ?>" data-product-type="simple"
                                                                                    data-original-product-id="<?= $catTabsProduct->id ?>">
                                                                                 <i class="yith-wcwl-icon far fa-heart"></i> </a>
                                                                              <?php } ?>
                                                         </p>
                                                      </div>
                                                      <div class="product-cart-btn">
                                                         <?php if ($catTabsProduct->is_type('variable')) { ?>
                                                                              <p><a href="<?= $url ?>">Select Option</a></p>
                                                                           <?php } else { ?>
                                                                              <p><button type="submit" value="<?php echo esc_attr($catTabsProduct->id); ?>"
                                                                                 class="ajax_add_to_cart add_to_cart_button add-cart"
                                                                                 data-product_id="<?php echo $catTabsProduct->id; ?>"
                                                                                 data-product_sku="<?php echo esc_attr($sku); ?>">
                                                                                 Add to Cart</span>
                                                                                 </button>
                                                                              </p>
                                                                           <?php } ?>
                                                      </div>
                                                   </div>
                                                   <div class="product-content">
                                                      <div class="product-content-inner">
                                                         <h5><a href="<?php echo $url; ?>"><?= $catTabsProduct->name ?></a></h5>
                                                         <h6> <?= get_woocommerce_currency_symbol() . $catTabsProduct->price ?></h6>
                                                         <?php if ($catTabsProduct->is_type('variable')) {
                                                            $available_variations = $catTabsProduct->get_available_variations();
                                                            $available_variations_stock = [];
                                                            foreach ($available_variations as $variation) {
                                                               $available_variations_stock[] = $variation;
                                                               // echo $variation['variation_id'];
                                                               // Get the size attribute slug (e.g., 'small', 'medium', 'large')
                                                               $size_slug = $variation['attributes']['attribute_pa_size']; // Assuming the attribute slug is 'pa_size'
                                                               // Check if the variation is in stock
                                                               $is_in_stock = $variation['is_in_stock'];
                                                               // Get the size name using the slug
                                                               $size_term = get_term_by('slug', $size_slug, 'pa_size'); // Replace 'pa_size' with your actual attribute name
                                                               // Add the size name to the array if the size is in stock and not already added
                                                               if ($is_in_stock && $size_term) {
                                                                  $variation_stock_status1[] = [
                                                                     'size_slug' => $size_slug,
                                                                     'is_in_stock' => $is_in_stock,
                                                                     'size_term' => $size_term,
                                                                  ];
                                                               }
                                                            }
                                                            if (!empty($variation_stock_status1)) { ?>
                                                                                                   <div id="variation_list_<?= $catTabsProduct->id ?>">
                                                                                                      <p>Available Size(s):</p>
                                                                                                      <ul class="product-size">
                                                                                                         <?php
                                                                                                         $select_stock = 0;
                                                                                                         $selectval = null;
                                                                                                         // echo "<pre>";print_r($available_variations);
                                                                                                         // echo "<pre>";print_r($available_variations_stock);
                                                                                                         foreach ($available_variations_stock as $vidIndex => $variation) {
                                                                                                            // Get the size attribute slug (e.g., 'small', 'medium', 'large')
                                                                                                            $size_slug = $variation['attributes']['attribute_pa_size']; // Assuming the attribute slug is 'pa_size'
                                                                                                            // Check if the variation is in stock
                                                                                                            $is_in_stock = $variation['is_in_stock'];
                                                                                                            // Get the size name using the slug
                                                                                                            $size_term = get_term_by('slug', $size_slug, 'pa_size'); // Replace 'pa_size' with your actual attribute name
                                                                                                            // Add the size name to the array if the size is in stock and not already added
                                                                                                            if ($is_in_stock && $size_term) { ?>
                                                                                                                                                   <li class="product-size-vid product-size-vid-<?= $catTabsProduct->id ?> " data-variation_id="<?= $variation[
                                                                                                                                                         'variation_id'
                                                                                                                                                      ] ?>" data-variation_product_id="<?= $catTabsProduct->id ?>">
                                                                                                                                                      <p><?= $size_term->name ?></p>
                                                                                                                                                   </li>
                                                                                                                                                   <?php
                                                                                                                                                   $select_stock++;
                                                                                                                                                   if ($selectval == null) {
                                                                                                                                                      $selectval =
                                                                                                                                                         $variation['variation_id'];
                                                                                                                                                   }
                                                                                                            }
                                                                                                         }
                                                                                                         ?>
                                                                                                      </ul>
                                                                                                   </div>
                                                                                                   <div class="shop-action-btn">
                                                                                                      <ul>
                                                                                                         <li>
                                                                                                            <form id="pa_size" class="variations_form cart" name="attribute_pa_size"
                                                                                                               data-product_id="<?php echo $catTabsProduct->id; ?>"
                                                                                                               data-attribute_name="attribute_pa_size" data-show_option_none="yes">
                                                                                                               <input type="hidden" name="add-to-cart" value="<?php echo $catTabsProduct->id; ?>">
                                                                                                               <input type="hidden" name="product_id" id="productCartId"
                                                                                                                  value="<?php echo $catTabsProduct->id; ?>">
                                                                                                               <input type="hidden" name="variation_id"  class="variation_id_<?= $catTabsProduct->id ?>" value="">
                                                                                                               <button type="button" 
                                                                                                                  class="ajax_grid_add_to_cart add-cart btn  primary-btn btn-add-cart" id="ajax_grid_add_to_cart_<?= $catTabsProduct->id ?>" onclick="addtocart(<?= $catTabsProduct->id ?>)">
                                                                                                               Add to Cart</span>
                                                                                                               </button>
                                                                                                            </form>
                                                                                                         </li>
                                                                                                         <li>
                                                                                                            <p><a href="<?php echo $url; ?>" class="btn secondary-btn">Buy Now</a></p>
                                                                                                         </li>
                                                                                                      </ul>
                                                                                                   </div>
                                                                                                <?php } else { ?>
                                                                                                   <p class="outofstock-message ">Out of Stack!</p>
                                                                                                <?php }
                                                         } ?>
                                                      </div>
                                                   </div>
                                                </div>
                                             </div>
                           <?php
                        }
                        ?>
                     </div>
                     </div>
               <?php } ?>
            </div>
         </div>
      </div>
   </div>
</section>
<!-- product tab section end -->
<?php /*
<!-- cs bestseller section start  -->
<section class="cs-home-product-slider">
   <div class="container">
      <div class="row">
         <div class="col-12">
            <div class="row">
               <div class="col-12 col-md-12 col-lg-10">
                  <div class="section-title">
                     <h6>bestseller</h6>
                     <h2>Top Selling Product</h2>
                  </div>
               </div>
               <div class="col-12 col-md-12 col-lg-2">
                  <div class="home-product-slider-nav">
                     <div class="swiper-button-next home-product-button-next">
                        <i class="fal fa-long-arrow-right"></i>
                     </div>
                     <div class="swiper-button-prev home-product-button-prev">
                        <i class="fal fa-long-arrow-left"></i>
                     </div>
                  </div>
               </div>
            </div>
         </div>
         <?php
         $args = array(
           'limit' => -1,
           'status' => 'publish',
           'tag' => array('bestseller'),
         );
         $productsBestsellers = wc_get_products($args);

         ?>
         <div class="col-12">
            <div class="swiper mySwiper" id="cs-home-product-slider">
               <div class="swiper-wrapper">
                  <?php
                  foreach ($productsBestsellers as $productsBestseller) {
                    $url = get_permalink($productsBestseller->id);
                    $image = wp_get_attachment_image_src(get_post_thumbnail_id($productsBestseller->id), 'single-post-thumbnail');
                    $attachment_ids = $productsBestseller->get_gallery_image_ids();
                    if (function_exists('YITH_WCWL')) {
                      $wishlistBest = YITH_WCWL()->is_product_in_wishlist($productsBestseller->id);
                    }
                    $variation_stock_status = array();
                    ?>
                        <div class="swiper-slide">
                           <div class="product-item">
                              <div class="product-img">
                                 <a href="<?= $url ?>">
                                 <?php
                                 if ($attachment_ids && is_array($attachment_ids)) {
                                   // Get the first two images only
                                   $first_images = array_slice($attachment_ids, 1, 1);
                                   // print_r($attachment_ids);
                               
                                   foreach ($first_images as $attachment_id) {
                                     $image_url = wp_get_attachment_url($attachment_id);

                                     ?>
                                             <img src="<?= $image_url ?>" alt="Product" class="image-1" />
                                             <?
                                             ?>
                                             <?php
                                   }
                                   $second_images = array_slice($attachment_ids, 0, 1);
                                   foreach ($second_images as $attachment_id1) {
                                     $image_url2 = wp_get_attachment_url($attachment_id1);
                                     ?>
                                             <img src="<?= $image_url2 ?>" alt="Product" class="image-2" />
                                             <?php
                                   }
                                 }
                                 ?>
                                 </a>
                                 <div class="product-wishlist">
                                    <p>
                                       <?php
                                       if ($wishlistBest) {
                                         ?>
                                             <a href="<?php echo site_url() ?>/wishlist"><i class="yith-wcwl-icon fas fa-heart"></i> </a>
                                             <?php
                                       } else {
                                         ?>
                                             <a href="?add_to_wishlist=<?= $productsBestseller->id ?>"
                                                class="add_to_wishlist add_to_wishlist_<?= $productsBestseller->id ?>  single_add_to_wishlist"
                                                data-product-id="<?= $productsBestseller->id ?>" data-product-type="simple"
                                                data-original-product-id="<?= $productsBestseller->id ?>">
                                             <i class="yith-wcwl-icon far fa-heart"></i> </a>
                                             <?php
                                       }

                                       ?>
                                    </p>
                                 </div>
                                 <div class="product-cart-btn">
                                    <?php
                                    if ($productsBestseller->is_type('variable')) {
                                      ?>
                                          <p><a href="<?= $url ?>">Select Option</a></p>
                                          <?php
                                    } else {
                                      ?>
                                          <p><button type="submit" value="<?php echo esc_attr($productsBestseller->id); ?>"
                                             class="ajax_add_to_cart add_to_cart_button add-cart"
                                             data-product_id="<?php echo $productsBestseller->id; ?>"
                                             data-product_sku="<?php echo esc_attr($sku) ?>">
                                             Add to Cart</span>
                                             </button>
                                          </p>
                                          <?php
                                    }
                                    ?>
                                 </div>
                              </div>
                              <div class="product-content">
                                 <div class="product-content-inner">
                                    <h5><a href="<?php echo $url ?>"><?= $productsBestseller->name ?></a></h5>
                                    <h6> <?= get_woocommerce_currency_symbol() . $productsBestseller->price ?></h6>
                                    <?php
                                    if ($productsBestseller->is_type('variable')) {
                                      $available_variations = $productsBestseller->get_available_variations();
                                      $available_variations_stock = [];

                                      foreach ($available_variations as $variation) {
                                        $available_variations_stock[] = $variation;
                                        // echo $variation['variation_id'];
                                        // Get the size attribute slug (e.g., 'small', 'medium', 'large')
                                        $size_slug = $variation['attributes']['attribute_pa_size']; // Assuming the attribute slug is 'pa_size'								
                                        // Check if the variation is in stock
                                        $is_in_stock = $variation['is_in_stock'];
                                        // Get the size name using the slug
                                        $size_term = get_term_by('slug', $size_slug, 'pa_size'); // Replace 'pa_size' with your actual attribute name
                                        // Add the size name to the array if the size is in stock and not already added
                                        if ($is_in_stock && $size_term) {
                                          $variation_stock_status1[] = array(
                                            'size_slug' => $size_slug,
                                            'is_in_stock' => $is_in_stock,
                                            'size_term' => $size_term,
                                          );
                                        }
                                      }
                                      if (!empty($variation_stock_status1)) {
                                        ?>
                                                <div id="variation_list_<?= $productsBestseller->id ?>">
                                                   <p>Avilable Size(s):</p>
                                                   <ul class="product-size">
                                                      <?php
                                                      $select_stock = 0;
                                                      $selectval = null;
                                                      // echo "<pre>";print_r($available_variations);
                                                      // echo "<pre>";print_r($available_variations_stock);
                                                      foreach ($available_variations_stock as $vidIndex => $variation) {
                                                        // Get the size attribute slug (e.g., 'small', 'medium', 'large')
                                                        $size_slug = $variation['attributes']['attribute_pa_size']; // Assuming the attribute slug is 'pa_size'								
                                                        // Check if the variation is in stock
                                                        $is_in_stock = $variation['is_in_stock'];
                                                        // Get the size name using the slug
                                                        $size_term = get_term_by('slug', $size_slug, 'pa_size'); // Replace 'pa_size' with your actual attribute name
                                                        // Add the size name to the array if the size is in stock and not already added
                                                        if ($is_in_stock && $size_term) {
                                                          ?>
                                                                  <li class="product-size-vid product-size-vid-<?= $productsBestseller->id ?>" data-variation_id="<?= $variation['variation_id'] ?>" data-variation_product_id="<?= $productsBestseller->id ?>">
                                                                     <p><?= $size_term->name; ?></p>
                                                                  </li>
                                                                  <?php
                                                                  $select_stock++;
                                                                  if ($selectval == null) {
                                                                    $selectval = $variation['variation_id'];
                                                                  }
                                                        }
                                                      }
                                                      ?>
                                                   </ul>
                                                </div>
                                                <div class="shop-action-btn">
                                                   <ul>
                                                      <li>
                                                         <form id="pa_size" class="variations_form cart" name="attribute_pa_size"
                                                            data-product_id="<?php echo $productsBestseller->id; ?>"
                                                            data-attribute_name="attribute_pa_size" data-show_option_none="yes">
                                                            <input type="hidden" name="add-to-cart" value="<?php echo $productsBestseller->id; ?>">
                                                            <input type="hidden" name="product_id" id="productCartId"
                                                               value="<?php echo $productsBestseller->id; ?>">
                                                            <input type="hidden" name="variation_id"  class="variation_id_<?= $productsBestseller->id ?>" value="">
                                                            <button type="button" 
                                                               class="ajax_grid_add_to_cart add-cart btn  primary-btn btn-add-cart" id="ajax_grid_add_to_cart_<?= $productsBestseller->id ?>" onclick="addtocart(<?= $productsBestseller->id ?>)">
                                                            Add to Cart</span>
                                                            </button>
                                                         </form>
                                                      </li>
                                                      <li>
                                                         <p><a href="<?php echo $url ?>" class="btn secondary-btn">Buy Now</a></p>
                                                      </li>
                                                   </ul>
                                                </div>
                                                <?php
                                      } else {
                                        ?>
                                                <p class="outofstock-message ">Out of Stack!</p>
                                                <?php
                                      }
                                    }
                                    ?>
                                 </div>
                              </div>
                           </div>
                        </div>
                  <?php } ?>
               </div>
               <div class="product-nav">
                  <div class="swiper-pagination"></div>
               </div>
            </div>
         </div>
      </div>
   </div>
</section>
<!-- cs bestseller section end  -->
*/ ?>
<!-- single collection section start -->
<section class="cs-home-single-collection-section">
   <div class="container">
      <div class="row justify-content-center">
         <div class="col-12 col-md-6 col-lg-4">
            <div class="cs-home-single-collection-img">
               <a href="<?= site_url('/') ?>product-category/athleisure/">
               <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/img/athleisures.jpg" class="img-fluid"
                  alt="collection" />
               </a>
            </div>
         </div>
         <div class="col-12 col-md-6 col-lg-6">
            <div class="cs-home-single-collection-content">
               <div class="section-title">
                  <h2>Premium Athleisure Collections</h2>
                  <p><a href="<?= site_url('/') ?>product-category/athleisure/" class="btn primary-btn">Discover</a></p>
               </div>
            </div>
         </div>
      </div>
   </div>
</section>
<!-- single collection section end -->
<!-- cs bestseller section start  -->
<section class="cs-home-product-slider cs-home-product-new-arrivals">
   <div class="container">
      <div class="row">
         <div class="col-12">
            <div class="row">
               <div class="col-12 col-md-12 col-lg-10">
                  <div class="section-title">
                     <h6>new arrivals</h6>
                     <h2>Latest Products</h2>
                  </div>
               </div>
               <div class="col-12 col-md-12 col-lg-2">
                  <div class="home-product-slider-nav">
                     <div class="swiper-button-next home-product-button-next">
                        <i class="fal fa-long-arrow-right"></i>
                     </div>
                     <div class="swiper-button-prev home-product-button-prev">
                        <i class="fal fa-long-arrow-left"></i>
                     </div>
                  </div>
               </div>
            </div>
         </div>
         <?php
         $newProductsArgs = array(
           'limit' => -1,
           'status' => 'publish',
           'tag' => array('new'),
         );
         $productsNewList = wc_get_products($newProductsArgs);

         ?>
         <div class="col-12">
            <div class="swiper mySwiper" id="cs-home-product-slider">
               <div class="swiper-wrapper">
                  <?php
                  foreach ($productsNewList as $productsNew) {
                    $url = get_permalink($productsNew->id);
                    $image = wp_get_attachment_image_src(get_post_thumbnail_id($productsNew->id), 'single-post-thumbnail');
                    $attachment_ids = $productsNew->get_gallery_image_ids();
                    if (function_exists('YITH_WCWL')) {
                      $wishlist = YITH_WCWL()->is_product_in_wishlist($productsNew->id);
                    }
                    $variation_stock_status1 = array();
                    ?>
                        <div class="swiper-slide">
                           <div class="product-item">
                              <div class="product-img">
                                 <a href="<?= $url ?>">
                                 <?php
                                 if ($attachment_ids && is_array($attachment_ids)) {
                                   // Get the first two images only
                                   $first_images = array_slice($attachment_ids, 1, 1);
                                   // print_r($attachment_ids);
                               
                                   foreach ($first_images as $attachment_id) {
                                     $image_url = wp_get_attachment_url($attachment_id);

                                     ?>
                                             <img src="<?= $image_url ?>" alt="Product" class="image-1" />
                                             <?
                                             ?>
                                             <?php
                                   }
                                   $second_images = array_slice($attachment_ids, 0, 1);
                                   foreach ($second_images as $attachment_id1) {
                                     $image_url2 = wp_get_attachment_url($attachment_id1);
                                     ?>
                                             <img src="<?= $image_url2 ?>" alt="Product" class="image-2" />
                                             <?php
                                   }
                                 }
                                 ?>
                                 </a>
                                 <div class="product-wishlist">
                                    <p class=" yith-wcwl-add-to-wishlist add-to-wishlist-<?= $productsNew->id ?>"><?php
                                      if ($wishlist) {
                                        ?>
                                             <a href="<?php echo site_url() ?>/wishlist"><i class="yith-wcwl-icon fas fa-heart"></i> </a>
                                             <?php
                                      } else {
                                        ?>
                                             <a href="?add_to_wishlist=<?= $productsNew->id ?>"
                                                class="add_to_wishlist add_to_wishlist_<?= $productsNew->id ?>  single_add_to_wishlist"
                                                data-product-id="<?= $productsNew->id ?>" data-product-type="simple"
                                                data-original-product-id="<?= $productsNew->id ?>">
                                             <i class="yith-wcwl-icon far fa-heart"></i> </a>
                                             <?php
                                      }
                                      ?>
                                    </p>
                                 </div>
                                 <div class="product-cart-btn">
                                    <?php
                                    if ($productsNew->is_type('variable')) {
                                      ?>
                                          <p><a href="<?= $url ?>">Select Option</a></p>
                                          <?php
                                    } else {
                                      ?>
                                          <p><button type="submit" value="<?php echo esc_attr($productsNew->id); ?>"
                                             class="ajax_add_to_cart add_to_cart_button add-cart"
                                             data-product_id="<?php echo $productsNew->id; ?>"
                                             data-product_sku="<?php echo esc_attr($sku) ?>">
                                             Add to Cart</span>
                                             </button>
                                          </p>
                                          <?php
                                    }
                                    ?>
                                 </div>
                              </div>
                              <div class="product-content">
                                 <div class="product-content-inner">
                                    <h5><a href="<?php echo $url ?>"><?= $productsNew->name ?></a></h5>
                                    <h6> <?= get_woocommerce_currency_symbol() . $productsNew->price ?></h6>
                                    <?php
                                    if ($productsNew->is_type('variable')) {
                                      $available_variations = $productsNew->get_available_variations();

                                      $available_variations_stock = [];

                                      foreach ($available_variations as $variation) {
                                        $available_variations_stock[] = $variation;
                                        // echo $variation['variation_id'];
                                        // Get the size attribute slug (e.g., 'small', 'medium', 'large')
                                        $size_slug = $variation['attributes']['attribute_pa_size']; // Assuming the attribute slug is 'pa_size'								
                                        // Check if the variation is in stock
                                        $is_in_stock = $variation['is_in_stock'];
                                        // Get the size name using the slug
                                        $size_term = get_term_by('slug', $size_slug, 'pa_size'); // Replace 'pa_size' with your actual attribute name
                                        // Add the size name to the array if the size is in stock and not already added
                                        if ($is_in_stock && $size_term) {
                                          $variation_stock_status1[] = array(
                                            'size_slug' => $size_slug,
                                            'is_in_stock' => $is_in_stock,
                                            'size_term' => $size_term,
                                          );
                                        }
                                      }
                                      if (!empty($variation_stock_status1)) {
                                        ?>
                                                <div id="variation_list_<?= $productsNew->id ?>">
                                                   <p>Available Size(s):</p>
                                                   <ul class="product-size">
                                                      <?php
                                                      $select_stock = 0;
                                                      $selectval = null;
                                                      // echo "<pre>";print_r($available_variations);
                                                      // echo "<pre>";print_r($available_variations_stock);
                                                      foreach ($available_variations_stock as $vidIndex => $variation) {
                                                        // Get the size attribute slug (e.g., 'small', 'medium', 'large')
                                                        $size_slug = $variation['attributes']['attribute_pa_size']; // Assuming the attribute slug is 'pa_size'								
                                                        // Check if the variation is in stock
                                                        $is_in_stock = $variation['is_in_stock'];
                                                        // Get the size name using the slug
                                                        $size_term = get_term_by('slug', $size_slug, 'pa_size'); // Replace 'pa_size' with your actual attribute name
                                                        // Add the size name to the array if the size is in stock and not already added
                                                        if ($is_in_stock && $size_term) {
                                                          ?>
                                                                  <li class="product-size-vid product-size-vid-<?= $productsNew->id ?> " data-variation_id="<?= $variation['variation_id'] ?>" data-variation_product_id="<?= $productsNew->id ?>">
                                                                     <p><?= $size_term->name; ?></p>
                                                                  </li>
                                                                  <?php
                                                                  $select_stock++;
                                                                  if ($selectval == null) {
                                                                    $selectval = $variation['variation_id'];
                                                                  }
                                                        }
                                                      }
                                                      ?>
                                                   </ul>
                                                </div>
                                                <div class="shop-action-btn">
                                                   <ul>
                                                      <li>
                                                         <form id="pa_size" class="variations_form cart" name="attribute_pa_size"
                                                            data-product_id="<?php echo $productsNew->id; ?>"
                                                            data-attribute_name="attribute_pa_size" data-show_option_none="yes">
                                                            <input type="hidden" name="add-to-cart" value="<?php echo $productsNew->id; ?>">
                                                            <input type="hidden" name="product_id" id="productCartId"
                                                               value="<?php echo $productsNew->id; ?>">
                                                            <input type="hidden" name="variation_id"  class="variation_id_<?= $productsNew->id ?>" value="">
                                                            <button type="button" 
                                                               class="ajax_grid_add_to_cart add-cart btn  primary-btn btn-add-cart" id="ajax_grid_add_to_cart_<?= $productsNew->id ?>" onclick="addtocart(<?= $productsNew->id ?>)">
                                                            Add to Cart</span>
                                                            </button>
                                                         </form>
                                                      </li>
                                                      <li>
                                                         <p><a href="<?php echo $url ?>" class="btn secondary-btn">Buy Now</a></p>
                                                      </li>
                                                   </ul>
                                                </div>
                                                <?php
                                      } else {
                                        ?>
                                                <p class="outofstock-message ">Out of Stack!</p>
                                                <?php
                                      }
                                    }
                                    ?>
                                 </div>
                              </div>
                           </div>
                        </div>
                  <?php } ?>
               </div>
               <div class="product-nav">
                  <div class="swiper-pagination"></div>
               </div>
            </div>
         </div>
      </div>
   </div>
</section>
<!-- cs bestseller section end  -->
<!-- cs home video section start -->
<section class="cs-home-video-section">
   <div class="video-main">
      <div class="vpop" data-type="youtube" data-id="kzNsUamM8fo" data-autoplay="true">
         <div class="video-main-img">
            <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/img/video-bg.jpg" alt="video" />
         </div>
         <div class="video-content">
            <div class="video-icon">
               <i class="fal fa-play"></i>
            </div>
         </div>
      </div>
   </div>
   <!-- video pop -->
   <div id="video-popup-overlay"></div>
   <div id="video-popup-container">
      <div id="video-popup-close" class="fade">&#10006;</div>
      <div id="video-popup-iframe-container">
         <iframe id="video-popup-iframe" src="" width="100%" height="100%" allow="autoplay" frameborder="0"></iframe>
      </div>
   </div>
</section>
<!-- cs home video section end -->
<!-- cs testimonials section start  -->
<section class="cs-testimonials-secrtion">
   <div class="container">
      <div class="row">
         <div class="col-12">
            <div class="row">
               <div class="col-12 col-md-12 col-lg-10">
                  <div class="section-title">
                     <h6>Testimonials</h6>
                     <h2>Happy Customers</h2>
                  </div>
               </div>
               <div class="col-12 col-md-12 col-lg-2">
                  <div class="home-product-slider-nav">
                     <div class="swiper-button-next home-testimonials-button-next">
                        <i class="fal fa-long-arrow-right"></i>
                     </div>
                     <div class="swiper-button-prev home-testimonials-button-prev">
                        <i class="fal fa-long-arrow-left"></i>
                     </div>
                  </div>
               </div>
            </div>
         </div>
         <div class="col-12">
            <div class="swiper mySwiper" id="cs-home-testimonials-slider">
               <div class="swiper-wrapper">
                  <div class="swiper-slide">
                     <div class="cs-testimonials-item">
                        <div class="cs-testimonials-icon">
                           <i class="fal fa-quote-left"></i>
                        </div>
                        <div class="cs-testimonials-content">
                           <div class="cs-testimonials-content-body">
                              <p>
                                 They fit just right and make me feel awesome! The high waist is a total win – feels like they were
                                 made for me!
                              </p>
                           </div>
                           <div class="cs-testimonials-content-footer">
                              <h6>Dheeksha Pandey</h6>
                              <p>Ahmedabad</p>
                           </div>
                        </div>
                     </div>
                  </div>
                  <div class="swiper-slide">
                     <div class="cs-testimonials-item">
                        <div class="cs-testimonials-icon">
                           <i class="fal fa-quote-left"></i>
                        </div>
                        <div class="cs-testimonials-content">
                           <div class="cs-testimonials-content-body">
                              <p>
                                 Love these! They’re super soft and stretchy, move with me perfectly, and feel great all day. Plus,
                                 I can wear them anywhere!
                              </p>
                           </div>
                           <div class="cs-testimonials-content-footer">
                              <h6>Aksharaa</h6>
                              <p>Coimbatore</p>
                           </div>
                        </div>
                     </div>
                  </div>
                  <div class="swiper-slide">
                     <div class="cs-testimonials-item">
                        <div class="cs-testimonials-icon">
                           <i class="fal fa-quote-left"></i>
                        </div>
                        <div class="cs-testimonials-content">
                           <div class="cs-testimonials-content-body">
                              <p>
                                 I absolutely love this set! It’s so comfy, and I can wear it for anything – workouts, coffee runs,
                                 or just lounging around. 10/10 recommend!
                              </p>
                           </div>
                           <div class="cs-testimonials-content-footer">
                              <h6>Priya Singh</h6>
                              <p>Bangalore</p>
                           </div>
                        </div>
                     </div>
                  </div>
                  <div class="swiper-slide">
                     <div class="cs-testimonials-item">
                        <div class="cs-testimonials-icon">
                           <i class="fal fa-quote-left"></i>
                        </div>
                        <div class="cs-testimonials-content">
                           <div class="cs-testimonials-content-body">
                              <p>
                                 I can’t believe how much I love these! I wear them to work, out with friends, and even at home.
                                 They’re the perfect blend of style and comfort.
                              </p>
                           </div>
                           <div class="cs-testimonials-content-footer">
                              <h6>Kavya</h6>
                              <p>Hyderabad</p>
                           </div>
                        </div>
                     </div>
                  </div>
                  <div class="swiper-slide">
                     <div class="cs-testimonials-item">
                        <div class="cs-testimonials-icon">
                           <i class="fal fa-quote-left"></i>
                        </div>
                        <div class="cs-testimonials-content">
                           <div class="cs-testimonials-content-body">
                              <p>
                                 Seriously impressed with the quality of these treggings! They keep their shape wash after wash and
                                 feel luxurious on. Thinking of grabbing a few more!
                              </p>
                           </div>
                           <div class="cs-testimonials-content-footer">
                              <h6>Aarthi</h6>
                              <p>Thiruvanthapuram</p>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</section>
<!-- cs testimonials section end  -->
<!-- Blog section start -->
<section class="cs-blog-section">
   <div class="container">
      <div class="row">
      <div class="col-12">
            <div class="row">
               <div class="col-12 col-md-12 col-lg-10">
                  <div class="section-title">
                     <h6>Blogs</h6>
                     <h2>Our Latest Blog Posts</h2>
                  </div>
               </div>
               <div class="col-12 col-md-12 col-lg-2">
                  <div class="home-product-slider-nav">
                     <div class="swiper-button-next home-blog-button-next">
                        <i class="fal fa-long-arrow-right"></i>
                     </div>
                     <div class="swiper-button-prev home-blog-button-prev">
                        <i class="fal fa-long-arrow-left"></i>
                     </div>
                  </div>
               </div>
            </div>
         </div>
           <div class="swiper mySwiper" id="cs-home-blog-slider">
               <div class="swiper-wrapper">
                  <?php
                  $csBlogArr = array(
                     'post_type' => 'blog',
                     'posts_per_page' => 8,
                     'orderby' => 'ID',
                     'order' => 'DESC',
                  );
                  $obituary_query = get_posts($csBlogArr);
                 
                  //   print_r($obituary_query);
                  foreach ($obituary_query as $blog) {
                     $blogDesc = get_post_meta($blog->ID, 'wpcf-short-description', true);
                     $blog_url = get_post_field('post_name', $blog->ID);
                      $postImg = wp_get_attachment_url(get_post_thumbnail_id($blog->ID), 'thumbnail');
                     ?>
                     <div class="swiper-slide">
               <div class="cs-blog-item">
                  <div class="cs-blog-date">
                     <p><i class="fal fa-calendar-alt"></i> <?= get_the_date(' d M, Y', $blog->ID); ?></p>
                  </div>
                  <div class="cs-blog-img">
                     <a href="<?= $blog_url ?>">
                        <img src="<?=$postImg?>" alt="Blog">
                     </a>
                  </div>
                  <div class="cs-blog-content"> 
                     <h5><a href="<?= $blog_url ?>"><?= $blog->post_title; ?></a></h5>
                     <p><?= $blogDesc ?></p> 
                     <p><a href="<?= $blog_url ?>" class="link link-text">Read More <i class="fal fa-arrow-right"></i></a></p>
                  </div>
               </div>
            </div>
            <?php
                  }
                  ?> 
         </div>
      </div>
      </div>
   </div>
</section>
<!-- Blog section end -->
<?php get_footer(); ?>
<script>
   function csProductTab(catID) { 
       $('.nav-link').removeClass('active');
       $('#pillsTab-'+catID).addClass('active');
       $('.tab-pane').removeClass('show active');
       $('#pills-'+catID).addClass('show active')
   }
    // home product category silder
    var swiper = new Swiper("#cs-home-product-category-slider", {
      slidesPerView: 2,
      spaceBetween: 10,
      breakpoints: {
        640: {
          slidesPerView: 2,
          spaceBetween: 20,
        },
        768: {
          slidesPerView: 3,
          spaceBetween: 15,
        },
        1024: {
          slidesPerView:7,
          spaceBetween: 20,
        },
      },
      speed: 850,
      pagination: {
        el: ".swiper-pagination",
        type: "progressbar",
      },
      navigation: {
        nextEl: ".home-product-category-button-next",
        prevEl: ".home-product-category-button-prev",
      },
    });
      // home product silder
      var swiper = new Swiper("#home-product-slider", {
      slidesPerView: 2,
      spaceBetween: 10,
      breakpoints: {
        640: {
          slidesPerView: 2,
          spaceBetween: 20,
        },
        768: {
          slidesPerView: 3,
          spaceBetween: 15,
        },
        1024: {
          slidesPerView: 3,
          spaceBetween: 20,
        },
      },
      speed: 850,
      pagination: {
        el: ".swiper-pagination",
        type: "progressbar",
      },
      navigation: {
        nextEl: ".home-product-button-next",
        prevEl: ".home-product-button-prev",
      },
    });
    // home Testimonials silder
    var swiper = new Swiper("#cs-home-testimonials-slider", {
      slidesPerView: 1,
      spaceBetween: 10,
      breakpoints: {
        640: {
          slidesPerView: 2,
          spaceBetween: 20,
        },
        768: {
          slidesPerView: 2,
          spaceBetween: 15,
        },
        1024: {
          slidesPerView: 3,
          spaceBetween: 20,
        },
      },
      speed: 850,
      pagination: {
        el: ".swiper-pagination",
        type: "progressbar",
      },
      navigation: {
        nextEl: ".home-testimonials-button-next",
        prevEl: ".home-testimonials-button-prev",
      },
    });
      // home Blog silder
        var swiper = new Swiper("#cs-home-blog-slider", {
      slidesPerView: 1,
      spaceBetween: 10,
      breakpoints: {
        640: {
          slidesPerView: 2,
          spaceBetween: 20,
        },
        768: {
          slidesPerView: 2,
          spaceBetween: 15,
        },
        1024: {
          slidesPerView: 3,
          spaceBetween: 20,
        },
      },
      speed: 850,
      pagination: {
        el: ".swiper-pagination",
        type: "progressbar",
      },
      navigation: {
        nextEl: ".home-blog-button-next",
        prevEl: ".home-blog-button-prev",
      },
    });
</script>
<script>
   $(".vpop").on("click", function (e) {
     e.preventDefault();
     $(
       "#video-popup-overlay,#video-popup-iframe-container,#video-popup-container,#video-popup-close"
     ).show();
     var srchref = "",
       autoplay = "0",
       id = $(this).data("id");
   
     if ($(this).data("type") == "vimeo")
       var srchref = "//player.vimeo.com/video/";
     else if ($(this).data("type") == "youtube")
       var srchref = "https://www.youtube.com/embed/";
   
     if ($(this).data("autoplay") == true) autoplay = "?autoplay=1";
   
     $("#video-popup-iframe").attr("src", srchref + id + autoplay);
   
     $("#video-popup-iframe").on("load", function () {
       $("#video-popup-container").show();
     });
   });
   
   $("#video-popup-close, #video-popup-overlay").on("click", function (e) {
     $(
       "#video-popup-iframe-container,#video-popup-container,#video-popup-close,#video-popup-overlay"
     ).hide();
     $("#video-popup-iframe").attr("src", "");
   });
   
   // whislist
   $(".add_to_wishlist").click(function () { 
   
     var productID = $(this).data('product-id');
     setTimeout(function () {
       jQuery.ajax({
         type: "GET",
         url: "<?php echo site_url() ?>/wp-admin/admin-ajax.php",
         data: {
           action: 'favorite',
           post_id: productID,
         },
         success: function (data) {
           $(".add_to_wishlist_" + productID + " i").addClass("fas fa-heart");
           $(".add_to_wishlist_" + productID).attr("id", "add_to_wishlist_" + productID);
           $(".add_to_wishlist_" + productID).removeClass("cartAdding add_to_wishlist single_add_to_wishlist add_to_wishlist_" + productID);
           $(".add_to_wishlist_" + productID + " i").removeClass("far fa-heart");
           $("#add_to_wishlist_" + productID).attr('href', "<?php echo site_url() ?>/wishlist")
           $("#add_to_wishlist_" + productID).addClass("nothing");
         },
         error: function (errorThrown) {
           console.log(errorThrown);
         },
       });
     }, 1000);
   
   });
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit