Skip to content

Instantly share code, notes, and snippets.

View yousufansa's full-sized avatar

Yusuf Ansari yousufansa

View GitHub Profile
@yousufansa
yousufansa / style.css
Created November 1, 2018 06:23
Jobhunt - Claimed Verified Icon In Job Listing
.job_listing.claimed .job-listing-loop-job__title:after {
content: "\f17d";
padding-left: 7px;
font-family: LineAwesome;
font-size: 21px;
line-height: 1;
font-weight: normal;
color: #0f834d;
-webkit-font-smoothing: antialiased;
}
@yousufansa
yousufansa / functions.php
Created November 5, 2018 16:12
Electro - Footer Before Custom Text
if ( ! function_exists( 'electro_child_footer_custom_content' ) ) {
function electro_child_footer_custom_content() {
if( is_front_page() ) { ?>
<div class="footer-before-custom-text">
Your Text Here
</div>
<?php }
}
}
add_action( 'electro_footer_v2', 'electro_child_footer_custom_content', 15 );
@yousufansa
yousufansa / style.css
Created November 8, 2018 05:53
Jobhunt - Header Zero Margin Bottom
.page-template-template-homepage-v1 .site-content-page-header {
margin-bottom: 0;
}
@yousufansa
yousufansa / style.css
Created November 12, 2018 06:52
Jobhunt - Header Search Width Issue in Edge
@media (min-width: 1200px) {
.page-template-template-homepage-v1 .job-search-block form #search_keywords, .page-template-template-homepage-v1 .resume-search-block form #search_keywords, .header-search-icon .job-search-block form #search_keywords, .header-search-icon .resume-search-block form #search_keywords {
min-width: 430px;
}
}
@yousufansa
yousufansa / functions.php
Created November 13, 2018 13:02
Jobhunt - Job Location & Job Region Dropdown in Header Search
if ( class_exists( 'WP_Job_Manager' ) && class_exists( 'Astoundify_Job_Manager_Regions' ) ) {
if ( ! function_exists( 'jobhunt_job_header_search_block' ) ) {
/**
* Display Job Header Search block
*/
function jobhunt_job_header_search_block( $args = array() ) {
$defaults = apply_filters( 'jobhunt_job_header_search_block_args', array(
'section_title' => esc_html__( 'Explore Thousand Of Jobs With Just Simple Search...', 'jobhunt' ),
'sub_title' => '',
@yousufansa
yousufansa / functions.php
Created November 15, 2018 14:24
Electro - Remove Handheld Footer
if ( ! function_exists( 'electro_remove_hadheld_footer' ) ) {
function electro_remove_hadheld_footer() {
remove_action( 'electro_after_footer', 'electro_handheld_footer_bar', 999 );
remove_action( 'electro_footer_v2', 'electro_footer_v2_handheld_wrap_open', 50 );
remove_action( 'electro_footer_v2', 'electro_footer_v2_handheld', 60 );
remove_action( 'electro_footer_v2', 'electro_footer_v2_wrap_close', 99 );
// Remove Handheld Footer For Separate Mobile Home v1
remove_action( 'electro_mobile_footer_v1', 'electro_mobile_footer_v1_wrap_open', 5 );
remove_action( 'electro_mobile_footer_v1', 'electro_footer_v2_handheld_widgets_menu_open', 10 );
@yousufansa
yousufansa / functions.php
Created November 19, 2018 06:38
Electro - Brands carousel Items to show
if ( ! function_exists( 'electro_child_footer_bc_carousel_args' ) ) {
function electro_child_footer_bc_carousel_args( $carousel_args ) {
$carousel_args['items'] = 4;
$carousel_args['responsive']['1200'] = 4;
return $carousel_args;
}
}
add_filter( 'ec_footer_bc_carousel_args', 'electro_child_footer_bc_carousel_args' );
@yousufansa
yousufansa / functions.php
Created November 20, 2018 05:57
Jobhunt - Change Add to cart Button Text
if ( ! function_exists( 'jh_child_woocommerce_product_add_to_cart_text' ) ) {
function jh_child_woocommerce_product_add_to_cart_text( $text ) {
if ( $text == 'Add to cart' ) {
$text = esc_html__( 'Your Button Text', 'jobhunt' );
}
return $text;
}
}
add_filter( 'woocommerce_product_add_to_cart_text', 'jh_child_woocommerce_product_add_to_cart_text' );
@yousufansa
yousufansa / functions.php
Last active November 20, 2018 08:18
Jobhunt - Register And Login Page Menu Custom URL
if ( ! function_exists( 'jh_child_custom_header_register_page_url' ) ) {
/**
* Change Register Page url
*/
function jh_child_custom_header_register_page_url( $register_page_url ) {
$register_page_url = home_url() . '/register/';
return $register_page_url;
}
}
@yousufansa
yousufansa / functions.php
Last active November 21, 2018 16:12
Jobhunt - Add Job Salary In Job Listing Instead of Job Type
if ( ! function_exists( 'jh_child_job_listing_job_salary' ) ) {
function jh_child_job_listing_job_salary() {
global $post;
$post = get_post( $post );
if ( ( $salary = wp_get_object_terms( $post->ID, 'job_listing_salary', array( 'fields' => 'names' ) ) ) && is_array( $salary ) ) {
echo '<div class="job-listing_single_job__salary">' . jobhunt_get_wpjm_taxomony_data( $post, 'job_listing_salary', false ) . '</div>';
}
}
}
add_action( 'jobhunt_job_listing_meta', 'jh_child_job_listing_job_salary', 20 );