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 / live-sass-compiler.json
Created May 8, 2022 20:13
Live sass compiler settings
"liveSassCompile.settings.formats": [
{
"format": "expanded",
"extensionName": ".css",
"savePath": null,
"savePathSegmentKeys": null,
"savePathReplaceSegmentsWith": null
}
],
<?php
/**
* This file adds a custom section in the customizer that recommends the installation of the Kirki plugin.
* It can be used as-is in themes (drop-in).
*
* @package kirki-helpers
*/
if ( ! function_exists( 'kirki_installer_register' ) ) {
/**
@humayunahmed8
humayunahmed8 / remove-and-redeclare-function.php
Created February 28, 2022 11:55
Remove existing function from main theme and redeclare function in child theme
<?php
// Remove tgmpa function from main theme and redeclare the function in child theme
function remove_content_filter() {
remove_filter( 'tgmpa_register', 'themeplace_register_required_plugins' );
}
add_action( 'after_setup_theme', 'remove_content_filter' );
@humayunahmed8
humayunahmed8 / wp-cli-configure.txt
Last active February 17, 2022 14:35
How to configure wp-cli
# Prerequisite
================
1. Download **xampp or wamp**
2. Download Powershell (https://github.com/PowerShell/PowerShell/releases/download/v7.2.1/PowerShell-7.2.1-win-x64.msi)
3. Create "wp.bat" file
4. Download "wp-cli.phar" (https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar)
# Official Doc:
================
1. WP CLI phar - https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
@humayunahmed8
humayunahmed8 / codestar-options.php
Created February 14, 2022 16:36
Custom widget for popular posts/latest posts/posts from custom post type
<?php if ( ! defined( 'ABSPATH' ) ) { die; }
function mydeals_theme_shortcode_options($options){
$options = array();
}
add_filter('cs_shortcode_options', 'mydeals_theme_shortcode_options');
function mydeals_theme_customizer($options){
$options = array();
}
@humayunahmed8
humayunahmed8 / vs-code-essentials-extensions.txt
Created February 13, 2022 14:16
VS Code Essential Extensions and Theme List
Extenstions Name and Authors:
=============================
# Themes
1. Andromeda - Eliver Lara
2. Dracula Official - Dracula Theme
3. Learn with Sumit Theme - Sumit Saha
# Extensions
1. Auto Rename Tag => Jun Han
2. Autoprefixer => mrmlnc
@humayunahmed8
humayunahmed8 / settings.json
Last active February 13, 2022 14:02
VS Code Settings
{
"workbench.colorTheme": "Dracula Soft",
"workbench.productIconTheme": "fluent-icons",
"workbench.iconTheme": "vscode-icons",
"workbench.editor.enablePreview": false,
"powermode.enabled": true,
"liveServer.settings.donotShowInfoMsg": true,
"explorer.compactFolders": false,
"bracketPairColorizer.excludedLanguages": [""],
"php.validate.executablePath": "F:\\xampp\\php\\php.exe",
@humayunahmed8
humayunahmed8 / cf7-template.html
Last active February 5, 2022 08:59
Subscription Form Contact Form 7
<div class="row justify-content-center align-items-center">
<div class="col-xl-7 col-md-7">
<div class="newsletter-content">
<h5>Get notified of exclusive deals</h5>
[acceptance acceptance-566 default:on] I agree to subscribe to the Mydeals newsletter. See our <a href="https://example.com/privacy-policy">Privacy Policy</a> [/acceptance]
</div>
</div>
<div class="col-xl-5 col-md-5">
<div class="subscription-form">
[email* email placeholder "Enter email address"]
@humayunahmed8
humayunahmed8 / metabox-and-options.php
Created February 3, 2022 17:04
Social Media Links Shortcode using Codestar Repeater Field.
<?php if ( ! defined( 'ABSPATH' ) ) { die; }
function mydeals_theme_shortcode_options($options){
$options = array();
}
add_filter('cs_shortcode_options', 'mydeals_theme_shortcode_options');
function mydeals_theme_customizer($options){
$options = array();
}
@humayunahmed8
humayunahmed8 / admin-widget.css
Created February 3, 2022 04:34
WP admin sticky widget
@media screen and (min-width: 481px) {
.widget-liquid-right {
position: -webkit-sticky;
position: sticky;
top: 42px;
}
}