Skip to content

Instantly share code, notes, and snippets.

@Qubadi
Qubadi / gist:9183b46cb964c80df054560aae53b643
Last active July 24, 2024 21:34
JetEngine Listing Grid: Custom Post Types, Drag-and-Drop Functionality on the Backend
Video Tutorials here:
https://www.youtube.com/watch?v=hJhc90ETv0A
// Enqueue scripts and styles for the 'car' custom post type
add_action('admin_enqueue_scripts', 'enqueue_car_sortable_script_and_style');
function enqueue_car_sortable_script_and_style($hook) {
global $typenow;
if ($typenow == 'car') {
wp_enqueue_script('jquery-ui-sortable');
wp_localize_script('jquery-ui-sortable', 'car_sortable', array(
@Qubadi
Qubadi / gist:dd57db29f49b152a2a6101020ee92333
Last active July 24, 2024 21:31
Crocoblock JetEngine Meta Field-Enhanced PDF Management in WordPress
Youtube tutorials:
https://www.youtube.com/watch?v=W6j36I57xgo
__________________________________________________
CSS Code For Download button:
/* Style for Download PDF link */
.YOUR CLASSNAME {
color: #ffffff;
font-size: 12px;
font-weight: 600;
@Qubadi
Qubadi / gist:d819aa3e7d3d01b32441be9af3a01d48
Last active August 23, 2024 12:14
NEW UPDATE: JetEngine Listing Grid: Custom Post Types, Drag-and-Drop Functionality on the Backend Dynamicly
Youtube Tutorials:
https://www.youtube.com/watch?v=-wezi647qos&ab_channel=HeskeAgencydev
________________________________________________________
// Add Dashboard Widget for Custom Post Types
add_action('wp_dashboard_setup', 'custom_cpt_dashboard_widget');
function custom_cpt_dashboard_widget() {
wp_add_dashboard_widget('custom_cpt_dashboard_widget', 'Manage Custom Post Types', 'custom_cpt_dashboard_widget_display');
}
@Qubadi
Qubadi / gist:bb55f067082b0874f9674c734a2df4a4
Last active January 17, 2024 15:31
Jetappointment display only the start time
See tutorials here: https://www.youtube.com/watch?v=45TU3kpnlqk&t=2s
________________________________________________
// Customize the time slot format for JetAppointment.
// This filter modifies the format of time slots to display only the start time.
add_filter( 'jet-apb/time-slots/slots-html/slot-time-format', function( $format ) {
$format = '%4$s';
return $format;
} );
@Qubadi
Qubadi / gist:fa9333bb1a078d3092212cf3708d20f9
Last active January 17, 2024 15:30
Enhancing Elementor Basic Gallery: Custom Code for Responsive Column Control
See the tutorials here: https://www.youtube.com/watch?v=E3e0kLLb7sU
_____________________________________________
/* Base style for the gallery */
.gallery {
display: grid;
grid-template-columns: repeat(3, 1fr);
}
@Qubadi
Qubadi / gist:1a5ec426653964ba4e36b7ee212c8606
Last active January 21, 2025 10:24
Jetformbuilder, JavaScript Snippet to Disable Past Dates for Jetformbuilder
UPDATED: 07.05.2024
Jetformbuilder, Datefield, Disable Past Dates.
1. Copy the code, and create a JS Snippet , and paste the code to your snippet plugin, and save it as header / footer.
2. Then create a date field, and click block, then scroll down to advanced, add your classname there.
3. Dont forget to add the classnames to: input.ADD YOUR CLASSNAME HERE.jet-form-builder__field.date-field
its three places you have to add the classname to.
4. This code support multiple date fields and you can use the same classname.
_____________________________________________________________________
@Qubadi
Qubadi / gist:f227378730bf7c62843d869d87513efc
Created February 2, 2024 09:25
Jetsmartfilters Date range: custom JavaScript code for JetSmartFilters Date Range Picker that automatically sets today's and tomorrow's dates.
We have developed a custom JavaScript code for JetSmartFilters Date Range Picker that automatically sets today's and tomorrow's dates.
Copy the code and paste in to your snippet plugins ( JS snippet )
Note: Monthnames can be changed to your language.
// Function to format date to 'F j, Y'
function formatDate(date) {
@Qubadi
Qubadi / gist:a66d042e4b897b91b5a476f9af3705c5
Last active September 5, 2024 12:06
JetFormbuilder media field upload progress indicator
Add the code to your snippet plugins, and create a new HTML snippet then add ( paste ) the code there and save it.
____________________________________________________________
<style>
/* CSS for Progress Bar */
.progress-bar-container {
display: none; /* Initially hide the progress bar container */
width: 100%;
background-color: #eee;
@Qubadi
Qubadi / gist:d39c2de19d65eaa5efbc543ed09e2100
Last active March 27, 2025 21:56
JetFormbuilder ( Enhanced Media Field in JetFormbuilder with Multiple Upload progress indicator )
Add the code to your snippet plugins, and create a new HTML snippet then add ( paste ) the code there and save it.
____________________________________________________________
<style>
/* CSS for Progress Bar */
.progress-bar-container {
display: none; /* Initially hide the progress bar container */
width: 100%;
@Qubadi
Qubadi / gist:c83878e6244261b39ff387d4c9739f67
Last active March 21, 2025 16:46
JetFormBuilder media field, enhanced choose file
UPDATED: 01.02.2025
1. We've enhanced the JetFormBuilder with a refined custom code, improving both style and functionality for file selection. The latest
update introduces support for the repeater field's media capabilities, offering a more streamlined and efficient user experience for
handling multiple files within forms.
2. Copy this code, create a new HTML snippet, and paste it into your snippet plugin. Save it as a header or footer.
__________________________________________
See the youtube tutorials here ( OLD ):
https://youtu.be/lOghzLiR73Q?si=DbNNcCkKzkv_mAQl
__________________________________________