wp_enqueue_script('jquery');
wp_enqueue_script(
'glm_foundation',
- get_template_directory_uri() . '/js/app.js?v=1.2.45',
+ get_template_directory_uri() . '/js/app.js?v=1.2.46',
'jquery',
'1.0',
true
);
wp_enqueue_script(
'glm_foundation',
- get_template_directory_uri() . '/js/app.js?v=1.2.45',
+ get_template_directory_uri() . '/js/app.js?v=1.2.46',
'jquery',
'1.0',
true
//}
//add_action('admin_init', 'redirect_user_on_role');
+/*
+ * This function returns true when the current page is the page given by ID
+ * or a descendent thereof.
+ */
+if (!function_exists('is_in_tree')) {
+ function is_in_tree( $pid ) {
+ global $post;
+ if ( is_page($pid) ) {
+ return true;
+ }
+ $anc = get_post_ancestors( $post->ID );
+ foreach ( $anc as $ancestor ) {
+ if( is_page() && $ancestor == $pid ) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
+
add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 20;' ), 20 );
add_filter( 'woocommerce_output_related_products_args', 'woo_related_products_limit' );
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><?php wp_title(); ?></title>
- <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/css/app.css?v=1.2.44">
+ <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/css/app.css?v=1.2.46">
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico">
<link href='//fonts.googleapis.com/css?family=Balthazar' rel='stylesheet' type='text/css'>
<?php wp_head();?>
$(this).siblings('ul').toggleClass('open');
});
- var childTarget = $('#page-header .top-bar .top-bar-section > ul:nth-of-type(1) > li:nth-of-type(1) > ul:nth-of-type(1) > li:nth-of-type(7)');
- childTarget.before( $( '<li class="no-dropdown nav-item customlink"><a href="http://gilmorecarmuseum.pastperfectonline.com/" target="_blank">Search Our Collection</a></li>' ) );
-
- //console.log(dropdownTarget);
-
- //<li class="no-dropdown nav-item"><a href="https://www.gilmorecarmuseum.org/visit-explore-2/must-sees/">Customy Link</a></li>
+ let childTarget = $('#page-header .top-bar .top-bar-section > ul:nth-of-type(1) > li:nth-of-type(1) > ul:nth-of-type(1) > li:nth-of-type(7)');
+ let customLink = $( '<li class="no-dropdown nav-item customlink"><a href="http://gilmorecarmuseum.pastperfectonline.com/" target="_blank">Search Our Collection</a></li>' );
+ childTarget.before( customLink );
});
$(this).siblings('ul').toggleClass('open');
});
- var childTarget = $('#page-header .top-bar .top-bar-section > ul:nth-of-type(1) > li:nth-of-type(1) > ul:nth-of-type(1) > li:nth-of-type(7)');
- childTarget.before( $( '<li class="no-dropdown nav-item customlink"><a href="http://gilmorecarmuseum.pastperfectonline.com/" target="_blank">Search Our Collection</a></li>' ) );
-
- //console.log(dropdownTarget);
-
- //<li class="no-dropdown nav-item"><a href="https://www.gilmorecarmuseum.org/visit-explore-2/must-sees/">Customy Link</a></li>
+ let childTarget = $('#page-header .top-bar .top-bar-section > ul:nth-of-type(1) > li:nth-of-type(1) > ul:nth-of-type(1) > li:nth-of-type(7)');
+ let customLink = $( '<li class="no-dropdown nav-item customlink"><a href="http://gilmorecarmuseum.pastperfectonline.com/" target="_blank">Search Our Collection</a></li>' );
+ childTarget.before( customLink );
});
if (!is_page('sponsors')) {
echo '<a class="tab" href="' . esc_url(get_permalink(49)).'"><h3>Sponsors</h3></a>';
}?>
- </div>
\ No newline at end of file
+ </div>
+
+
+
+<?php if (is_in_tree(526)) { ?>
+ <script>
+ let sidebarTarget = $('ul.sidebar > li:nth-of-type(4)');
+ let customSidebarLink = $( '<li class="page_item customlink"><a href="http://gilmorecarmuseum.pastperfectonline.com/" target="_blank">Search Our Collection</a></li>' );
+ sidebarTarget.before( customSidebarLink );
+ </script>
+<?php } ?>
\ No newline at end of file
Author: Gaslight Media
Author URI: http://www.gaslightmedia.com
Description: A theme created for Gilmore Car Museum.
-Version: 1.2.45
+Version: 1.2.46
*/