- http://www.codanada.com -- Coming soon!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* This happens only for non-logged in users or logged in users who don't have a SportsPress User Role. | |
* There are several custom taxonomies used by SportsPress, but the code below should fix it for the Leagues (sp_league) taxonomy. | |
* | |
* Use the following filter hooks to the other SportsPress taxonomies. | |
* -- 'sportspress_register_taxonomy_season' for Season (sp_season). | |
* -- 'sportspress_register_taxonomy_venue' for Venues (sp_venue) | |
* -- 'sportspress_register_taxonomy_position' for Positions (sp_position) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* This is a stripped down code based on the sample in this doc: | |
* | |
* https://kb.wpbeaverbuilder.com/article/391-customize-field-connections-themer | |
* | |
*/ | |
add_action( 'fl_page_data_add_properties', function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Helper class for child theme functions. | |
* | |
* @class FLChildTheme | |
*/ | |
final class FLChildTheme { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery( window ).on('resize', function() { | |
var $ = jQuery; | |
if ( $(window).width() <= FLBuilderLayoutConfig.breakpoints.small ){ | |
$( '.bbtest-tabs .fl-tabs-panel .fl-tabs-label[data-index=0] i' ).addClass( 'fa-plus' ); | |
$( '.bbtest-tabs .fl-tabs-panel .fl-tabs-panel-content[data-index=0] ').hide(); | |
$( '.bbtest-tabs .fl-tabs-panel .fl-tabs-label[data-index=0]' ).removeClass( 'fl-tab-active' ); | |
$( '.bbtest-tabs .fl-tabs-panel .fl-tabs-panel-content[data-index=0] ').removeClass( 'fl-tab-active' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* Tweak the code here: | |
* | |
* https://kb.wpbeaverbuilder.com/article/634-smooth-scrolling-tweaks-with-code | |
* | |
* to make it work when the anchor link is coming from another page. | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* This works on regular post type. | |
* | |
*/ | |
add_filter( 'fl_builder_loop_query_args', function( $query_args ){ | |
$today = date( 'Y-m-d H:i:s', time() ); | |
if ( is_page( 'display-past-events' ) && ( 'bbtest-posts-past-events' === $query_args[ 'settings' ]->id ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* First, remove WooCommerce Notices box from its default location on the page (somewhere at the top). | |
*/ | |
remove_filter( 'fl_theme_builder_before_render_content', 'FLThemeBuilderWooCommerceSingular::before_render_content' ); | |
/** | |
* Create this shortcode : [fl_woocommerce_notices] | |
* You can embed this anywhere on the Themer Layout via the HTML module. | |
*/ | |
add_shortcode( 'fl_woocommerce_notices', function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Helper class for child theme functions. This is a better version as it uses the child theme's version number. | |
* | |
* @class FLChildTheme | |
*/ | |
final class FLChildTheme { | |
/** | |
* Enqueues scripts and styles. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add the code to All Import > Settings > Function Editor. | |
*/ | |
function clear_bb_cache_after_wpai_import($import_id) { | |
FLBuilderModel::delete_asset_cache_for_all_posts(); | |
} | |
add_action( 'pmxi_after_xml_import', 'clear_bb_cache_after_wpai_import', 10, 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* It's essentially the same code here: | |
* https://kb.wpbeaverbuilder.com/article/634-smooth-scrolling-tweaks-with-code | |
* | |
* I'm just using "wp_footer" action hook to load the code to the bottom of the page (see priority = 999). | |
* You need to change 'page-slug-here' in LINE 10 to correspond with the target page. | |
* | |
*/ | |
add_action ( 'wp_footer', function(){ |
NewerOlder