This file contains 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(){ | |
$("#modal-launcher, #modal-background, #modal-close").click(function () { | |
$("#modal-content,#modal-background").toggleClass("active"); | |
}); | |
}); | |
#modal-background { | |
display: none; | |
position: fixed; | |
top: 0; |
This file contains 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
// Create custom admin area | |
add_action('admin_menu', 'add_leye_interface'); | |
function add_leye_interface() { | |
add_options_page('LEYE Custom Fields', 'LEYE Custom Fields', '8', 'functions', 'editleyecustomfields'); | |
} | |
function editleyecustomfields() { | |
?> | |
<div class='wrap'> |
This file contains 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 ($) { | |
// DOM ready | |
$(function () { | |
// Toggle open and close nav styles on click | |
$('#nav-toggle').click(function () { |
This file contains 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
$args = array( | |
'post_type' => 'post-custom', | |
'order' => 'ASC', | |
'posts_per_page' => -1, | |
'fields' => 'ids' | |
); | |
$post_ids = get_posts( $args ); | |
foreach ( $post_ids as $id ) { | |
$meta = get_post_meta( $id, '_my_meta', true ); |
This file contains 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 $featured_image = wp_get_attachment_url(get_post_thumbnail_id($post->ID)); | |
echo $featured_image | |
in functions.php: | |
add_theme_support( 'post-thumbnails' ); |
This file contains 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 get_header(); ?> | |
<?php $featured_image = wp_get_attachment_url(get_post_thumbnail_id($page->ID)); | |
if (have_posts()) : while (have_posts()) : the_post(); | |
?> | |
<div class="container" id="services_container"> | |
<img src="<?php echo $featured_image;?>" class="left_image"> | |
<div class="left_box"> | |
<h2><?php the_title();?></h2> | |
<p> | |
<?php the_content();?> |
This file contains 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
## Expires | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType image/jpg "access 1 year" | |
ExpiresByType image/jpeg "access 1 year" | |
ExpiresByType image/gif "access 1 year" | |
ExpiresByType image/png "access 1 year" | |
ExpiresByType text/css "access 1 month" | |
ExpiresByType text/html "access 1 month" | |
ExpiresByType application/pdf "access 1 month" |
This file contains 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
$(window).scroll(function () { | |
/* Check the location of each desired element */ | |
$('.fade').each(function (i) { | |
var bottom_of_object = $(this).offset().top + $(this).outerHeight(); | |
var bottom_of_window = $(window).scrollTop() + $(window).height(); | |
/* If the object is completely visible in the window, fade it in */ | |
if (bottom_of_window > bottom_of_object) { |
This file contains 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
var fadeTimeout; | |
console.log(fadeTimeout); | |
$("#menu").hover(function () { | |
fadeTimeout = setTimeout(showFade, 2000); | |
}, | |
hideFade); | |
function showFade() { | |
var fade = $("<div class='secret-menu'><a href='secret-menu.pdf' style='color:black' >Shhhh! Secret Menu!</a></div>"); | |
fade.appendTo($("#menu")); |
This file contains 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 | |
header("HTTP/1.1 301 Moved Permanently"); | |
header("Location: http://www.New-Website.com"); | |
?> |