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
.container{ | |
display: block; | |
margin: 0 auto; | |
width: 974px; | |
} | |
.column{ | |
float: left; | |
margin-right: 10px; | |
} |
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
// method 1 | |
$(function() { | |
$('nav a').bind('click',function(event){ | |
var $anchor = $(this); | |
$('html, body').stop().animate({ | |
scrollTop: $($anchor.attr('href')).offset().top | |
}, 1500,'easeInOutExpo'); | |
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 | |
/* | |
Plugin Name: Pinterest Img Tag Button | |
Description: This will wrap images in the_content with Pinterest Button code | |
Author: Jan Dembowski | |
Author URI: http://blog.dembowski.net/ | |
Version: 0.5 | |
From http://wordpress.org/support/topic/add-code-before-each-image |
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
/** | |
* Copyright Widget | |
*/ | |
class my_custom_copyright_widget extends WP_Widget { | |
/** constructor */ | |
function my_custom_copyright_widget() { | |
parent::WP_Widget(false, $name = 'Copyright Text'); | |
} | |
/** @see WP_Widget::widget */ |
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
.cf:before, | |
.cf:after { | |
content: " "; /* 1 */ | |
display: table; /* 2 */ | |
} | |
.cf:after { | |
clear: both; | |
} |
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
/*----------------------------------------------*/ | |
/* Image Field | |
/*----------------------------------------------*/ | |
/* Return value: Attachment ID */ | |
<?php if(get_field('logo')): ?> | |
<?php | |
$attachment_id = get_field('logo'); | |
$size = "vendor-logo"; // (thumbnail, medium, large, full or custom size) |
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
// .dP"Y8 888888 db 88""Yb dP""b8 88 88 | |
// `Ybo." 88__ dPYb 88__dP dP `" 88 88 | |
// o.`Y8b 88"" dP__Yb 88"Yb Yb 888888 | |
// 8bodP' 888888 dP""""Yb 88 Yb YboodP 88 88 | |
// dP""b8 88 88 .dP"Y8 888888 dP"Yb 8b d8 888888 88 888888 88 8888b. .dP"Y8 | |
// dP `" 88 88 `Ybo." 88 dP Yb 88b d88 88__ 88 88__ 88 8I Yb `Ybo." | |
// Yb Y8 8P o.`Y8b 88 Yb dP 88YbdP88 88"" 88 88"" 88 .o 8I dY o.`Y8b | |
// YboodP `YbodP' 8bodP' 88 YbodP 88 YY 88 88 88 888888 88ood8 8888Y" 8bodP' |
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 | |
//---------------------------------------------- | |
// Filter Post Data | |
//---------------------------------------------- | |
/* The purpose of this filter is to take the | |
/* post meta from a custom field and save it | |
/* into post_content */ | |
// Tack our filter onto the wp_insert_post_data action |
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 | |
//setup new query | |
$query = new WP_query( | |
array( | |
'posts_per_page' => 10, // ?? | |
'post_type' => 'custom-post-type', // custom post type | |
'paged' => get_query_var('paged'), | |
'meta_key' => 'wpcf-meta-key', | |
'orderby' => 'meta_value title', |
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
There is no specific template for child pages, but you can do this pretty easily with the get_template_part() function. | |
First create a file called "content-child.php". | |
Second create a file called "content.php". | |
Next, inside of page.php, place this: | |
<?php | |
if( $post->post_parent !== 0 ) { |
OlderNewer