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
| //add sidebar | |
| <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('homepage-sidebar') ) : endif; ?> |
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
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| -ms-transform: translate(-50%,-50%); | |
| -webkit-transform: translate(-50%,-50%); | |
| -moz-transform: translate(-50%,-50%); | |
| -o-transform: translate(-50%,-50%); | |
| transform: translate(-50%,-50%); |
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
| //html | |
| <div class="home-item" style="background-image:url(http://placehold.it/500x500)"></div> | |
| //css | |
| .home-item { | |
| width:20%; | |
| background-position: center center; | |
| background-repeat: no-repeat; | |
| background-size: cover; | |
| float: left; | |
| } |
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
| .bg:before { | |
| content: ''; | |
| position: absolute; | |
| top: 0; | |
| right: 0; | |
| bottom: 0; | |
| left: 0; | |
| background-color: rgba(0,0,0,0.3); | |
| } |
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
| function getFeed($feed_url, $limit) { | |
| $content = file_get_contents($feed_url); | |
| $x = new SimpleXmlElement($content); | |
| echo "<ul>"; | |
| $count = $limit; | |
| foreach($x->channel->item as $entry) { |
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
| /* example */ | |
| ul li{ | |
| list-style:none; | |
| text-indent: -1.5em; | |
| padding-left: 3em; | |
| } |
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 screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | |
| /* IE10+ specific styles go here */ | |
| .example { | |
| overflow: visible !important; | |
| } | |
| } | |
| @supports (-ms-accelerator:true) { | |
| /* Edge */ | |
| } | |
| @supports (-ms-ime-align:auto) { |
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 $any = get_posts( 'post_type[]=post&post_type[]=portfolio' ); ?> | |
| <?php foreach(array_slice($any, 0, 3) as $a): ?> | |
| <?php endforeach ?> |
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
| function video_dp_shortcode( $atts ) { | |
| extract( shortcode_atts( | |
| array( | |
| 'poster' => NULL, | |
| 'mp4' => NULL, | |
| 'ogg' => NULL, | |
| 'webm' => NULL, | |
| ), $atts ) | |
| ); |