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
| @media print { | |
| body * { | |
| visibility: hidden; } | |
| .content * { | |
| visibility: visible; } | |
| .content { | |
| position: absolute; | |
| left: 0; | |
| top: 0; } } |
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
| Have a different sub nav for each page. | |
| 1.) add the following to functions.php of your theme: | |
| functions: | |
| register_sidebar( array( | |
| 'name' => __( 'Secondary Nav', 'twentytwelve' ), | |
| 'id' => 'sidebar-4', | |
| 'description' => __( 'Appears when there is children from the main nav. Must manually enable.', 'twentytwelve' ), | |
| 'before_widget' => '<aside id="%1$s" class="widget %2$s">', |
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
| <script> | |
| // the tallest column on the page will be the example for all other elements with class .col making them all as tall as the tallest. | |
| $(window).load(function() { | |
| var tallest = 0; | |
| $('.col').each(function(){ | |
| if($(this).outerHeight() > tallest) tallest = $(this).outerHeight(); | |
| }); | |
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
| /*SLIDER */ | |
| .slider { width: 100%; height: 573px; overflow: hidden; position: relative; margin-bottom:11px; margin-top: -5px; } | |
| .slider .metaslider .slides img { height:573px; position: absolute; left: 50%; -webkit-transform: translateX(-50%); -moz-transform: translateX(-50%); -ms-transform: translateX(-50%); -o-transform: translateX(-50%); transform: translateX(-50%); width: 2000px; } |
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
| .slider { width: 100%; height: 272px; overflow: hidden; position: relative; margin-bottom:11px; background:#434575; border-top:5px solid #C53D3D; } | |
| .slider .metaslider .slides img { height:267px; position: absolute; left: 50%; -webkit-transform: translateX(-50%); -moz-transform: translateX(-50%); -ms-transform: translateX(-50%); -o-transform: translateX(-50%); transform: translateX(-50%); width: 2000px; } |
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
| // ========================================================================================= | |
| /* limit the amount of the excerpt, and then display read more. | |
| HTML: | |
| <?php the_excerpt(32); ?> | |
| PHP for functions: | |
| */ | |
| function excerpt($limit) { |
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
| <div class="slider center cf"> | |
| <?php if(has_post_thumbnail()) { | |
| the_post_thumbnail("full", array('class'=>"banner-image")); | |
| } else { ?> | |
| <img src="<?php echo get_template_directory_uri(); ?>/images/banner.jpg" class="banner-image" alt="Banner Image"> | |
| <?php } ?> | |
| </div> |
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
| //in your html use the following: | |
| <div id="printableArea"> | |
| <h1>Print me</h1> | |
| </div> | |
| <input type="button" onclick="printDiv('printableArea')" value="print a div!" /> | |
| //in your head/scripts area.. use the following: | |
| <script type="text/javascript"> |
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
| //in header.php | |
| <script src="//s7.addthis.com/js/300/addthis_widget.js" type="text/javascript"></script> | |
| // in html | |
| <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> | |
| <a class="addthis_button_facebook"></a> | |
| <a class="addthis_button_twitter"></a> | |
| <a class="addthis_button_email"></a> | |
| <a class="addthis_button_print"></a> | |
| <a class="addthis_button_compact"></a> |
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
| /* redirects old URLs to new location*/ | |
| add_action('template_redirect','my_template_redirect'); | |
| function my_template_redirect() { | |
| $redirect_to = false; | |
| list($url_path,$params) = explode('?',$_SERVER['REQUEST_URI']); | |
| $path_parts = explode('/',trim($url_path,'/')); | |
| switch ($path_parts[0]) { | |
| case 'previous-url.php': | |
| $redirect_to = '/new-page-url/'; |