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 / 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>
@hmowais
hmowais / functions.php
Created January 2, 2025 22:21
Add Envelope Addon Option to Woocommerce Product
<?php
/**
* Adding Checkbox and Price Field in Product Admin Panel
*/
function custom_add_envelope_checkbox_and_price() {
echo '<div class="custom-envelop-checkbox">';
// Envelope activation checkbox
woocommerce_wp_checkbox( array(
@hmowais
hmowais / functions.php
Created December 18, 2024 15:41
UserBack Script
<?php
function add_userback_script() {
?>
<script>
window.Userback = window.Userback || {};
Userback.access_token = 'A-7VARVgBtpJtf80JEeZRR9LRpK';
// identify your logged-in users (optional)
Userback.user_data = {
id: "123456", // example data
@hmowais
hmowais / script.js
Created December 16, 2024 18:17
Counters for Webflow
// assign class counter on text span
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/waypoints/2.0.3/waypoints.min.js'></script>
<script src='https://cdn.jsdelivr.net/jquery.counterup/1.0/jquery.counterup.min.js'></script>
<script>
$('.counter').counterUp({
delay: 10,
time: 1000
});