Skip to content

Instantly share code, notes, and snippets.

View amitkolloldey's full-sized avatar
🏠
Working from home

Amit Kollol Dey amitkolloldey

🏠
Working from home
View GitHub Profile
@amitkolloldey
amitkolloldey / Art gallery.md
Last active January 11, 2021 07:24
Art gallery
@amitkolloldey
amitkolloldey / index.html
Last active January 30, 2017 20:35
Simple form validation with javascript
<!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">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Practice Template</title>
@amitkolloldey
amitkolloldey / functions.php
Last active March 21, 2017 19:28
Enqueue Scripts And Styles In Wordpress
<?php
/**
* Enqueue scripts and styles.
*/
function balihomes_scripts() {
wp_enqueue_style( 'balihomes-fontawesomestyle', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
wp_enqueue_style( 'balihomes-bootstrapstyle', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css');
wp_enqueue_style( 'balihomes-style', get_stylesheet_uri() );
wp_enqueue_style( 'balihomes-stylemain', get_template_directory_uri() . '/css/style.css');
@amitkolloldey
amitkolloldey / template-homepage.php
Created January 11, 2017 04:53
Custom Post Query in Wordpress
<?php
/*
* Template Name: Homepage
*/
get_header();?>
<?php
global $post;
$args = array( 'posts_per_page' => 24, 'post_type'=> 'villa', 'orderby' => 'menu_order', 'order' => 'ASC' );
$myposts = get_posts( $args );
foreach( $myposts as $post ) : setup_postdata($post);
@amitkolloldey
amitkolloldey / balihomes-toolbox.php
Created January 11, 2017 04:50
Register custompost type and taxonomy from plugin
<?php
/*
Plugin Name:Bali Homes Toolbox
Description:This plugin is for Bali Homes theme.
Author: Logic Fighters
Version: 1.0
*/
if ( ! class_exists( 'bh_custom_post_types' ) ):
function bh_custom_post_types() {