Inserting jvectormap through custom template
-
Hello, I’m fairly new to wordpress (less than a week experience) and I’m trying to get a jvectormap to show up in my customizr child theme using a custom template.
I am trying to make the vector map to load specific page’s content when a region is clicked. just like this test page
and more info about it in
https://github.com/bjornd/jvectormap/issues/59However, I can’t even get my map to show up in the page itself.
Here is my code for the template that will have the map
<?php /* Template Name: jvectormap */ wp_deregister_script( 'jquery' ); wp_enqueue_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', array(), null, false ); wp_enqueue_style( 'jvectormap-style', get_stylesheet_directory_uri() . '/js/jquery-jvectormap.css', array(), null, 'all' ); wp_enqueue_script( 'jvectormap-script', get_stylesheet_directory_uri() . '/js/jquery-jvectormap.min.js', array( 'jquery' ),null , true ); wp_enqueue_script( 'jvectormap-map', get_stylesheet_directory_uri() . '/js/jquery-jvectormap-world-mill-en.js', array( 'jquery' ), null, true ); wp_enqueue_script( 'jvectormap-map_code', get_stylesheet_directory_uri() . '/js/map_config.js', array( 'jquery' ), null, true ); ?> <?php do_action( '__before_main_wrapper' ); ##hook of the header with get_header ?> <div id="main-wrapper" class="<?php echo tc__f( 'tc_main_wrapper_classes' , 'container' ) ?>"> <?php do_action( '__before_main_container' ); ##hook of the featured page (priority 10) and breadcrumb (priority 20)...and whatever you need! ?> <div class="container" role="main"> <div class="row"> <?php do_action( '__before_article_container'); ##hook of left sidebar?> <div id="content" class="<?php echo tc__f( '__screen_layout' , tc__f ( '__ID' ) , 'class' ) ?> article-container"> <?php do_action ('__before_loop');##hooks the header of the list of post : archive, search... ?> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : ##all other cases for single and lists: post, custom post type, page, archives, search, 404 ?> <?php the_post(); ?> <?php do_action ('__before_article') ?> <article <?php tc__f('__article_selectors') ?>> <?php do_action( '__loop' ); ?> </article> <?php do_action ('__after_article') ?> <?php endwhile; ?> <?php endif; ##end if have posts ?> <?php do_action ('__after_loop');##hook of the comments and the posts navigation with priorities 10 and 20 ?> </div><!--.article-container --> <?php do_action( '__after_article_container'); ##hook of left sidebar ?> </div><!--.row --> </div><!-- .container role: main --> <?php do_action( '__after_main_container' ); ?> </div><!--#main-wrapper"--> <?php do_action( '__after_main_wrapper' );##hook of the footer with get_get_footer ?>Did I do anything wrong? Any help is appreciated.
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
The topic ‘Inserting jvectormap through custom template’ is closed to new replies.
