Skip to content

Instantly share code, notes, and snippets.

Avatar
🤡
code fool

Humayun Ahmed humayunahmed8

🤡
code fool
View GitHub Profile
View json-async-await.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Async and Await</title>
</head>
<body>
@humayunahmed8
humayunahmed8 / remove_checkout_fields.php
Created Oct 27, 2020 — forked from cryptexvinci/remove_checkout_fields.php
Remove fields from WooCommerce checkout page.
View remove_checkout_fields.php
add_filter( 'woocommerce_checkout_fields' , 'custom_remove_woo_checkout_fields' );
function custom_remove_woo_checkout_fields( $fields ) {
// remove billing fields
unset($fields['billing']['billing_first_name']);
unset($fields['billing']['billing_last_name']);
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_address_1']);
unset($fields['billing']['billing_address_2']);
View Fraud Client Protection for wordpress.php
<?php
//save theme active time
function my_theme_activation_init() {
// Check if already saved the activation date & time
// to prevent over-writing if user deactive & active theme
// multiple time
if(!get_option('mytheme_activation_time', false)){
@ImtiazEpu
ImtiazEpu / Old Codestar framework documentation.md
Last active Feb 18, 2022
Old Codestar framework documentation
View Old Codestar framework documentation.md

Codestar Framework

A Lightweight and easy-to-use WordPress Options Framework. It is a free framework for building theme options. Save your time!

Screenshot

Codestar Framework Screenshot

Documentation

Read the documentation for details documentation

Installation

View the_post_navigation.php
Use WordPress default function to get next and previous post title with permalink something like this:
<?php // FOR PREVIOUS POST
$prev_post = get_previous_post();
$id = $prev_post->ID ;
$permalink = get_permalink( $id );
?>
<?php // FOR NEXT POST
$next_post = get_next_post();
$nid = $next_post->ID ;
@raselahmed7
raselahmed7 / google-fonts.php
Last active Sep 7, 2020
How to call google fonts from theme option in best way
View google-fonts.php
<?php
$frozen_body_font_get = cs_get_option('frozen_body_font');
$frozen_heading_font_get = cs_get_option('frozen_headding_font');
function frozen_crazycafe_body_gf_url() {
$font_url = '';
$frozen_body_font_get = cs_get_option('frozen_body_font');
if(array_key_exists('family', $frozen_body_font_get)) {
$frozen_body_font_get_family = $frozen_body_font_get['family'];