Skip to content

Instantly share code, notes, and snippets.

View anishlama's full-sized avatar

Anish Blon anishlama

View GitHub Profile
@anishlama
anishlama / wp-admin-column-cleaner.php
Created September 5, 2025 04:12
removes unnecessary columns from WP admin post list
<?php
/**
* Plugin Name: WP Admin Column Cleaner
* Description: Removes unnecessary columns from the WordPress admin post list for a cleaner, more focused view.
* Author: Anish Blon Lama
* Version: 1.0
* License: GPL2+
*/
/**
@anishlama
anishlama / ga-data-layer-push.js
Created April 20, 2023 01:22
DataLayer Push on Gravity Form Successful Submission
/*
* Note: gform_confirmation_loaded works on AJAX enabled forms only
* e.g
* [gravityform id="3" title="false" description="false" ajax="true"]
*/
jQuery(document).ready(function(){
jQuery(document).on("gform_confirmation_loaded", function(event, form_id){
window.dataLayer = window.dataLayer || [];
@anishlama
anishlama / css-media-queries.css
Created February 25, 2023 00:04
CSS Media Queries for Desktop, Tablet and Mobile
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width: 768px) and (max-width: 1024px) { /* Tablets, iPads (Portrait) */ }
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) { /* Tablets, iPads (landscape) */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
@anishlama
anishlama / ajax-on-dyanamic-loaded-content.js
Created January 17, 2023 06:11
Fix for jQuery not working on Dynamic Content after DOM Changes
/*
jQuery function doesn't work after AJAX call because you are using dynamic content.
We need to change your click call to a delegated method like on
*/
jQuery(document).on('change', '.gus_delivery_options input[name=user_gus_brand_shipping_type]', function () {
// Logic
});
@anishlama
anishlama / functions.php
Last active June 26, 2019 04:24
Integrate your Wordpress site using Contact Form 7 with the Pardot Marketing Automation platform
add_filter('Forms3rdPartyIntegration_service_filter_args', 'use_curl_method_for_pardot', 10, 3);
function use_curl_method_for_pardot($post_args, $service, $form) {
$submission = WPCF7_Submission::get_instance();
if ( $submission ) {
$posted_data = $submission->get_posted_data();
$first_name = $posted_data['first-name'];
$last_name = $posted_data['last-name'];
$email = $posted_data['your-email'];