Install and populate woo testimonials plugin: Extract and import this .json file into slider (the .jma-testimonials class isincluded in this import): soliloquy-73-05-11-2018.json.tar /* testimonial slider */ .jma-testimonials { max-height: inherit !important; } .jma-testimonials .soliloquy-caption { position: static !important; display: block !important } .jma-testimonials .soliloquy-caption-inside { position: absolute !important; top: 0 !important; width: 100% !important; height: […]
For more code ideas go to my GitHub gists:
https://gist.github.com/johnnya23
Change out Icons
function jma_thumbnail_link_icon_name($class) { return str_replace(array(‘film’), array(‘youtube’), $class); } add_filter(‘themeblvd_thumbnail_link_icon_name’, ‘jma_thumbnail_link_icon_name’); //framework/general/media.php //to change all three for left to right…. I think… function jma_thumbnail_link_icon_name($class) { return str_replace(array(‘film’, ‘plus-square’, ‘long-arrow-alt-right’), array(‘youtube’, ‘if-you-wanted-to-replace-the-plus-sq-also’, ‘and-this-one-too’), $class); } add_filter(‘themeblvd_thumbnail_link_icon_name’, ‘jma_thumbnail_link_icon_name’);
Menu Shortcode
php: function jma_get_menu($args){ $menu = isset($atts[‘menu’]) ? $atts[‘menu’] : ”; ob_start(); wp_nav_menu(array( ‘menu’ => $menu ) ); return ob_get_clean(); } add_shortcode(‘get_menu’, ‘jma_get_menu’); To insert the menu: [get_menu menu=”Main Menu”]
WP Google Maps in Tabs
Add this to js/core.js around line 932 right after this: jQuery(‘body’).on(‘tabsactivate’, function(event, ui) { for(var entry in wpgmaps_localize) { InitMap(wpgmaps_localize[entry][‘id’],’all’,false); } }); jQuery(‘.nav-tabs a’).click(function() { setTimeout(function(){ for(var entry in wpgmaps_localize) { InitMap(wpgmaps_localize[entry][‘id’],’all’,false); } },500); });
jQuery Same Height Columns
This requires the CSS flag below to release the min-heights – assuming the divs stack. jQuery(document).ready(function($) { $window = $(window); var jma_same_height = function() { $(‘.same-height-wrap’).each(function() { $this = $(this); // counter for successive same-height classes counter = 1; while ($this.find(‘.same-height-‘ + counter).length) { var highestBox = 0; $inner = $this.find(‘.same-height-‘ + counter); counter++; $inner.each(function() […]
Javascript Detect Mobile
var iOS = /(iPad|iPhone|iPod|Android)/g.test(navigator.userAgent);
Options Page for Plugin
Original code: https://gist.github.com/hlashbrooke/9267467 First the Files (2) The Class: <?php if ( ! defined( ‘ABSPATH’ ) ) exit; class JMAYtSettings { private $dir; private $file; private $assets_url; private $settings_base; private $settings; private $db_option; private $page_title; private $text_domain; public function __construct($base = ‘jma_plugin’, $title = ‘Cool Plugin’, $settings = array(), $text_domain = ”) { $this->file = […]
Detect Shortcode
if(!function_exists(‘jma_yt_detect_shortcode’)){ function jma_yt_detect_shortcode( $needle = ”, $post_item = 0 ){ if($post_item){ if(is_object($post_item)) $post = $post_item; else $post = get_post($post_item); }else{ global $post; } if(is_array($needle)) $pattern = get_shortcode_regex($needle); elseif(is_string($needle)) $pattern = get_shortcode_regex(array($needle)); else $pattern = get_shortcode_regex(); preg_match_all( ‘/’. $pattern .’/s’, $post->post_content, $matches ); if(//if shortcode(s) to be searched for were passed and not found $return false […]
Hide Pages/Posts from WP Search Results
function jma_search_filter( $query ) {/* exclude book specials from search */ if ( ! $query->is_admin && $query->is_search && $query->is_main_query() ) { $query->set( ‘post__not_in’, array( 1565, 1540 ) ); } } add_action( ‘pre_get_posts’, ‘jma_search_filter’ );