Skip to content

Instantly share code, notes, and snippets.

@bigdigital
bigdigital / gist:4ba6214adacf4dcd96f18719d8004f88
Created May 7, 2018 14:46
mailchimp comming soon slider
<span style="padding-right:5px;"><input type="email" name="EMAIL" placeholder="Your Email Address" required /></span>
<input type="submit" value="Notify Me!" />
@bigdigital
bigdigital / custom.js
Last active April 23, 2018 06:44
The7 Fix for messed content in tabs, accordion and toogle elements
jQuery(document).ready(function($) {
setTimeout(function(){
$(window).trigger('resize');
}, 500);
function dtResize() {
var elements = [];
elements['accord']= jQuery(".wpb_accordion_header"),
elements['ult_tab'] = $(".ult_tabs > ul >li"),
elements['theme_tab'] = $(".wpb_tour_tabs_wrapper > ul >li"),
elements['togg'] = $(".wpb_toggle");
@bigdigital
bigdigital / functions.php
Created March 22, 2018 10:07
The7 Floating logo replace to CDN url
add_filter( 'presscore_localized_script', function( $data ) {
$ossdl_off_cdn_url = get_option( 'ossdl_off_cdn_url' );
$ossdl_off_blog_url = get_option( 'ossdl_off_blog_url' );
$theme_settings = $data['themeSettings'];
$theme_settings['floatingHeader']['logo']['html'] = str_replace( $ossdl_off_blog_url, $ossdl_off_cdn_url, $theme_settings['floatingHeader']['logo']['html'] );
$theme_settings['floatingHeader']['logo']['url'] = str_replace( $ossdl_off_blog_url, $ossdl_off_cdn_url, $theme_settings['floatingHeader']['logo']['url'] );
$theme_settings['stickyMobileHeaderFirstSwitch']['logo']['html'] = str_replace( $ossdl_off_blog_url, $ossdl_off_cdn_url, $theme_settings['stickyMobileHeaderFirstSwitch']['logo']['html'] );
$theme_settings['stickyMobileHeaderSecondSwitch']['logo']['html'] = str_replace( $ossdl_off_blog_url, $ossdl_off_cdn_url, $theme_settings['stickyMobileHeaderSecondSwitch']['logo']['html'] );
@bigdigital
bigdigital / gist:2d9713020c120e26104d21664a6f785a
Created March 22, 2018 09:47
[mc4wp_form id="238"] code
<span style="padding-right:5px;"><input type="email" name="EMAIL" placeholder="Your Email Address" required /></span>
<input type="submit" value="Notify Me!" />
@bigdigital
bigdigital / functions.php
Last active March 21, 2018 15:44
The7 Disable comment url
function disable_comment_url($fields) {
$fields['url'] = '</div>';
return $fields;
}
add_filter('comment_form_default_fields','disable_comment_url');
@bigdigital
bigdigital / gist:7ce3ceff0c7c44782cdd78cf5684b81e
Created March 2, 2018 13:43
The7 change address bar color (since The7 6.2.0)
function presscore_theme_color_meta() {
$color = '#fff';
printf( '<meta name="theme-color" content="%s"/>', $color );
}
@bigdigital
bigdigital / function.php
Last active February 6, 2018 14:55
The7 rewrite portfolio link
function my_dt_portfolio_thumbnail_args($thumb_args) {
$thumb_args['wrap'] = '<a %HREF% %CLASS% %TITLE% %CUSTOM%><img %IMG_CLASS% %SRC% %ALT% %SIZE% /></a>';
return $thumb_args;
}
add_filter( 'dt_portfolio_thumbnail_args', 'my_dt_portfolio_thumbnail_args', 10, 1);
@bigdigital
bigdigital / custom.js
Last active February 8, 2018 15:26
The7 enable AJAX for "Product Filter for WooCommerce" plugin
<script>
function fixWooIsotope() {
if (dtGlobals.isPhone) {
jQuery(window).trigger("scroll");
return;
}
var $container = jQuery('.iso-container');
var $dataAttrContainer = $container,
i = 0,
@bigdigital
bigdigital / function.php
Last active December 11, 2017 11:51
Change The7 menu text
add_action( 'admin_menu', 'my_menu_filter', 9999 );
function my_menu_filter() {
$replace_text = "My text";
foreach ( $menu AS $k => &$v ) {
$result = array_search( 'the7-dashboard', $v );
if ( $result ) {
$v[0] = str_replace( "The7", $replace_text, $v[0] );
}
}
[vc_row type="vc_default" full_width="stretch_row_content"][vc_column][dt_portfolio orderby="rand" show_filter="true" loading_effect="fade_in" same_width="true" padding="5" descriptions="bg_with_lines" hover_bg_color="dark" show_title="true" show_link="true" show_zoom="true" show_details="true" show_categories="true" responsiveness="browser_width_based" columns_on_desk="5" columns_on_mobile="1" category="consulting,product-design,corporate-identity,research,digital,web-mobile,media"][/vc_column][/vc_row]