Skip to content

Instantly share code, notes, and snippets.

@akther80
akther80 / functions.php
Created December 16, 2015 06:54
custom ministry heading bethlehem
remove_action( 'ministries_before_archive_content','ministries_head', 10 );
add_action( 'ministries_before_archive_content','custom_ministries_head', 10 );
function custom_ministries_head () {
?>
<div class="ministries-head">
<h5><?php echo _e( 'Ministries', 'bethlehem-extension' ); ?></h5>
<?php ministries_tab_pane(); ?>
</div>
<?php
}
@akther80
akther80 / compare.php
Created December 17, 2015 08:44
Compare Page customization
<?php global $product, $yith_woocompare; ?>
<div class="container">
<?php if ( !empty( $products ) ) : ?>
<div class="section section-page-title inner-xs">
<div class="page-header">
<h2 class="page-title">
<?php echo the_title(); ?>
</h2>
<p class="page-subtitle"><a id="product-comparison-page-clear-all" href="<?php echo $yith_woocompare->obj->remove_product_url('all') ?>" data-product_id="all" class="clear-all"><?php _e( 'Clear all', 'mediacenter' ) ?></a></p>
</div>
@akther80
akther80 / wishlist-view.php
Last active December 17, 2015 09:21
wishlist table order customization
<?php
/**
* Wishlist page template
*
* @author Your Inspiration Themes
* @package YITH WooCommerce Wishlist
* @version 2.0.12
*/
?>
@akther80
akther80 / functions.php
Created January 27, 2016 06:07
Change label name in Sermons
add_filter( 'sermons_post_type_labels', 'custom_sermons_post_type_labels' );
function custom_sermons_post_type_labels() {
$sermons_post_type_labels = array(
'name' => _x( 'Episodes', 'post type general name', 'bethlehem-extension' ),
'singular_name' => _x( 'Episode', 'post type singular name', 'bethlehem-extension' ),
'add_new' => _x( 'Add New', 'block', 'bethlehem-extension' ),
'add_new_item' => __( 'Add New', 'bethlehem-extension' ),
'edit_item' => __( 'Edit', 'bethlehem-extension' ),
'new_item' => __( 'New', 'bethlehem-extension' ),
@akther80
akther80 / functions.php
Created January 29, 2016 13:56
Payment Gateway enable for few states in wocommerce
function payment_gateway_disable_state( $available_gateways ) {
global $woocommerce;
$state = $woocommerce->customer->get_state();
if ( isset( $available_gateways['cod'] ) && ! in_array( $state, array( 'AL', 'AK', 'CA' ) ) ) {
unset( $available_gateways['cod'] );
}
return $available_gateways;
@akther80
akther80 / functions.php
Last active March 5, 2019 21:40
Tooltip for Single Product Page Wishlist in Unicase
<?php
add_action( 'wp_enqueue_scripts', 'uc_enqueue_child_script' );
function uc_enqueue_child_script() {
global $unicase_version;
if( apply_filters( 'unicase_load_all_minifed_js', true ) ) {
$dep = 'unicase-all';
} else {
$dep = 'unicase-js';
}
wp_enqueue_script( 'uc-child-script', get_stylesheet_directory_uri() . '/assets/js/uc-child-scripts.js', array( $dep ), $unicase_version, true );
@akther80
akther80 / functions.php
Created November 16, 2017 08:34 — forked from ibndawood/functions.php
Electro - Remove availability in single product page
add_action( 'init', 'ec_child_remove_availability', 20 );
function ec_child_remove_availability() {
remove_action( 'woocommerce_single_product_summary', 'electro_template_loop_availability', 10 );
}
@akther80
akther80 / function.php
Created November 21, 2017 05:55 — forked from ibndawood/function.php
Electro Brands List Pages
if ( ! function_exists( 'electro_brands_list_element' ) ) :
function electro_brands_list_element( $atts, $content = null ){
extract(shortcode_atts(array(
'has_no_products' => false,
'orderby' => 'title',
'order' => 'asc',
), $atts));
$taxonomy_args = array(
'orderby' => $orderby,
@akther80
akther80 / functions.php
Created November 21, 2017 06:06
Electro - Remove loop action buttons in single product page
add_action( 'init', 'ec_child_remove_loop_action_buttons', 20 );
function ec_child_remove_loop_action_buttons() {
remove_action( 'woocommerce_single_product_summary', 'electro_loop_action_buttons', 15 );
}
@akther80
akther80 / functions.php
Created November 22, 2017 13:30 — forked from farookibrahim/functions.php
Electro remove handheld layout
add_filter( 'has_electro_mobile_header', '__return_false' );
add_filter( 'electro_enable_handheld_footer_bar', '__return_false' );