Skip to content

Instantly share code, notes, and snippets.

View danfisher85's full-sized avatar
๐Ÿ˜Ž
Focusing

Dan Fisher danfisher85

๐Ÿ˜Ž
Focusing
View GitHub Profile
@danfisher85
danfisher85 / company_logo_with_link.php
Created May 1, 2016 19:00
[WP Job Manager] Display company-logo
@danfisher85
danfisher85 / gist:0748c7b6abc2665a36aced2991336a1b
Created July 7, 2016 18:25
Include styles only for pages depends on page meta value
function handyman_load_vegas_slider() {
global $post;
if ( ! is_404() ) {
if ( get_post_meta( $post->ID, 'handyman_slider_type', true ) == 'vegaslider' ) {
wp_enqueue_style( 'vegas' );
wp_enqueue_script( 'vegas' );
}
}
}
handyman_load_vegas_slider();
@danfisher85
danfisher85 / remove_preview_step_wpjm.php
Last active September 29, 2018 09:49
Remove preview step for job and resume (WP Job Manager)
/**
* Remove the preview step for Job
* @param array $steps
* @return array
*/
if ( !function_exists( 'handyman_custom_submit_job_steps' ) ) {
function handyman_custom_submit_job_steps( $steps ) {
unset( $steps['preview'] );
return $steps;
}
@danfisher85
danfisher85 / player_game-by-game_stats
Created May 23, 2017 12:16
Displaying player game-by-game stats for Sportspress
<?php
/**
* Event Blocks
*
* @author Dan Fisher
* @package Alchemists
* @version 1.0
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@danfisher85
danfisher85 / wp-query-ref.php
Created May 26, 2017 18:06 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@danfisher85
danfisher85 / alc_add_simpleline_icons_to_vc
Created June 2, 2017 14:14
VC Add Custom Icon Font
/**
* Add custom SimpleLine icons
*
* @param $icons - taken from filter - vc_map param field settings['source']
* provided icons (default empty array). If array categorized it will
* auto-enable category dropdown
*
* @since 1.0
* @return array - of icons for iconpicker, can be categorized, or not.
*/
function mytheme_import_files() {
return array(
array(
'import_file_name' => 'default',
'categories' => array( 'Default' ),
'local_import_file' => trailingslashit( get_template_directory() . '/inc/demo/content.xml' ),
'local_import_widget_file' => trailingslashit( get_template_directory() . '/inc/demo/widgets.json' ),
'import_preview_image_url' => get_template_directory_uri() . '/screenshot.png',
),
);
@danfisher85
danfisher85 / alc_single_player_custom_var_output
Last active January 3, 2018 11:57
Player Heading custom var output
<?php
/**
* Player Percentas Statistics for Single Player
*
* @author Dan Fisher
* @package Alchemists
* @version 2.0.0
*/
// Skip if there are no rows in the table
if ( empty( $data ) )
[vc_row el_id="section-about" css=".vc_custom_1462913366165{padding-bottom: 100px !important;}"][vc_column][rocket_heading_section subtitle=""]About Company[/rocket_heading_section][vc_row_inner][vc_column_inner width="5/12"][vc_images_carousel images="2272,2274,2273" img_size="full" onclick="link_no" mode="vertical" hide_prev_next_buttons="yes" wrap="yes"][/vc_column_inner][vc_column_inner width="7/12"][rocket_heading_icon]Creative Start-Up idea[/rocket_heading_icon][rocket_testimonial name="Christian Womero" img_src="3275"]Vestibulum rutrum, mi nec elementum vehicula, eros quam gravida nisl, id fringilla neque ante vel mi. Morbi mollis tellus ac sapien. Phasellus volutpat, metus eget egestas mollis, lacus lacus blandit dui, id egestas quam mauris ut lacus. Fusce vel dui.[/rocket_testimonial][vc_separator style="dashed"][vc_column_text]Phasellus dolor. Maecenas vestibulum mollis diam. Pellentesque ut neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In dui m
@danfisher85
danfisher85 / sp_get_value.php
Last active February 21, 2018 21:45
Get SP variable value based on post ID
$player_metrics = (array)get_post_meta( $player_id, 'sp_metrics', true );