• CDGi

    (@cdgi)


    Hello,

    I am trying to put a interactive google map in the header. Or if it is possible to put it in a slideshow.

Viewing 9 replies - 1 through 9 (of 9 total)
  • mydog8it

    (@mydog8it)

    Does your theme have a header widget area?

    Thread Starter CDGi

    (@cdgi)

    No, the theme I am using does not have a header widget area.

    The theme I am using is Customizr.

    mydog8it

    (@mydog8it)

    You’ll have to add your map embed code to the header.php theme file in order to do it. Or you could just paste your map embed code into a text widget and stick it in the sidebar or footer.

    Thread Starter CDGi

    (@cdgi)

    You wouldn’t happen to know where to put it would you.

    Here is the header.php code for the theme.

    <?php
    /**
    * The Header for Customizr.
    *
    * Displays all of the <head> section and everything up till <div id=”main-wrapper”>
    *
    * @package Customizr
    * @since Customizr 1.0
    */
    ?>
    <!DOCTYPE html>
    <!–[if IE 7]>
    <html class=”ie ie7″ <?php language_attributes(); ?>>
    <![endif]–>
    <!–[if IE 8]>
    <html class=”ie ie8″ <?php language_attributes(); ?>>
    <![endif]–>
    <!–[if !(IE 7) | !(IE 8) ]><!–>
    <html <?php language_attributes(); ?>>
    <!–<![endif]–>
    <?php
    //the ‘__before_body’ hook is used by TC_header_main::$instance->tc_head_display()
    do_action( ‘__before_body’ );
    ?>

    <body <?php body_class(); ?> <?php echo apply_filters(‘tc_body_attributes’ , ‘itemscope itemtype=”https://schema.org/WebPage”&#8216;) ?>>

    <?php do_action( ‘__before_header’ ); ?>

    <header class=”<?php echo implode( ” “, apply_filters(‘tc_header_classes’, array(‘tc-header’ ,’clearfix’, ‘row-fluid’) ) ) ?>” role=”banner”>
    <?php
    // The ‘__header’ hook is used with the following callback functions (ordered by priorities) :
    //TC_header_main::$instance->tc_logo_title_display(), TC_header_main::$instance->tc_tagline_display(), TC_header_main::$instance->tc_navbar_display()
    do_action( ‘__header’ );
    ?>
    </header>
    <?php
    //This hook is used for the slider : TC_slider::$instance->tc_slider_display()
    do_action ( ‘__after_header’ )
    ?>

    mydog8it

    (@mydog8it)

    <header class="<?php echo implode( " ", apply_filters('tc_header_classes', array('tc-header' ,'clearfix', 'row-fluid') ) ) ?>" role="banner">
    <?php
    // The '__header' hook is used with the following callback functions (ordered by priorities) :
    //TC_header_main::$instance->tc_logo_title_display(), TC_header_main::$instance->tc_tagline_display(), TC_header_main::$instance->tc_navbar_display()
    do_action( '__header' );
    ?>
    <div class="map">paste your map code here</div>
    </header>

    That will get it in there. Then you’ll need to revise the .css to get it to look right. You’ll probably need to reduce the width of the title area, increase the height of the header if it has one set, and add some styling to the map div.

    You could also add a widget area in the header then place your map in a widget, but that’s more complicated. There are tutorials on here somewhere…

    Thread Starter CDGi

    (@cdgi)

    Thanks

    You wouldn’t happen to know how to just have it on one page, would you.

    mydog8it

    (@mydog8it)

    On the home page or another page?

    Thread Starter CDGi

    (@cdgi)

    On another page. I just want it on this page…

    https://wptest.cinemadesigngroup.com/?page_id=68

    mydog8it

    (@mydog8it)

    OK. Take it out of the header. You’re going to need to use a custom page template, then pick that template for the contact page. Someone more experienced than I will need to tell you the proper way to do it. I *think* you’ll want to use the before container hook.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Interactive Google Maps for header’ is closed to new replies.