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('genesis_before_loop', 'kr_facetwp_start'); | |
function kr_facetwp_start() { | |
echo '<div class="facetwp-template">'; | |
} | |
add_action('genesis_after_loop', 'kr_facetwp_end'); | |
function kr_facetwp_end() { | |
echo '</div><!-- close facetwp-->'; | |
} |
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
function remove_widget_action() { | |
global $wp_widget_factory; | |
remove_action( 'wp_head', array($wp_widget_factory->widgets['Simple_Social_Icons_Widget'], 'css') ); | |
} | |
add_action('wp_head', 'remove_widget_action', 1); |
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 | |
//* Add current parent class to Bill Erickson's Sub Page Widget | |
add_filter('be_subpages_widget_class', 'be_add_class', 10, 2); | |
function be_add_class( $class, $subpage ) { | |
global $post; | |
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 | |
/** | |
* WordPress - Resize and save remote images | |
* | |
* @author Kyle Rumble | |
* | |
* @param string $image | |
* @param string $new_name | |
* @param int $width |
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
$(document).ready(function() { | |
$('nav.primary a').click(function(event) { // the elements you click to scroll | |
event.preventDefault(); | |
var link = this; // you need this if you are using hash links on ex: a href="#link" to id="link" | |
$.smoothScroll({ | |
offset: -160, // adjusts where the scroll will stop so the height of the scrolling element plus the height of the element you are scrolling to. | |
speed: 2000, | |
scrollTarget: link.hash | |
}); | |
}); |
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
/* | |
Changing Genesis H1 Post Titles to H2 | |
*/ | |
add_filter( 'genesis_post_title_output', 'ac_post_title_output', 15 ); | |
function ac_post_title_output( $title ) | |
{ if ( is_home() || is_archive() ) | |
$title = sprintf( '<h1 class="entry-title"><a href="' . get_permalink() . '">%s</a></h1>', apply_filters( 'genesis_post_title_text',get_the_title() ) ); | |
return $title; |
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
// CANNOT GET THIS TO WORK | |
$(".asp_main_container").on("asp_results_show", function(event, id, instance) { | |
// Console does not log anyhting | |
console.log(id, instance, phrase); | |
}); |
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 | |
/* | |
uses: acf gallery field | |
launches gallery from single button | |
*/ | |
function service_gallery() { | |
global $post; | |
$photos = get_field( 'gallery' ); |
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 | |
add_action('admin_head', 'my_custom_styles'); | |
function my_custom_styles() { | |
echo '<style> | |
.class-name { | |
padding: 100px; | |
} | |
</style>'; |
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 | |
add_action( 'admin_enqueue_scripts', 'load_admin_scripts' ); | |
function load_admin_scripts() { | |
wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/css/subscriber.css', false, '1.0' ); | |
} |