Skip to content

Instantly share code, notes, and snippets.

View hmowais's full-sized avatar
🎯
Focusing

HM Owais hmowais

🎯
Focusing
  • Karachi, Pakistan
View GitHub Profile
@hmowais
hmowais / team.html
Created March 12, 2026 12:25
Show Popup on Squarespace with Swiper Slider [Team Members]
<section class="team-section">
<div class="swiper teamSwiper" style="max-height: 600px;">
<div class="swiper-wrapper">
<!-- Slide 1 -->
<div class="swiper-slide">
<div class="card" onclick="openModal(
'Babu Purevsuren',
'Owner &amp; CEO',
'<p>Babu came to the United States in 2004 at just 19 years old. He arrived alone, without family and without speaking English, determined to build a better future through hard work and faith.</p><p>He began by studying English at the English Language Center, then earned a business degree from LDS College, followed by a Construction Management degree from BYU. In 2015, he started a handyman business, which quickly grew into subcontracting work for companies such as UDK, Utah Flood Network, and other restoration providers across Utah.</p><p>In 2019, Babu founded Summit Restoration with a clear purpose: to serve Utah families during some of the most difficult moments of their lives. He believes restoration work is more t
@hmowais
hmowais / functions.php
Created February 10, 2026 14:07
SVG Support
// Allow SVG uploads
function custom_add_svg_support($mimes) {
// Add SVG to allowed mime types
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'custom_add_svg_support');
// Optional: Sanitize SVG files for security
function custom_check_svg($file) {
@hmowais
hmowais / custom.js
Created January 30, 2026 11:40
Close Canvas on menu click in Elementor
jQuery(document).ready(function($) {
// Offcanvas container
var $offcanvas = $("#off-canvas-6f5ddbf");
// Menu links inside offcanvas
$(".elementor-nav-menu li a").on("click", function() {
// Remove active class
$offcanvas.removeClass("e-off-canvas--active");
@hmowais
hmowais / custom.css
Last active August 29, 2025 19:13
Border Gradient with CSS
.ote_bgcolor {
position: relative;
border-radius: 16px;
z-index: 1;
border:0!important;
}
.ote_bgcolor:hover {
position: relative;
border-radius: 16px;
}
@hmowais
hmowais / shortcode.php
Created July 23, 2025 18:02
Show CPT with ACF | Search & Filters
<?php
function featured_product_search_ajax_shortcode() {
ob_start();
?>
<div id="product-search-wrap">
<input type="text" id="product-search" placeholder="Search for products I posted by name or keyword..">
</div>
<h3 class="product_heading">Featured Products</h3>
<div id="product-results">Loading products...</div>
@hmowais
hmowais / button.html
Created April 29, 2025 18:19
Gradient Button Border with Hover Effect
.btn {
position: relative;
display: inline-block;
padding: 18px 40px;
font-size: 20px;
font-weight: 700;
color: #002e48;
text-align: center;
text-decoration: none;
border-radius: 50px;
@hmowais
hmowais / functions.php
Created April 4, 2025 17:16
Updated CPT & Taxonomies Hook
<?php
/* Register Custom Post Types */
function cwptheme_post_type() {
$post_types_arr = array( 'Amenities', 'Principles', 'Investments' );
foreach( $post_types_arr as $post_type_a){
$labels = array(
'name' => __( $post_type_a ),
@hmowais
hmowais / us-states.json
Last active February 7, 2025 22:23
United States MAP JSON
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hmowais
hmowais / links.txt
Last active January 31, 2025 20:31
Important Videos Link
@hmowais
hmowais / functions.php
Created January 30, 2025 21:18
Close Elementor Popup and Scroll to Specific Section on button click
<?php
function cs_footer() { ?>
<script>
jQuery(function($){
$(document).on('click','.elementor-location-popup a', function(event){
elementorProFrontend.modules.popup.closePopup( {}, event);
});
});
</script>