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
/* This goes in that config file */ | |
define('WP_MEMORY_LIMIT', '256M'); | |
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); |
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(function ($) { | |
var win = $(window); | |
function bbScroll() { | |
if ('undefined' != typeof FLBuilderLayoutConfig) { | |
var offset = 0; | |
if ('undefined' === typeof FLBuilderLayout) { | |
return; | |
} |
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( document ).on( 'js_event_wpv_parametric_search_form_updated', function active_label(){ | |
jQuery('input[checked=checked]').parent().addClass('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
// This is how you can separate your view pulls into tab for better layouts. | |
// Note, you will need to have something to query against for the data seperation. | |
// Use Case: WooCommerce Products in Tabs | |
// You will need 3 Views to accomplish this. We open the tabs the first view and close the tabs in the second view. We add the second view into the first on the outside of the loop (since it contains it's own loop). Then nest a view in there for final data. See the example below. | |
// 1. Add the jQuery UI Tabs to WordPress | |
// Add this to specific pages using a Beaver Builder Themer part | |
<script type="text/javascript"> | |
jQuery(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
// Custom Taxonomy Permalinks -- This will use the Taxonomy Variable as part of the URL dynamically | |
// You will need to add the %variable% from line 10 in your post type like this | |
// 'rewrite' => array('slug' => '/%variable%', 'with_front' => false) | |
// or if you're using Toolset then turn on permalink rewrite and add /%variable% as the custom rewrite | |
add_filter('post_link', 'location_permalink', 10, 3); // Call it what you want | |
add_filter('post_type_link', 'location_permalink', 10, 3); // Call it what you want | |
function location_permalink($permalink, $post_id, $leavename) { // Make sure your name matches the filter name above | |
if (strpos($permalink, '%state%') === FALSE) return $permalink; // The variable you add to your rewrite URL, here we are using %state% |
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
// This will go into the Search and Pagination JS box in toolset. It will exectue when the search results are updated. | |
// Change the .main-wrapper & and list-item to your classes. | |
jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated', function( event, data ) { | |
var $wrapper = $('.main-wrapper'); | |
$wrapper.find('.list-item').sort(function (a, b) { | |
return +a.dataset.sort - +b.dataset.sort; | |
}) |
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
// Add this to the Search and Pagination JS field. | |
// This will populate the dropdown (view filter) to set the state that the user is currently in. You can target any filter you have on the page. | |
// You will need to install the plugin CF Geo Plugin. They have shortcode and you can utilize JS for location attributes. | |
// Here we're changing a State dropdown for locations. Change to fit your project. | |
jQuery(document).ready(function () { | |
if(jQuery("body:not(.home) #wpv_control_select_wpcf-org-state option[selected='selected']").val() === "") { | |
var state = window.cfgeo.region; | |
var stateHandle = '#wpv_control_select_wpcf-org-state option[value="' + state + '"]'; | |
jQuery(stateHandle).attr('selected', true).trigger('change'); |
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
// In Beaver Builder, we want to inject the browser and platform into the HTML tag so we can target specific browsers and/or platform in a simple manner. | |
// Open Beaver Builder > Open Global Settings > Javascript Tab > Paste Below Snippet | |
// Credit: https://codepen.io/samiah/pen/NgQKMb | |
jQuery(function() { | |
var b = document.documentElement; | |
b.setAttribute('data-useragent', navigator.userAgent); | |
b.setAttribute('data-platform', navigator.platform ); | |
b.className += ((!!('ontouchstart' in window) || !!('onmsgesturechange' in window))?' touch':''); | |
}); |
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
// Dropping Woocommerce part because it's way faster! | |
// Here are two sources below with credit -- I'll add more as I find them | |
1.) Remove all products, categories, meta and relations | |
DELETE relations.*, taxes.*, terms.* | |
FROM wp_term_relationships AS relations | |
INNER JOIN wp_term_taxonomy AS taxes | |
ON relations.term_taxonomy_id=taxes.term_taxonomy_id | |
INNER JOIN wp_terms AS terms |
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' ); | |
/* You can now insert the store messages using the default WooCommerce shortcode -> [shop_messages] */ | |
/** | |
* OPTIONAL NEW SHORTCODE | |
* Create this shortcode : [fl_woocommerce_notices] |