Skip to content

Instantly share code, notes, and snippets.

View milapdave's full-sized avatar

Milap Dave milapdave

View GitHub Profile
@carolineschnapp
carolineschnapp / collection-listing-using-linklist.liquid
Created August 13, 2010 19:48
Listing all collections in the shop

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@raselahmed7
raselahmed7 / google-fonts.php
Last active November 11, 2022 10:22
How to call google fonts from theme option in best way
<?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'];
if ( ! function_exists( 'prefix_fonts_url' ) ) :
/**
* Register Google fonts.
*
* @return string Google fonts URL for the theme.
*/
function prefix_fonts_url() {
$fonts_url = '';
$fonts = array();
$subsets = '';
@humayunahmed8
humayunahmed8 / project-topic.txt
Last active October 3, 2022 05:29
Project Topic
## table of contents:
=====================
1. Basic Php
2. Install WordPress in live server
2.1. WordPress Dashboard Introduction
3. Introduce about IDE & WordPress template hierarchy
4. Introducing about Visual Composer
4.1. Visual Composer academy site
4.2. Use Visual Composer Element/Addons
@humayunahmed8
humayunahmed8 / register-sidbar.php
Last active November 11, 2022 10:35
Register sidebar
<?php
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function stock_humayunbd_widgets_init() {
register_sidebar( array(
@humayunahmed8
humayunahmed8 / 1-wp_nav_menu.php
Last active November 11, 2022 10:35
WP Navigation Menus
<?php
// Display Menus on Theme
wp_nav_menu(
array(
'theme_location' => 'header-menu',
'container' => 'div',
'container_class' => 'navbar-collapse collapse align-left',
'menu_class' => 'nav navbar-nav',
@humayunahmed8
humayunahmed8 / custom_logo.php
Created September 13, 2018 07:33
WP Custom Logo
<?php
<div class="logo">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<?php $logo_id = get_theme_mod('custom_logo'); ?>
<?php if(!empty($logo_id)) : the_custom_logo(); else : ?>
<h3><?php bloginfo( 'name' ); ?></h3>
<?php endif; ?>
@humayunahmed8
humayunahmed8 / 1-register_custom_post_type.php
Created September 13, 2018 08:13
Register custom post type
<?php
/**
* Short custom post type
*/
function my_theme_custom_post() {
register_post_type( 'cpt',
array(
'labels' => array(
@humayunahmed8
humayunahmed8 / 1-logo-setting-metabox-option.php
Created September 15, 2018 12:10
Logo setting option using codestar framwork
<?php
function stock_humayunbd_page_metabox($options){
$options = array(); // remove old options
// Logo Setting
$options[] = array(
'name' => 'stock_humayunbd_logo_settings',
'title' => esc_html__('Logo Settings','stock-humayunbd'),