Skip to content

Instantly share code, notes, and snippets.

View atikahmed's full-sized avatar

Atik Ahmed atikahmed

View GitHub Profile
@atikahmed
atikahmed / index.html
Created April 10, 2018 05:06
My Google Maps Demo
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
@atikahmed
atikahmed / index.html
Created October 20, 2017 06:42
Simple Form with Validation
<form method="post" action="/" id="form" class="validate">
<div class="form-field">
<label for="full-name">Full Name</label>
<input type="text" name="full-name" id="full-name" placeholder="Joe Bloggs" required />
</div>
<div class="form-field">
<label for="email-input">Email</label>
<input type="email" name="email-input" id="email-input" placeholder="example@domain.com" required />
</div>
<div class="form-field">
<form action="#" method="post">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="name">Name:</label>
<input type="text" class="form-control" name="name" placeholder="Jane Doe">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
function slider_custom_post(){
register_post_type( 'slider-items',
array(
'labels' => array(
'name' => __( 'Sliders' ),
'singular_name' => __( 'Slide' ),
'add_new' => __('Add New', 'Slide'),
'add_new_item' => __('Add New Slide'),
@atikahmed
atikahmed / video.css
Created August 10, 2017 09:57
This file help you to responsive video with out jQuery
iframe{
border:none;
}
.video-container,
.map-container,
.embed-container {
position: relative;
margin: 0 0 15px 0;
padding-bottom: 51%;
@atikahmed
atikahmed / custom-post-query.php
Last active August 20, 2017 07:29
Custom post query with custom field wordpress
<?php
global $post;
$args = array( 'posts_per_page' => 10, 'post_type'=> 'custom-post-type', 'orderby' => 'menu_order', 'order' => 'ASC' );
$myposts = get_posts( $args );
foreach( $myposts as $post ) : setup_postdata($post); ?>
<?php
$service_icon= get_post_meta($post->ID, 'service-icon', true);
?>
@atikahmed
atikahmed / page.php
Last active February 14, 2017 12:25
page post
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div id="post-title" class="clearfix full">
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div> <!-- end div .post-title -->
<div class="entry">
<?php the_content(); ?>
@atikahmed
atikahmed / cheatsheet.php
Last active August 20, 2017 07:30
wordpress theme development cheatsheet
<?php language_attributes(); ?>
<?php bloginfo( 'charset' ); ?>
<?php wp_title( string $sep = '&raquo;', bool $display = true, string $seplocation = '' ); ?>
@atikahmed
atikahmed / functions.php
Created February 14, 2017 06:39
bootstrap menu dynamic in wordpress
// Register Custom Navigation Walker
require_once('include/wp_bootstrap_navwalker.php');
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'tagaction' ),
) );
@atikahmed
atikahmed / bootstrap-carousel.php
Created February 14, 2017 06:34
Bootstrap Carousel Dynamic in WP