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
$('form').on('submit', function(e) { | |
$.each($('select'), function(i, v) { | |
$.each($('select option:selected'), function(i, v) { | |
if($(this).val() === ''){ | |
$(this).parent('select').prop('disabled', 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
# Disable TINYMCE on XPROFILE | |
function antipole_remove_rich_text() { | |
return false; | |
} | |
add_filter('bp_xprofile_is_richtext_enabled_for_field', 'antipole_remove_rich_text'); |
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 | |
# BUTTONS | |
function sc_btn_default($atts, $content = null){ | |
return '<a href="'.$atts['link'].'" class="button">'.do_shortcode($content).'</a>'; | |
} | |
add_shortcode('button', 'sc_btn_default'); | |
function sc_btn_primary($atts, $content = null){ | |
return '<a href="'.$atts['link'].'" class="button">'.do_shortcode($content).'</a>'; | |
} | |
add_shortcode('button_primary', 'sc_btn_default'); |
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
var channelName = 'newformat_is_ID_not_pretty_permalink'; | |
var vidWidth = 525; | |
var vidHeight = 325; | |
var vidResults = 6; | |
jQuery.get( | |
"https://www.googleapis.com/youtube/v3/channels", { | |
part: 'contentDetails', | |
forUsername: channelName, | |
key: '[API KEY]' | |
}, function(data){ |
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 | |
$defaults = array( | |
'theme_location' => 'wp-primary-menu', | |
'container' => false, | |
'items_wrap' => '<ul class="wp-primary-menu">%3$s</ul>' | |
); | |
wp_nav_menu($defaults); | |
?> |
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
# Register menus | |
function px_register_menus(){ | |
register_nav_menus(array( | |
'wp-primary-menu' => __('Primary WordPress Menu'), | |
'wp-footer-menu' => __('Footer WordPress Menu') | |
)); | |
} | |
add_action('init', 'px_register_menus'); |
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
# Register Sidebar | |
$args = array( | |
'name' => __('Sidebar', 'nantre'), | |
'id' => 'wp-sidebar', | |
'description' => 'Add widgets to the sites Sidebar, all default WordPress widgets are supported', | |
'before_widget' => '<div class="widget %2$s">', | |
'after_widget' => '</div>', | |
'before_title' => '<h4>', | |
'after_title' => '</h4>' | |
); |
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
# Remove junk | |
function px_wp_remove_head() { | |
remove_action('wp_head', 'feed_links'); | |
remove_action('wp_head', 'feed_links_extra'); | |
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head'); | |
remove_action('wp_head', 'locale_stylesheet'); | |
remove_action('wp_head', 'noindex'); | |
remove_action('wp_head', 'wp_print_styles'); |
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 | |
$sticky = get_option('sticky_posts'); | |
$args = array( | |
'posts_per_page' => 6, | |
'post__in' => $sticky | |
); | |
$px_query = new WP_Query($args); | |
?> | |
<?php if(!empty($sticky)) : ?> | |
<?php while($px_query->have_posts()) : $px_query->the_post(); ?> |
NewerOlder