/** * Get Sub menu for Header menu */ function get_sub_menu() { global $post; if (is_home()) { return; } elseif (is_single()) { $cat_post = get_the_category($post->ID); $current_cat_id = $cat_post[0]->cat_ID; $current_parent_cat_id = get_parent_current_cat_id_by_cat_name($cat_post[0]->cat_name); } elseif (is_category()) { $current_cat_id = get_current_catid(); $current_parent_cat_id = get_current_parent_catid(); } else { return; } $childrens = get_categories(array('child_of' => $current_parent_cat_id, 'hide_empty' => 0)); if (count($childrens) > 0) { echo '<div class="secondaryMenu"><strong>Xem thêm:</strong>'; foreach ($childrens as $children) { $active_sub_menu = $children->cat_ID == $current_cat_id ? ' class="underline bold"' : ''; echo '<a href="' . get_category_link($children->cat_ID) . '"' . $active_sub_menu . '>' . $children->cat_name . '</a>'; } echo '<div class="break"></div></div>'; } }
?> /js/features.min.js" language="javascript" type="text/javascript"></script> <script src="<?php bloginfo('template_url'); ?> /js/logic1.js" language="javascript" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ dropdownMenus(); tooltips(); articleScroller(); scroller("#mostPopular",popularpost_callback,1,"both",1,popSlide); scroller("#fbtv-homepage",buttons_callback,3,"circular",3); touchwipe(".featuredScroller"); touchwipe("#mostPopular"); touchwipe("#fbtv-homepage"); var cat_id = '<?php echo get_current_parent_catid(); ?> '; $('#menu-item-'+cat_id).addClass('current'); //validateForms("#commentform"); }); </script> </div> </div> <!-- end Footer --> <?php wp_footer(); ?> </body> </html>