Skip to content

Instantly share code, notes, and snippets.

View humayunahmed8's full-sized avatar
🤡
code fool

Humayun Ahmed humayunahmed8

🤡
code fool
View GitHub Profile
@humayunahmed8
humayunahmed8 / Input.json
Created October 14, 2023 08:05
WP Nav Menu Custom WIdget JSON format
[
{"label": "Products", "url": "#"},
{"label": "Learn", "url": "#"}
]
@humayunahmed8
humayunahmed8 / kirki-customize-with-shortcode.php
Created October 12, 2023 06:09
Create customize option with Kirki and then retrive shortcode
<?php
Kirki::add_config('theme_config_id', array(
'capability' => 'edit_theme_options',
'option_type' => 'theme_mod',
));
Kirki::add_section('main_menu_settings', array(
'title' => __('Main Menu Settings', 'textdomain'),
'priority' => 30,
));
@humayunahmed8
humayunahmed8 / design-scrollbar.css
Created March 23, 2023 10:19
How to design scrollbar with CSS
/*======= Notebook =======*/
.note-book-wrapper {
max-height: 710px;
overflow-y: scroll;
}
.note-book-wrapper::-webkit-scrollbar-track {
border-radius: 3px;
background-color: transparent;
}
.note-book-wrapper::-webkit-scrollbar {
@humayunahmed8
humayunahmed8 / kirki-repeater.php
Last active January 17, 2023 14:46
Kirki repeater field
new \Kirki\Field\Repeater(
[
'settings' => 'repeater_setting_4',
'label' => esc_html__( 'Works Settings', 'kirki' ),
'section' => 'section_id',
'row_label' => [
'type' => 'field',
'value' => esc_html__( 'Your Custom Value', 'kirki' ),
@humayunahmed8
humayunahmed8 / wp-enqueue-scripts.php
Created December 24, 2022 14:21
WP enqueue scipts
function mydeals_styles() {
if( is_page(['all-deals'])) {
wp_enqueue_style( 'bootstrap-test', get_template_directory_uri() . '/assets/css/bootstrap.min.css', array(), '5.3.11', false );
}
}
add_action('wp_enqueue_scripts', 'mydeals_styles');
@humayunahmed8
humayunahmed8 / remove-nitropack-free-label.js
Created October 28, 2022 14:42
Remove Nitropack Powered by Label
document.addEventListener("DOMContentLoaded", function(){ let divc = document.querySelectorAll('div[style]'); for (let i = 0, len = divc.length; i < len; i++) { let actdisplay = window.getComputedStyle(divc[i], null).display; let actclear = window.getComputedStyle(divc[i], null).clear; if(actdisplay == 'block' && actclear == 'both') { divc[i].remove(); } } });
@humayunahmed8
humayunahmed8 / script.js
Created October 21, 2022 12:35
JQuery Syntax
$(document).ready(function(){
// jQuery methods go here...
$("p").on({
mouseenter: function(){
$(this).css("background-color", "lightgray");
},
mouseleave: function(){
$(this).css("background-color", "lightblue");
},
@humayunahmed8
humayunahmed8 / 1.breakpoints.scss
Last active July 27, 2022 14:42
Sass Advance Responsive Mixin
// Breakpoints.
$breakpoints: (
xs: 425px,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px,
xxl: 1400px,
c1600: 1600px,
);
"liveSassCompile.settings.formats": [
{
"format": "expanded",
"extensionName": ".css",
"savePath": "assets/css",
// "savePathSegmentKeys": null,
// "savePathReplaceSegmentsWith": null
}
],
"liveSassCompile.settings.generateMap": true,
@humayunahmed8
humayunahmed8 / bootstrap-grid.css
Created May 14, 2022 13:28
Bootstrap 5 Grid System
/*!
* Bootstrap Grid v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
.container,
.container-fluid,
.container-lg,
.container-md,