__( 'Main Navigation', 'themify' ), 'footer-nav' => __( 'Footer Navigation', 'themify' ), ) ); } /////////////////////////////////////// // Default Main Nav Function /////////////////////////////////////// function default_main_nav() { echo ''; } /////////////////////////////////////// // Register Widgets /////////////////////////////////////// if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => 'Sidebar', 'id' => 'sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } /////////////////////////////////////// // Page navigation /////////////////////////////////////// function themify_pagenav($before = '', $after = '') { global $wpdb, $wp_query; $request = $wp_query->request; $posts_per_page = intval(get_query_var('posts_per_page')); $paged = intval(get_query_var('paged')); $numposts = $wp_query->found_posts; $max_page = $wp_query->max_num_pages; if(empty($paged) || $paged == 0) { $paged = 1; } $pages_to_show = apply_filters('themify_filter_pages_to_show', 8); $pages_to_show_minus_1 = $pages_to_show-1; $half_page_start = floor($pages_to_show_minus_1/2); $half_page_end = ceil($pages_to_show_minus_1/2); $start_page = $paged - $half_page_start; if($start_page <= 0) { $start_page = 1; } $end_page = $paged + $half_page_end; if(($end_page - $start_page) != $pages_to_show_minus_1) { $end_page = $start_page + $pages_to_show_minus_1; } if($end_page > $max_page) { $start_page = $max_page - $pages_to_show_minus_1; $end_page = $max_page; } if($start_page <= 0) { $start_page = 1; } if ($max_page > 1) { echo $before.''.$after; } } /////////////////////////////////////// // Add wmode transparent and post-video container for responsive purpose /////////////////////////////////////// function themify_add_video_wmode_transparent($html, $url, $attr) { $html = '
' . $html . '
'; if (strpos($html, "" >

%s', get_comment_author_link()) ?>
@

comment_approved == '0') : ?>

'comment', 'depth' => $depth, 'reply_text' => __( 'Reply', 'themify' ), 'max_depth' => $args['max_depth']))) ?>