This code snipet is based on the events-calendar-outlook-import-fix code. It is aiming at adding a button on the Wordpress Event page to let users export event to various calendars.
Code is licensed under the GPL 2.0 or greater license.
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTPS_HOST} !^newdomain\.com$ [NC] | |
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L] | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f |
<?php | |
//* Custom loop WITH pagination | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'bhl_do_resident_query' ); | |
function bhl_do_resident_query() { | |
global $paged; | |
global $query_args; |
<div class="one-fourth first" style="background-color: #1b1852; color: #fff;">#1b1852</div> | |
<div class="one-fourth " style="background-color: #c1c0be; color: #fff;">#c1c0be</div> | |
<div class="one-fourth " style="background-color: #999; color: #fff;">#999</div> | |
<div class="one-fourth " style="background-color: #000; color: #fff;">#000</div> | |
<p> </p> | |
<p>Headings:</p> | |
<h1>Heading 1</h1> | |
<h2>Heading 2</h2> | |
<h3>Heading 3</h3> | |
<h4>Heading 4</h4> |
<?php | |
// Add Google Analytics eCommerce tracking for MemberPress | |
function echo_ga_tracking_script() { | |
global $wpdb; | |
if(isset($_GET['membership']) && isset($_GET['trans_num'])) { | |
// get transaction info for one time payments | |
$txn = MeprTransaction::get_one_by_trans_num($_GET['trans_num']); | |
// check if it has subscription info attached | |
if(isset($_GET['subscr_id']) && ($_GET['subscr_id'] == $_GET['trans_num'])) { |
<?php | |
//* Do NOT include the opening php tag | |
//* Load Lato and Merriweather Google fonts | |
add_action( 'wp_enqueue_scripts', 'bg_load_google_fonts' ); | |
function bg_load_google_fonts() { | |
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:300,700|Merriweather:300,700', array(), CHILD_THEME_VERSION ); | |
} |
class AgentPress_Listings { | |
public $settings_field = 'agentpress_taxonomies'; | |
public $menu_page = 'register-taxonomies'; | |
/** | |
* Property details array. | |
*/ | |
public $property_details; |
This code snipet is based on the events-calendar-outlook-import-fix code. It is aiming at adding a button on the Wordpress Event page to let users export event to various calendars.
Code is licensed under the GPL 2.0 or greater license.
// Remove Add to cart functionality | |
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart'); | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); |
// create a custom end point in the My Accunt Page | |
function custom_wc_end_point() { | |
if(class_exists('WooCommerce')){ | |
add_rewrite_endpoint( 'wholesale-ordering', EP_ROOT | EP_PAGES ); | |
} | |
} | |
add_action( 'init', 'custom_wc_end_point' ); | |
function custom_endpoint_query_vars( $vars ) { | |
$vars[] = 'wholesale-ordering'; | |
return $vars; |
// completely disable image size threshold | |
add_filter( 'big_image_size_threshold', '__return_false' ); | |
// increase the image size threshold to 3000px | |
function gc_big_image_size_threshold( $threshold ) { | |
return 3000; // new threshold | |
} | |
add_filter('big_image_size_threshold', 'gc_big_image_size_threshold', 999, 1); | |
define('WP_DISABLE_FATAL_ERROR_HANDLER',true); |