Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Faisal Khurshid imfaisalkh

🎯
Focusing
  • Pakistan
View GitHub Profile
@imfaisalkh
imfaisalkh / modify-resume-fields.php
Last active Feb 19, 2020
Modify Resume Submission Form Fields
View modify-resume-fields.php
<?php
// Add your own function to filter the fields
add_filter( 'submit_resume_form_fields', 'capstone_submit_resume_form_fields' );
// This is your function which takes the fields, modifies them, and returns them
function capstone_submit_resume_form_fields( $fields ) {
// Here we target one of the resume fields
@imfaisalkh
imfaisalkh / capstone-resume-master-excerpt.php
Last active Jan 12, 2020
Capstone - Add an Excerpt to Resume Master Listings
View capstone-resume-master-excerpt.php
<?php
add_action( 'resume_listing_meta_end', 'capstone_add_resume_auto_excerpt', 99);
function capstone_add_resume_auto_excerpt() {
echo '<li class="auto-excerpt" data-full-width>';
$resume_desc = apply_filters( 'the_resume_description', get_the_content() );
echo '<label>'. esc_html__('Excerpt:', 'capstone') .'</label>';
echo wp_kses_post(substr($resume_desc, 0, 200)) .'...';
echo '</li>';
@imfaisalkh
imfaisalkh / remove-qualification-field.php
Created Oct 8, 2019
Capstone - Remove "Qualification" Field & Output
View remove-qualification-field.php
#-----------------------------------------------------------------#
# Remove "Qualification" Field
#-----------------------------------------------------------------#
function remove_default_qualification_field() {
remove_filters_with_method_name( 'submit_job_form_fields', 'frontend_job_qualification_field', 10 );
remove_filters_with_method_name( 'job_manager_job_listing_data_fields', 'admin_job_qualification_field', 10 );
}
add_action( 'init', 'remove_default_qualification_field' );
#-----------------------------------------------------------------#
@imfaisalkh
imfaisalkh / remove-experience-field.php
Created Oct 8, 2019
Capstone - Remove "Experience" Field & Output
View remove-experience-field.php
#-----------------------------------------------------------------#
# Remove "Experience" Field
#-----------------------------------------------------------------#
function remove_default_experience_field() {
remove_filters_with_method_name( 'submit_job_form_fields', 'frontend_job_experience_field', 10 );
remove_filters_with_method_name( 'job_manager_job_listing_data_fields', 'admin_job_experience_field', 10 );
}
add_action( 'init', 'remove_default_experience_field' );
#-----------------------------------------------------------------#
@imfaisalkh
imfaisalkh / modern-form.css
Last active Oct 8, 2019
Apply modern form styling to regular forms
View modern-form.css
/*---------------------------------------------------------
Styled Form (replacer "#wppb-register-user-client" with your form ID)
-------------------------------------------------------- */
form#wppb-register-user-client input:not([type="submit"]),
form#wppb-register-user-client select,
form#wppb-register-user-client textarea {
height: 72px;
padding: 3.2rem 2rem 1rem 2rem !important;
}
View facetwp-flyout-button.php
<?php
add_action('capstone_page_content_start', function () {
if (is_post_type_archive('job_listing') || is_post_type_archive('resume')) {
echo '<button class="facetwp-flyout-open">Filter</button>';
}
});
@imfaisalkh
imfaisalkh / resume-desc-template.php
Created Aug 31, 2019
Resume Description Field Template
View resume-desc-template.php
<?php
#-------------------------------------------------------------------------------#
# WP Resume Manager - Description Field Template
#-------------------------------------------------------------------------------#
add_filter( 'capstone_resume_desc_template', 'capstone_resume_desc_field_template' );
function capstone_resume_desc_field_template() {
$output = '<p>Introduce yourself. What are your goals, what are your objectives?</p>';
@imfaisalkh
imfaisalkh / job-desc-template.php
Last active Aug 31, 2019
Job Description Field Template
View job-desc-template.php
<?php
#-------------------------------------------------------------------------------#
# WP Job Manager - Description Field Template
#-------------------------------------------------------------------------------#
add_filter( 'capstone_job_desc_template', 'capstone_job_desc_field_template' );
function capstone_job_desc_field_template() {
$output = '<h3>Description</h3>';
@imfaisalkh
imfaisalkh / job-share-link.php
Created Jul 30, 2019
Capstone - Add Job Share Link
View job-share-link.php
@imfaisalkh
imfaisalkh / modify-register-link.php
Created Jul 27, 2019
Capstone - Modify registration link
View modify-register-link.php