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
jQuery("body").bind("contextmenu",function(e){ | |
return false; | |
}); | |
jQuery("body").bind("cut copy paste",function(e) { | |
e.preventDefault(); | |
}); | |
document.onkeydown = function(e) { | |
if (e.ctrlKey && |
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 | |
//* Advance Theme Setting Defaults | |
add_filter( 'genesis_theme_settings_defaults', 'advance_theme_defaults' ); | |
function advance_theme_defaults( $defaults ) { | |
$defaults['blog_title'] = 'image'; | |
$defaults['blog_cat_num'] = 5; | |
$defaults['content_archive'] = 'full'; | |
$defaults['content_archive_limit'] = 200; |
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 | |
//* Auto post image | |
add_action( 'genesis_entry_header', 'advance_post_featured_image', 15 ); | |
function advance_post_featured_image() { | |
if ( is_archive() ) | |
return; |
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 | |
/* | |
* Remove Widget Title using ! | |
*/ | |
add_filter( 'widget_title', 'jay_remove_widget_title' ); | |
function jay_remove_widget_title( $widget_title ) { | |
if ( substr ( $widget_title, 0, 1 ) == '!' ) | |
return; | |
else |
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 | |
// Genesis custom parameter loop | |
add_action('genesis_before_loop', 'jay_before_loop'); | |
function jay_before_loop () { | |
global $query_string; | |
query_posts($query_string . "&order=DESC&orderby=date"); | |
} |
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 | |
//* START WIDGET | |
class Testimonial_Widget extends WP_Widget { | |
function __construct() { | |
parent::__construct( | |
'testimonial_widget', // Base ID | |
__('Testimonial Widgets', 'marilynhorowitz'), // Name |
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 | |
// Filter post title | |
// to add custom url, just add a custom field with name ExternalURL and url as value where you want the title to go when clicked | |
add_filter( 'genesis_post_title_output', 'jay_post_title_output', 15 ); | |
function jay_post_title_output( $title ) { | |
if ( is_singular() && get_post_meta( get_the_ID(), 'ExternalURL', true) ) | |
$exturl = get_post_meta( get_the_ID(), 'ExternalURL', true); |
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 | |
//* Modify the header URL - HTML5 Version | |
add_filter( 'genesis_seo_title', 'crizelda_header_title', 10, 3 ); | |
function crizelda_header_title( $title, $inside, $tag ) { | |
$tag = ( is_home() || is_front_page() ) ? 'h1' : 'p'; | |
$inside = sprintf( '<a href="%s" title="%s">%s</a>', get_bloginfo('url'), esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) ); | |
return sprintf( '<%1$s class="site-title">%2$s</%1$s>', $tag, $inside ); |
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 | |
/* Redirect user after check out */ | |
add_action( 'template_redirect', 'jay_custom_redirect_after_purchase' ); | |
function jay_custom_redirect_after_purchase() { | |
global $wp; | |
if ( is_checkout() && ! empty( $wp->query_vars['order-received'] ) ) { | |
wp_redirect( 'http://www.yoururl.com/your-page/' ); | |
exit; |
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 | |
/** | |
* Redirect back to homepage and not allow access to | |
* WP admin for Subscribers. | |
*/ | |
function jay_redirect_admin(){ | |
if ( ! current_user_can( 'edit_posts' ) ){ | |
wp_redirect( site_url('/my-account') ); | |
exit; |