Skip to content

Instantly share code, notes, and snippets.

View jaredkc's full-sized avatar

Jared Cornwall jaredkc

  • Salt Lake City, UT
View GitHub Profile
@jaredkc
jaredkc / social-comments-markup.html
Created June 1, 2012 03:45
Working HTML theme developers can use while creating custom styles for Social WordPress plugin
<!--
This is a work in progress. Showing most of the possible markup generated by the Social WordPress plugin.
Simply cut and paste this HTML into your theme while creating your CSS.
Social plugin available at:
- http://mailchimp.com/social-plugin-for-wordpress/
- Social on GitHub](https://github.com/crowdfavorite/wp-social
Working HTML created by referencing http://alexking.org
-->
@jaredkc
jaredkc / build_carousel_view.php
Last active October 7, 2015 01:47
Carrington Build : Carousel custom view
@jaredkc
jaredkc / dequeue_build_styles.php
Last active October 7, 2015 01:47
Carrington Build : remove default styles
// Remove default Carrington Build styles, be sure to add theme specific styles instead
function dequeue_build_styles() {
wp_dequeue_style('cfct-build-css');
}
add_action('wp_enqueue_scripts', 'dequeue_build_styles', 999);
@jaredkc
jaredkc / wp-featured-img-check.php
Last active October 7, 2015 02:57
WordPress Theme : Check for featured image
@jaredkc
jaredkc / Preferences.sublime-settings
Last active October 9, 2015 06:38
My User Settings for Sublime Text 2
{
"create_window_at_startup": false,
"detect_indentation": false,
"draw_white_space": "all",
"font_size": 14.0,
"font_options":
[
"gray_antialias"
],
"highlight_line": true,
@jaredkc
jaredkc / wp-build_deregister_modules.php
Last active October 10, 2015 09:37
Carrington Build : remove modules
/**
* Remove modules that are not wanted/needed.
* This example removes the carousel and hero modules.
* You just need to pass the ID of desired module(s) to remove.
*/
function build_deregister_modules() {
cfct_build_deregister_module('cfct_module_carousel');
cfct_build_deregister_module('cfct_module_hero');
}
add_action('cfct-modules-included', 'build_deregister_modules');
@jaredkc
jaredkc / wp-recent-posts.php
Last active December 9, 2015 21:38
WordPress Recent Posts
/**
* Outputs recent posts with the desired markup and data.
* Used in place of a widget to meet design requirements.
*
* Load in your theme template files with this <?php _my_recent_posts(); ?>
*/
function _my_recent_posts($recent_number = '8') {
$args = array( 'numberposts' => $recent_number );
$recent_posts = wp_get_recent_posts( $args );
echo '<ul class="recent-entries">';
@jaredkc
jaredkc / middle.css
Last active December 14, 2015 01:29
CSS to center vertical and horizontal
.middle {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
margin: auto;
}
@jaredkc
jaredkc / script.js
Created February 28, 2013 20:16
Scroll to jQuery
/**
* Smooth Scrolling Anchor Links
* http://www.sycha.com/jquery-smooth-scrolling-internal-anchor-links
*/
$(".scroll").click(function(event){
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top}, 500);
});
@jaredkc
jaredkc / sample.html
Created May 10, 2013 17:29
Responsive iframe (for Google Maps and such). Thanks to Niklaus Gerber: http://niklausgerber.com/blog/responsive-google-or-bing-maps/
<!-- Responsive iFrame -->
<div class="flexible-container">
<iframe>i</iframe>
</div