max_num_pages; if (!$numpages) { $numpages = 1; } } /** * We construct the pagination arguments to enter into our paginate_links * function. */ $pagination_args = array( 'base' => get_pagenum_link(1) . '%_%', 'format' => 'page/%#%', 'total' => $numpages, 'current' => $paged, 'show_all' => False, 'end_size' => 1, 'mid_size' => $pagerange, 'prev_next' => True, 'prev_text' => __('«'), 'next_text' => __('»'), 'type' => 'plain', 'add_args' => false, 'add_fragment' => '' ); $paginate_links = paginate_links($pagination_args); if ($paginate_links) { echo ""; } } /* ---- SHORTCODE ---- */ function shortcode_col($atts, $content) { extract(shortcode_atts( array( 'pousse' => 'FR' ), $atts )); if ($pousse == "1") { $nbr = "4"; } elseif ($pousse == "2") { $nbr = "8"; } elseif ($pousse == "0") { $nbr = "0"; } return '
' . $content . '
'; } add_shortcode('col', 'shortcode_col'); /* ADD MENU */ function register_my_menu() { register_nav_menu('MegaMenu', __('MegaMenu')); } add_action('init', 'register_my_menu'); ?>