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
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
//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
<div id="top-image"></div> | |
<style> | |
#top-image { | |
background:url('https://d3ui957tjb5bqd.cloudfront.net/images/screenshots/products/0/8/8905/red-rocks-park-o.jpg') -25px -50px; | |
position:fixed ; | |
top:0; | |
width:100%; | |
z-index:0; | |
height:100%; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<main class="cd-main-content"> | |
<div class="cd-fixed-bg cd-bg-1"> | |
<h1>Alternate Fixed & Scroll Backgrounds</h1> | |
</div> <!-- cd-fixed-bg --> | |
<div class="cd-scrolling-bg cd-color-2"> | |
<div class="cd-container"> | |
<p> | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolore incidunt suscipit similique, dolor corrupti cumque qui consectetur autem laborum fuga quas ipsam doloribus sequi, mollitia, repellendus sapiente repudiandae labore rerum amet culpa inventore, modi non. Quo nisi veritatis vitae nam, labore fugit. Inventore culpa iusto, officia exercitationem. Voluptates quibusdam odit odio incidunt consequatur, consectetur aspernatur optio vitae molestias, quas repellendus fugit ullam culpa, eligendi et dignissimos voluptatibus illum? Molestias aliquam nostrum quasi ipsa culpa, iusto explicabo ut error, consequuntur enim temporibus, adipisci tempora voluptate, id consequatur mollitia eveniet blanditiis. Illo quod repellendus alias? Cum rem doloremque adipisci accusantium? Saepe, n |
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
bottom:55px; | |
width:80%; | |
text-align: center; | |
position: absolute; | |
margin: 0 auto; | |
left: 0; | |
right: 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
[gravityform id=1 title=false description=false ajax=true tabindex=49] |
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_action( 'admin_init', 'my_remove_menu_pages' ); | |
function my_remove_menu_pages() { | |
global $user_ID; | |
if ( current_user_can( 'editor' ) ) { | |
remove_menu_page( 'edit.php' ); | |
remove_menu_page( 'edit-comments.php' ); | |
remove_menu_page( 'edit.php?post_type=home_services' ); | |
remove_menu_page( 'edit.php?post_type=modulistiche' ); |
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 $args = array( | |
'post_type' => 'reply', | |
'post_status' => 'publish', | |
'posts_per_page' => 3, | |
'order' => 'DESC', | |
'orderby' => 'date' | |
); | |
$the_query = new WP_Query( $args ); ?> | |
<?php if ($the_query->have_posts()) : ?> |