// Insert style to display page's thumbnail $depth == 0 && has_post_thumbnail((int)$object->object_id
$item_style = '';
+// echo $object->classes[0];
// echo '<pre>', print_r($object), '</pre>';
+
// if($object->ID == 330 && $object->has_children == 1){
// $item_html .= "<ul class='sub-menu dropdown medium-block-grid-9'><li>test</li></ul>";
// }
////// echo "<pre>", print_r($object), "</pre>";
if ( $depth !== 0 && has_post_thumbnail( (int)$object->object_id ) ) {
- $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( (int)$object->object_id ), 'large' );
+ $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( (int)$object->object_id ), 'large' );
$item_style .= "<style>
#menu-main #menu-item-".$object->ID.":before {
background-size: cover;
</style>";
- } else if( $depth !== 0 && $object->type == "taxonomy") {
-
- $thumbnail = z_taxonomy_image_url( (int)$object->object_id );
-
+ } else if($object->classes[0] === 'family-specials' ){
+ $thumbnail = get_template_directory_uri() . '/assets/family%20specials%20for%20nav.jpg';
$item_style .= "<style>
#menu-main #menu-item-".$object->ID.":before {
display: inline-block;
content: ' ';
background-image: url('".$thumbnail."');
background-size: cover;
+ background-position: center bottom;
</style>";
-
- } else if( $depth !== 0 && ! has_post_thumbnail( (int)$object->object_id ) ){
+
+ } else if($object->classes[0] === 'multiple-trips' ){
+ $thumbnail = get_template_directory_uri() . '/assets/Multiple%20trips.jpg';
+ $item_style .= "<style>
+ #menu-main #menu-item-".$object->ID.":before {
+ display: inline-block;
+ width: 200px;
+ height: 100px;
+ content: ' ';
+ background-image: url('".$thumbnail."');
+ background-size: cover;
+ background-position: center bottom;
+ </style>";
+
+ }else if( $depth !== 0 && ! has_post_thumbnail( (int)$object->object_id ) ){
$thumbnail = get_template_directory_uri() . '/assets/interior-pg-header-image.jpg';
$item_style .= "<style>
#menu-main #menu-item-".$object->ID.":before {
background-image: url('".$thumbnail."');
background-size: cover;
</style>";
- }
+ }
//$output .= ( 0 == $depth ) ? '<li class="divider"></li>' : '';
$classes = empty( $object->classes ) ? array() : (array) $object->classes;
if ( in_array( 'label', $classes ) ) {