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 March 28, 2018 10:49
Sportexx Menu
.navbar-nav .open li:hover {
position: relative;
}
.navbar-nav .open li:hover > ul {
display: block;
position: absolute;
top: -7px;
left: 100%;
}
@yousufansa
yousufansa / functions.php
Created September 12, 2018 14:56
WooCommerce Add Custom Sorting 'rand' in Shop Page
add_filter( 'woocommerce_default_catalog_orderby_options', 'ec_child_woocommerce_custom_catalog_orderby_options' );
function ec_child_woocommerce_custom_catalog_orderby_options ( $sorting ) {
$sorting['rand'] = esc_html__( 'Random', 'electro-child' );
return $sorting;
}
@yousufansa
yousufansa / functions.php
Created September 14, 2018 08:30
Jobhunt add Instagram to single company
add_filter('jobhunt_submit_job_form_company_fields' , 'jobhunt_custom_submit_job_form_company_fields');
if ( ! function_exists( 'jobhunt_custom_submit_job_form_company_fields' ) ) {
function jobhunt_custom_submit_job_form_company_fields ($fields) {
$fields['company_instagram'] = array(
'label' => esc_html__( 'Instagram', 'jobhunt' ),
'type' => 'text',
'required' => false,
'placeholder' => esc_html__( 'Instagram url', 'jobhunt' ),
'priority' => 5,
@yousufansa
yousufansa / functions.php
Last active October 4, 2018 12:22
Jobhunt Single Company Header Background And Instagram Fields Added
add_filter('jobhunt_submit_job_form_company_fields' , 'jobhunt_custom_submit_job_form_company_fields');
if ( ! function_exists( 'jobhunt_custom_submit_job_form_company_fields' ) ) {
function jobhunt_custom_submit_job_form_company_fields ($fields) {
$fields['company_instagram'] = array(
'label' => esc_html__( 'Instagram', 'jobhunt' ),
'type' => 'text',
'required' => false,
'placeholder' => esc_html__( 'Instagram url', 'jobhunt' ),
'priority' => 5,
@yousufansa
yousufansa / functions.php
Created September 17, 2018 08:47
Jobhunt Company Description Title & Job Listing Title
add_filter('jobhunt_company_description_title' , 'jobhunt_custom_company_description_title');
if ( ! function_exists( 'jobhunt_custom_company_description_title' ) ) {
function jobhunt_custom_company_description_title($title) {
global $post;
$post = get_post( $post );
$title = esc_html__( 'About ', 'jobhunt' ) . get_the_title();
return $title;
@yousufansa
yousufansa / functions.php
Created September 17, 2018 12:24
Jobhunt Company Open Positions Clickable
add_filter('jobhunt_wpjmc_open_positions_info' , 'jobhunt_custom_wpjmc_open_positions_info');
if ( ! function_exists( 'jobhunt_custom_wpjmc_open_positions_info' ) ) {
function jobhunt_custom_wpjmc_open_positions_info ($opens) {
return '<a href="#company-job_listings">' . $opens . '</a>';
}
}
@yousufansa
yousufansa / functions.php
Created September 21, 2018 11:52
Jobhunt Single Resume Header Background Image
add_filter('submit_resume_form_fields' , 'jobhunt_child_custom_submit_resume_form_fields');
if ( ! function_exists( 'jobhunt_child_custom_submit_resume_form_fields' ) ) {
function jobhunt_child_custom_submit_resume_form_fields ($fields) {
$fields['resume_fields']['candidate_header_bg_image'] = array(
'label' => esc_html__( 'Header Image', 'jobhunt' ),
'type' => 'file',
'placeholder' => 'Upload your header image',
'priority' => 5,
'required' => false
@yousufansa
yousufansa / functions.php
Last active January 14, 2019 16:07
Job Overview Custom Field Display
if( ! function_exists( 'jh_child_single_job_overview_details' ) ) {
function jh_child_single_job_overview_details( $args ) {
$args['job_title'] = array(
'icon' => 'la la-graduation-cap',
'label' => esc_html__( 'Job Title', 'jobhunt' ),
'callback' => 'jh_child_single_job_overview_job_title',
);
$args['job_contact'] = array(
'icon' => 'la la-graduation-cap',
@yousufansa
yousufansa / functions.php
Created October 4, 2018 07:20
Jobhunt Job Search in Job List Page Header
add_action('init', 'jobhunt_child_custom_functions' );
if ( ! function_exists( 'jobhunt_child_custom_functions' ) ) {
function jobhunt_child_custom_functions() {
add_filter( 'jobhunt_site_content_page_title', 'jobhunt_child_wpjm_page_title' );
}
}
if ( ! function_exists( 'jobhunt_child_wpjm_page_title' ) ) {
function jobhunt_child_wpjm_page_title( $title ) {
@yousufansa
yousufansa / functions.php
Created October 4, 2018 16:22
Jobhunt Single Job Header Background Image
add_filter('submit_job_form_fields' , 'jobhunt_child_custom_submit_job_form_fields');
if ( ! function_exists( 'jobhunt_child_custom_submit_job_form_fields' ) ) {
function jobhunt_child_custom_submit_job_form_fields ($fields) {
$fields['job']['job_header_bg_image'] = array(
'label' => esc_html__( 'Header Image', 'jobhunt' ),
'type' => 'file',
'placeholder' => 'Upload your header image',
'priority' => 5,
'required' => false