{"id":55647,"date":"2025-10-31T11:29:49","date_gmt":"2025-10-31T05:59:49","guid":{"rendered":"https:\/\/hindkush.in\/?page_id=55647"},"modified":"2025-11-05T09:34:50","modified_gmt":"2025-11-05T04:04:50","slug":"trending","status":"publish","type":"page","link":"https:\/\/hindkush.in\/?page_id=55647","title":{"rendered":"Trending"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"55647\" class=\"elementor elementor-55647\">\n\t\t\t\t<div class=\"elementor-element elementor-element-8f8dc10 e-con-full e-flex e-con e-parent\" data-id=\"8f8dc10\" data-element_type=\"container\">\n\t\t<div class=\"elementor-element elementor-element-71e7e4c e-flex e-con-boxed e-con e-child\" data-id=\"71e7e4c\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-330c899 e-con-full e-flex e-con e-child\" data-id=\"330c899\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-6756e75 elementor-widget elementor-widget-html\" data-id=\"6756e75\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t <!-- Left Sidebar -->\n    <div class=\"db-left\">\n\t\t<ul>\n\t\t\t\t<?php\n\t\t\t\t$custom_categories = [\n\t\t\t\t\t1  => ['type' => 'category', 'name' => 'Trending', 'icon' => 'fa-solid fa-bolt', 'color' => '#ff3d00'],\n\t\t\t\t\t40  => ['type' => 'category', 'name' => '\u0926\u0948\u0928\u093f\u0915-\u0939\u093f\u0928\u094d\u0926\u0915\u0941\u0936', 'icon' => 'fa-solid fa-newspaper', 'color' => '#1565c0'],\n\t\t\t\t\t55031  => ['type' => 'page', 'name' => '\u0932\u093e\u0907\u0935', 'icon' => 'fa-solid fa-video', 'color' => '#c2185b'],\n\t\t\t\t\t36  => ['type' => 'category', 'name' => '\u092e\u0941\u0916\u094d\u092f', 'icon' => 'fa-solid fa-bullhorn', 'color' => '#FF0000'],\n\t\t\t\t\t43  => ['type' => 'category', 'name' => '\u0935\u093f\u0936\u094d\u0935', 'icon' => 'fa-solid fa-globe', 'color' => '#43a047'],\n\t\t\t\t\t42  => ['type' => 'category', 'name' => '\u0926\u0947\u0936', 'icon' => 'fa-solid fa-landmark', 'color' => '#1e88e5'],\n\t\t\t\t\t78  => ['type' => 'category', 'name' => '\u092e\u0902\u0925\u0928', 'icon' => 'fa-solid fa-brain', 'color' => '#fdd835'],\n\t\t\t\t\t39  => ['type' => 'category', 'name' => '\u0905\u0930\u094d\u0925', 'icon' => 'fa-solid fa-indian-rupee-sign', 'color' => '#fb8c00'],\n\t\t\t\t\t41  => ['type' => 'category', 'name' => '\u092a\u094d\u0930\u0926\u0947\u0936', 'icon' => 'fa-solid fa-map-location-dot', 'color' => '#f4511e'],\n\t\t\t\t\t37 => ['type' => 'category', 'name' => '\u0905\u0902\u091a\u0932', 'icon' => 'fa-solid fa-location-dot', 'color' => '#00acc1'],\n\t\t\t\t\t124 => ['type' => 'category', 'name' => '\u0928\u0917\u0930', 'icon' => 'fa-solid fa-city', 'color' => '#8e24aa'],\n\t\t\t\t\t38 => ['type' => 'category', 'name' => '\u0906\u092f\u093e\u092e','icon' => 'fa-solid fa-layer-group', 'color' => '#6d4c41'],\n\t\t\t\t\t35 => ['type' => 'category', 'name' => '\u091c\u0940\u0935\u0928', 'icon' => 'fa-solid fa-heart-pulse', 'color' => '#e53935'],\n\t\t\t\t];\n\n\t\t\t\/\/ Get current object ID (works for both category and page)\n\t\t\t$current_id = get_queried_object_id();\n\n\t\t\tforeach ($custom_categories as $cat_id => $cat_data) {\n\t\t\t\t\/\/ Determine link based on type\n\t\t\t\tif ($cat_data['type'] === 'page') {\n\t\t\t\t\t$link = get_permalink($cat_id);\n\t\t\t\t\tif (!$link) continue;\n\t\t\t\t\t$is_active = ($current_id == $cat_id) ? 'active' : '';\n\t\t\t\t} else {\n\t\t\t\t\t$link = get_category_link($cat_id);\n\t\t\t\t\tif (is_wp_error($link)) continue;\n\t\t\t\t\t$is_active = ($current_id == $cat_id) ? 'active' : '';\n\t\t\t\t}\n\n\t\t\t\t\/\/ Render menu item\n\t\t\t\techo '<li class=\"'.$is_active.'\">';\n\t\t\t\techo '<i class=\"'.$cat_data['icon'].'\" style=\"color:'.$cat_data['color'].'; margin-right:5px;\"><\/i>';\n\t\t\t\techo '<a href=\"'.$link.'\">'.$cat_data['name'].'<\/a>';\n\t\t\t\techo '<\/li>';\n\t\t\t}\n\t\t\t?>\n\t\t\t<\/ul>\n       <!-- <ul>\n        <?php\n        $categories = get_categories();\n        foreach ($categories as $cat) {\n            $icon = 'fa-solid fa-circle-dot';\n\/\/             $iconColor = '#f44336';\n            switch (strtolower($cat->name)) {\n                case '\u0926\u0947\u0936': $icon='fa-solid fa-landmark'; $iconColor='#1e88e5'; break;\n                case '\u092a\u094d\u0930\u0926\u0947\u0936': $icon='fa-solid fa-map-location-dot'; $iconColor='#f4511e'; break;\n                case '\u0928\u0917\u0930': $icon='fa-solid fa-city'; $iconColor='#8e24aa'; break;\n                case '\u091c\u0940\u0935\u0928': $icon='fa-solid fa-heart-pulse'; $iconColor='#e53935'; break;\n                case '\u092e\u0902\u0925\u0928': $icon='fa-solid fa-brain'; $iconColor='#fdd835'; break;\n                case '\u0935\u093f\u0936\u094d\u0935': $icon='fa-solid fa-globe'; $iconColor='#43a047'; break;\n                case '\u0905\u0930\u094d\u0925': $icon='fa-solid fa-indian-rupee-sign'; $iconColor='#fb8c00'; break;\n                case '\u0906\u092f\u093e\u092e': $icon='fa-solid fa-layer-group'; $iconColor='#6d4c41'; break;\n                case '\u092e\u0941\u0916\u094d\u092f': $icon='fa-solid fa-bullhorn'; $iconColor='#FF0000'; break;\n                case '\u0905\u0902\u091a\u0932': $icon='fa-solid fa-location-dot'; $iconColor='#00acc1'; break;\n                case 'breaking': $icon='fa-solid fa-bolt'; $iconColor='#ff3d00'; break;\n            }\n\n\t   $current_cat_id = get_queried_object_id();\n\t$is_active = ($cat->term_id == $current_cat_id) ? 'active' : '';\n\t\/\/echo '<li class=\"'.$is_active.'\"><i class=\"'.$icon.'\" style=\"color:'.$iconColor.';\"><\/i><a href=\"'.get_category_link($cat->term_id).'\">'.$cat->name.'<\/a><\/li>';\n          \n        }\n        ?>\n        <\/ul> -->\n    <\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-befa941 e-con-full e-flex e-con e-child\" data-id=\"befa941\" data-element_type=\"container\">\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>40 =&gt; [&#8216;type&#8217; =&gt; &#8216;category&#8217;, &#8216;name&#8217; =&gt; &#8216;\u0926\u0948\u0928\u093f\u0915-\u0939\u093f\u0928\u094d\u0926\u0915\u0941\u0936&#8217;, &#8216;icon&#8217; =&gt; &#8216;fa-solid fa-newspaper&#8217;, &#8216;color&#8217; =&gt; &#8216;#1565c0&#8217;], &nbsp; 55031 =&gt; [&#8216;type&#8217; =&gt;<\/p>\n","protected":false},"author":1,"featured_media":30694,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"trending-news.php","meta":{"_acf_changed":false,"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-55647","page","type-page","status-publish","has-post-thumbnail","hentry"],"acf":[],"uagb_featured_image_src":{"full":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",625,357,false],"thumbnail":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1-150x150.png",150,150,true],"medium":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1-300x171.png",300,171,true],"medium_large":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",625,357,false],"large":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",625,357,false],"1536x1536":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",625,357,false],"2048x2048":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",625,357,false],"colormag-highlighted-post":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",392,224,false],"colormag-featured-post-medium":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",359,205,false],"colormag-featured-post-small":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",130,74,false],"colormag-featured-image":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",625,357,false],"colormag-default-news":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",150,86,false],"colormag-featured-image-large":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",625,357,false],"colormag-elementor-block-extra-large-thumbnail":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",625,357,false],"colormag-elementor-grid-large-thumbnail":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",600,343,false],"colormag-elementor-grid-small-thumbnail":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",285,163,false],"colormag-elementor-grid-medium-large-thumbnail":["https:\/\/hindkush.in\/wp-content\/uploads\/2020\/12\/feature-image-1.png",347,198,false]},"uagb_author_info":{"display_name":"hinadmin","author_link":"https:\/\/hindkush.in\/?author=1"},"uagb_comment_info":0,"uagb_excerpt":"40 =&gt; [&#8216;type&#8217; =&gt; &#8216;category&#8217;, &#8216;name&#8217; =&gt; &#8216;\u0926\u0948\u0928\u093f\u0915-\u0939\u093f\u0928\u094d\u0926\u0915\u0941\u0936&#8217;, &#8216;icon&#8217; =&gt; &#8216;fa-solid fa-newspaper&#8217;, &#8216;color&#8217; =&gt; &#8216;#1565c0&#8217;], &nbsp; 55031 =&gt; [&#8216;type&#8217; =&gt;","_links":{"self":[{"href":"https:\/\/hindkush.in\/index.php?rest_route=\/wp\/v2\/pages\/55647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hindkush.in\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/hindkush.in\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/hindkush.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hindkush.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55647"}],"version-history":[{"count":12,"href":"https:\/\/hindkush.in\/index.php?rest_route=\/wp\/v2\/pages\/55647\/revisions"}],"predecessor-version":[{"id":56790,"href":"https:\/\/hindkush.in\/index.php?rest_route=\/wp\/v2\/pages\/55647\/revisions\/56790"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hindkush.in\/index.php?rest_route=\/wp\/v2\/media\/30694"}],"wp:attachment":[{"href":"https:\/\/hindkush.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}