-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-test.php
74 lines (62 loc) · 2.66 KB
/
page-test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/*
Template Name: My Custom Page for displaying map
*/
function my_scripts_method() {
wp_deregister_script( 'spin' );
wp_register_script( 'spin', get_stylesheet_directory_uri() . '/javascript/spin.min.js', array(), NULL, true);
wp_enqueue_script( 'spin' );
wp_deregister_script( 'spinjquery' );
wp_register_script( 'spinjquery', get_stylesheet_directory_uri() . '/javascript/jquery.spin.js', array(), NULL, true);
wp_enqueue_script( 'spinjquery' );
wp_deregister_script( 'openlayers' );
wp_register_script( 'openlayers', 'http://openlayers.org/api/OpenLayers.js', array(), NULL, true);
wp_enqueue_script( 'openlayers' );
wp_deregister_script( 'mapstraction' );
wp_register_script( 'mapstraction', 'http://mapstraction.com/mxn/build/latest/mxn.js?(openlayers)', array(), NULL, true);
wp_enqueue_script( 'mapstraction' );
wp_deregister_script( 'map' );
wp_register_script( 'map', get_stylesheet_directory_uri() . '/javascript/map2.js');
wp_enqueue_script( 'map' );
}
add_action('wp_enqueue_scripts', 'my_scripts_method');
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that
* other 'pages' on your WordPress site will use a different template.
*
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0
*/
get_header(); ?>
<div id="main-content" class="main-content">
<?php
if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
// Include the featured content template.
get_template_part( 'featured-content' );
}
?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php
// Start the Loop.
while ( have_posts() ) : the_post();
// Include the page content template.
get_template_part( 'content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
endwhile;
?>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #main-content -->
<?php
get_sidebar();
get_footer();
?>