Skip to content

Instantly share code, notes, and snippets.

View yousufansa's full-sized avatar

Yusuf Ansari yousufansa

View GitHub Profile
@yousufansa
yousufansa / functions.php
Created July 15, 2019 06:18
Tokoo - Remove Add Wishlist Icon From Products Loop
if ( ! function_exists( 'tk_child_wishlist_disable' ) ) {
function tk_child_wishlist_disable() {
remove_action( 'woocommerce_before_shop_loop_item', 'tokoo_add_to_wishlist_button', 6 );
}
}
add_action( 'woocommerce_before_shop_loop_item', 'tk_child_wishlist_disable', 5 );
@yousufansa
yousufansa / style.css
Created July 15, 2019 06:20
Tokoo - Hide Single Product Features List from Mobile Devices
@media (max-width: 575.98px) {
.single-product-summary-inner > .single-product-feature-list {
display: none;
}
}
@yousufansa
yousufansa / functions.php
Created July 15, 2019 08:17
Electro - Remove Catalog Ordering Dropdown from Shop Page
if ( !function_exists( 'electro_child_disable_catalog_ordering_toggle' ) ) {
function electro_child_disable_catalog_ordering_toggle() {
remove_action( 'electro_shop_control_bar', 'woocommerce_catalog_ordering', 20 );
}
}
add_action( 'init', 'electro_child_disable_catalog_ordering_toggle' );
@yousufansa
yousufansa / functions.php
Created July 16, 2019 07:27
Jobhunt - Company Description on Single Job
if ( ! function_exists( 'jh_child_single_job_listing_company_description' ) ) {
function jh_child_single_job_listing_company_description() {
global $post;
$post = get_post( $post );
$job_id = get_the_ID();
if( $job_id ) {
$post_title = get_post_meta( $job_id, '_company_name', true );
if( ! empty( $post_title ) ) {
$company = get_page_by_title( $post_title, OBJECT, 'company' );
@yousufansa
yousufansa / functions.php
Created July 16, 2019 07:43
Electro - Enable Footer Copyright Bar on Mobile Footer
add_action( 'electro_footer_v2_handheld', 'electro_copyright_bar_v2', 100 );
add_action( 'electro_mobile_footer_v1', 'electro_copyright_bar_v2', 100 );
add_action( 'electro_mobile_footer_v2', 'electro_copyright_bar_v2', 100 );
@yousufansa
yousufansa / style.css
Created July 16, 2019 07:48
Electro - Make Mobile V2 Footer Single Columns
.handheld-widget-menu .columns {
flex: 0 0 100% !important;
max-width: 100% !important;
text-align: center;
}
@yousufansa
yousufansa / functions.php
Created July 18, 2019 13:30
Jobhunt - Remove Jobhunt Company Fields
//Remove Jobhunt Company Fields
if ( ! function_exists( 'jh_child_customize_job_form_company_fields' ) ) {
function jh_child_customize_job_form_company_fields( $fields ) {
unset($fields['company_category']);
unset($fields['company_team_size']);
unset($fields['company_googleplus']);
unset($fields['company_linkedin']);
return $fields;
}
@yousufansa
yousufansa / functions.php
Created July 18, 2019 13:31
Jobhunt - Remove WP Job Manager Company Fields
//Remove Job Manager Company Fields
if ( ! function_exists( 'jh_child_customize_job_manager_job_form_company_fields' ) ) {
function jh_child_customize_job_manager_job_form_company_fields( $fields ) {
unset($fields['company']['company_twitter']);
unset($fields['company']['company_video']);
return $fields;
}
}
add_filter( 'submit_job_form_fields', 'jh_child_customize_job_manager_job_form_company_fields', 20 );
@yousufansa
yousufansa / functions.php
Created July 19, 2019 05:18
Jobhunt - Make Featured Jobs Sticky
if( ! function_exists( 'jh_child_job_listing_default_catalog_orderby' ) ) {
function jh_child_job_listing_default_catalog_orderby($orderby) {
return 'featured';
}
}
add_filter( 'jh_job_listing_default_catalog_orderby', 'jh_child_job_listing_default_catalog_orderby' );
@yousufansa
yousufansa / functions.php
Created July 19, 2019 06:54
Unicase - Remove Footer Logo
if ( ! function_exists( 'unicase_footer_contact' ) ) {
function unicase_footer_contact() {
?>
<div class="footer-contact">
<?php unicase_footer_contact_info(); ?>
<?php unicase_footer_social_links(); ?>
</div>
<?php
}
}