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
// Add 250 x 250 thumbnail to every image uploaded | |
add_image_size( 'gallery-thumbnail', 250, 250, true ); | |
// gallery_thumbnail is a custom size! It can have any name. | |
// Call it later in a gallery loop. | |
<section id="gallery_page"> | |
<ul class="gal columns-4"> | |
<?php | |
$args = array( |
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
<?php $my_query = new WP_Query('page_id=87'); | |
while ($my_query->have_posts()) : $my_query->the_post(); | |
$do_not_duplicate = $post->ID;?> | |
<div class="entry"> | |
<?php the_content('read more »'); ?> | |
</div> | |
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
if($post->ID == '4331') {} else {} |
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
<?php | |
header("HTTP/1.1 301 Moved Permanently"); | |
header("Location: http://www.new.com"); | |
?> |