Skip to content

Instantly share code, notes, and snippets.

View danfisher85's full-sized avatar
😎
Focusing

Dan Fisher danfisher85

😎
Focusing
View GitHub Profile
/*-----------------------------------------------------------------------------------*/
/* Tabs Shortcodes
/*-----------------------------------------------------------------------------------*/
$tabs_divs = '';
function tabs_group($atts, $content = null ) {
global $tabs_divs;
$tabs_divs = '';
@danfisher85
danfisher85 / gist:7f72824ea9ec78d1e3fc
Created March 24, 2015 14:54
Custom input field for Resume Manager
<?php
/**
* Custom fields for Resume Manager
*
* @package PetSitter
* @since 1.4.0
*/
// Adding Gallery field to front-end
<?php
/**
* Resume Category
*
* @package PetSitter
* @since PetSitter 1.4.7
*/
get_header(); ?>
add_filter( 'register_post_type_resume', 'post_type_resume', 10, 1 );
function post_type_resume( $args ) {
$args[ 'exclude_from_search' ] = false;
return $args;
}
@danfisher85
danfisher85 / gist:fd4d2ebcc0eafd90aac3
Created April 29, 2015 12:07
WP Login Redirects for Comments Section (PetSitter)
/** For Comments (Blog & Resumes) **/
add_filter('login_url','petsitter__custom_login_url');
if(!function_exists('petsitter__custom_login_url')) {
function petsitter__custom_login_url($login_url) {
global $petsitter_data;
if(isset($petsitter_data['petsitter__job-manager-login-page'])) {
return get_permalink($petsitter_data['petsitter__job-manager-login-page']);
}
@danfisher85
danfisher85 / Change Jobs permalinks
Created September 15, 2015 13:15
[WP Job Manager] How to change Jobs permalinks. Resave permalinks after changing this.
@danfisher85
danfisher85 / wpjm_job_column_to_user_admin.php
Last active October 25, 2015 08:40
[WP Job Manager] Add jobs column to the user admin page
/*
* Add Jobs Column
*/
function users_job_listings_column( $cols ) {
$cols['user_job_listings'] = __('Jobs', 'petsitter');
return $cols;
}
/*
* Print Jobs Column Value
@danfisher85
danfisher85 / woo-sinlge-product-thumb-cols.php
Created October 25, 2015 16:50
Change the number of columns for Single Product
function rocket_woo_single_4columns( $number ){
return 4;
}
add_filter( 'woocommerce_product_thumbnails_columns', 'rocket_woo_single_4columns');
@danfisher85
danfisher85 / woo-pagination-arrows.php
Created October 30, 2015 20:13
Change arrows for pagination (woocommerce)
<?php
add_filter( 'woocommerce_pagination_args', 'rocket_woo_pagination' );
function rocket_woo_pagination( $args ) {
$args['prev_text'] = '<i class="fa fa-angle-left"></i>';
$args['next_text'] = '<i class="fa fa-angle-right"></i>';
return $args;
}
@danfisher85
danfisher85 / wpjm_resume_ids
Created November 27, 2015 16:37
Get Resume IDs for WP Resume Manager
function get_the_resume_ids( $post = null ) {
$post = get_post( $post );
if ( $post->post_type !== 'resume' )
return '';
if ( ! get_option( 'resume_manager_enable_categories' ) )
return '';
$categories = wp_get_object_terms( $post->ID, 'resume_category', array( 'fields' => 'ids' ) );