Skip to content

Instantly share code, notes, and snippets.

View imfaisalkh's full-sized avatar
🎯
Focusing

Faisal Khurshid imfaisalkh

🎯
Focusing
  • Pakistan
View GitHub Profile
@imfaisalkh
imfaisalkh / job-id-meta.php
Created July 25, 2019 22:47
Capstone - Append Job ID Meta Value
<?php
#-----------------------------------------------------------------#
# Append Job ID Meta Value
#-----------------------------------------------------------------#
function job_id_meta() {
echo '<li class="meta-field job-id-meta">';
echo '<img class="icon svg-icon" src="'. esc_url( get_template_directory_uri() .'/images/salary-icon.svg') .'" alt="'. esc_html__('Job ID', 'capstone') .'">';
echo '<label class="title">'. esc_html__('Job ID', 'capstone') .':</label>';
@imfaisalkh
imfaisalkh / inline-search-mobile.css
Last active August 25, 2019 23:39
Capstone - Display Inline Search Form on Mobile
@media (max-width: 640px) and (min-width: 0) {
.page-hero { height: 750px !important; }
.page-hero .inner .search-form { opacity: 1; display: block; }
.page-hero .inner .search-form .inner { width: 100%; }
}
@imfaisalkh
imfaisalkh / remove-career-level-field.php
Created July 23, 2019 13:54
Capstone - Remove "Career Level" Field & Output
#-----------------------------------------------------------------#
# Remove "Career Level" Field
#-----------------------------------------------------------------#
function remove_default_career_level_field() {
remove_filters_with_method_name( 'submit_job_form_fields', 'frontend_job_career_level_field', 10 );
remove_filters_with_method_name( 'job_manager_job_listing_data_fields', 'admin_job_career_level_field', 10 );
}
add_action( 'init', 'remove_default_career_level_field' );
#-----------------------------------------------------------------#
@imfaisalkh
imfaisalkh / transparent-site-header.css
Last active July 16, 2019 21:26
Make Header Transparent in Homepage
/*-----------------------------------------------------------------------------------
Make Header Transparent in Homepage
-----------------------------------------------------------------------------------*/
body.home #site-header #site-menu { background: transparent !important; border-bottom: 0; box-shadow: none; }
body.home #site-header.headroom--not-top { background: #FFF; }
body.home .page-hero { margin-top: -93px; padding-top: 93px !important; }
/*-----------------------------------------------------------------------------------
Hide Page Title
-----------------------------------------------------------------------------------*/
/** Change "33" with the page ID */
body.page-id-33 .page-header { display: none; }
body.page-id-33 #inner-body { padding-top: 0 !important; }
@imfaisalkh
imfaisalkh / disable-emails.php
Created July 5, 2019 17:33
Disabling sending certain email at certain events
<?php
#-----------------------------------------------------------------#
# Disable Emails Sending When Job Listing Approved
#-----------------------------------------------------------------#
function disable_mail_job_approved() {
remove_filters_with_method_name( 'pending_to_publish', 'listing_published_send_email' );
remove_filters_with_method_name( 'pending_payment_to_publish', 'listing_published_send_email' );
}
add_action( 'init', 'disable_mail_job_approved' );
@imfaisalkh
imfaisalkh / remove-salary-field.php
Last active June 13, 2019 14:02
Capstone - Remove "Salary" Field & Output
<?php
#-----------------------------------------------------------------#
# Remove "Salary" Field
#-----------------------------------------------------------------#
function remove_default_salary_field() {
remove_filters_with_method_name( 'submit_job_form_fields', 'frontend_job_salary_field', 10 );
remove_filters_with_method_name( 'job_manager_job_listing_data_fields', 'admin_job_salary_field', 10 );
}
/*-----------------------------------------------------------------------------------
Right Align Regular Page Sidebar
-----------------------------------------------------------------------------------*/
/** Change "1201" with the page ID */
body.page-id-1201 .page-sidebar, body.page-id-1202 .page-sidebar
{ order: 1; padding-right: 10px !important; padding-left: 45px !important; border-right: 0 !important; border-left: 1px solid #edeeef; }
body.page-id-1201 .page-content, body.page-id-1202 .page-content
{ padding-left: 10px !important; padding-right: 60px !important; }
@imfaisalkh
imfaisalkh / job-qualification.php
Created May 29, 2019 23:17
Capstone - Modify "Job Qualification" Options
#-------------------------------------------------------------------------------#
# Capstone - Modify "Job Qualification" Options
#-------------------------------------------------------------------------------#
// Remove Existing "Qualification" Options
function remove_default_qualification_output() {
remove_filters_with_method_name( 'submit_job_form_fields', 'frontend_job_qualification_field' );
}
add_action( 'init', 'remove_default_qualification_output' );
@imfaisalkh
imfaisalkh / job-experience.php
Created May 29, 2019 23:13
Capstone - Modify "Job Experience" Options
#-------------------------------------------------------------------------------#
# Capstone - Modify "Job Experience" Options
#-------------------------------------------------------------------------------#
// Remove Existing "Experience" Options
function remove_default_experience_output() {
remove_filters_with_method_name( 'submit_job_form_fields', 'frontend_job_experience_field' );
}
add_action( 'init', 'remove_default_experience_output' );