Last active
February 22, 2016 03:10
-
-
Save mavieth/63621bd355acdc201d48 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // This file assumes that you have included the nav walker from https://github.com/twittem/wp-bootstrap-navwalker | |
| // somewhere in your theme. | |
| ?> | |
| <header class="banner navbar navbar-default navbar-static-top material-static-top" role="banner"> | |
| <div class="container"> | |
| <div class="navbar-header material-header"> | |
| <link href='https://fonts.googleapis.com/css?family=Roboto:400,900,700,300' rel='stylesheet' type='text/css'> | |
| <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> | |
| <span class="sr-only"><?= __('Toggle navigation', 'sage'); ?></span> | |
| <span class="icon-bar"></span> | |
| <span class="icon-bar"></span> | |
| <span class="icon-bar"></span> | |
| </button> | |
| </div> | |
| <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> | |
| <!-- Navigation --> | |
| <nav class="collapse navbar-collapse" role="navigation"> | |
| <?php | |
| if (has_nav_menu('primary_navigation')) : | |
| wp_nav_menu(['theme_location' => 'primary_navigation', 'walker' => new wp_bootstrap_navwalker(), 'menu_class' => 'nav navbar-nav material-nav']); | |
| endif; | |
| ?> | |
| </nav> | |
| <?php | |
| $src = wp_get_attachment_image_src( get_post_thumbnail_id(get_the_id()), 'large' ); | |
| $url = $src[0]; | |
| ?> | |
| </div> | |
| <!-- Jumbotron --> | |
| <div class="jumbotron" style=" | |
| background: url('<?php echo $url; ?>'); | |
| background-size: | |
| cover; | |
| height: 350px; | |
| opacity: 1; | |
| background-color: black; | |
| color: white;"> | |
| <div class="container"> | |
| <!-- Change per page --> | |
| <?php if (is_archive()): ?> | |
| <h1 class="main-page-title"><?php echo single_tag_title(); ?> </h1> | |
| <?php else: ?> | |
| <h1 class="main-page-title"><?php echo the_title(); ?> </h1> | |
| <p><?php echo get_post_custom_values('page_subtitle', get_the_id())[0]; ?> </p> | |
| <?php endif ?> | |
| </div> | |
| </div> | |
| </header> | |
Author
I feel like I'm sticking it to the man when I use other people's servers to load resources.
You can still load it from other people's servers with the api. 💯
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From what I read I think you should use
wp_enqueue_styleandwp_enqueue_scriptfor adding styles/scripts.