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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
body, html { | |
height: 100%; | |
margin: 0; | |
} | |
.bgimg { |
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 | |
function exclude_roles_from_members_loop( $retval ) { | |
if ( bp_is_members_directory() ) { | |
$exclude_ids = get_users( | |
array( | |
'fields' => 'ID', | |
'role__in' => array( 'editor', 'author' ) // change the roles here | |
) | |
); |
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 | |
// AB Post Grid image thumb | |
add_image_size( 'ab-blog-thumb', 337, 224, TRUE ); | |
add_filter( 'image_size_names_choose', 'ab_blog_thumb_size' ); | |
function ab_blog_thumb_size( $sizes ) { | |
return array_merge( $sizes, array( | |
'ab-blog-thumb' => __( 'AB Grid Thumbnail' ), | |
) ); |
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 | |
/** | |
* Add this code to your PMPro Customizations Plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* This function below sends a custom HTML email to the user that checks out for a pmpro membership level, easily extendible to send to admins, or specific users and so on. | |
* Website: https://paidmembershipspro.com | |
*/ | |
//let's send a custom email after user checkouts. This will not send an email if an admin changes user's level inside member area. | |
function custom_email_after_checkout( $user_id, $morder ){ |
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
/** | |
* Defer iframe loading. | |
* | |
* Markup: | |
* <div class="defer-iframe" data-src="{SOURCE URL}" data-{ATTR}="{VAL}"></div> | |
*/ | |
$(window).load( function(){ | |
if ($('.defer-iframe').length) { | |
$('.defer-iframe').each( function() { | |
var $iframe = $('<iframe frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'); |
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 | |
function team_member_loop( $atts ) { | |
ob_start(); | |
$args = array( | |
'post_type' => 'team-member', | |
'showposts' => 99, | |
'order' => 'ASC', | |
); | |
$query = new WP_Query( $args ); |
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 | |
/* vars for export */ | |
// database record to be exported | |
$db_record = 'XXXXXXXXX'; | |
// optional where query | |
$where = 'WHERE 1 ORDER BY 1'; | |
// filename for export | |
$csv_filename = 'db_export_'.$db_record.'_'.date('Y-m-d').'.csv'; | |
// database variables |
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: Remove Yoast SEO Nag | |
* Plugin URI: https://wordpress.org/ | |
* Description: This plugin remove the annoying Yoast SEO nag in your wordpress dashboard every update. | |
* Version: 1.0.0 | |
* Author: Jayson Antipuesto | |
* Author URI: https://wordpress.org/ | |
*/ |
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
// The Loop | |
/* | |
* Usage: loop category="news" query="" pagination="false" | |
*/ | |
<?php | |
add_shortcode("loop", "myLoop"); | |
function myLoop($atts, $content = null) { | |
extract(shortcode_atts(array( |