Skip to content

Instantly share code, notes, and snippets.

View atikahmed's full-sized avatar

Atik Ahmed atikahmed

View GitHub Profile
@atikahmed
atikahmed / mediaqueries.css
Last active September 5, 2017 06:56
Media Queries
/* #Media Queries
================================================== */
/* Smaller than standard 960 (devices and browsers) */
@media only screen and (max-width: 959px) {}
/* Tablet Portrait size to standard 960 (devices and browsers) */
@media only screen and (min-width: 768px) and (max-width: 959px) {}
@atikahmed
atikahmed / font.css
Created October 19, 2015 07:22
Font Face. This is the proper syntax for an @font-face file Just create a "fonts" folder at the root, copy your FontName into code below and remove comment brackets
@font-face {
font-family: 'FontName';
src: url('../fonts/FontName.eot');
src: url('../fonts/FontName.eot?iefix') format('eot'),
url('../fonts/FontName.woff') format('woff'),
url('../fonts/FontName.ttf') format('truetype'),
url('../fonts/FontName.svg#webfontZam02nTh') format('svg');
font-weight: normal;
font-style: normal; }
@atikahmed
atikahmed / bootstrap-carousel.php
Created February 14, 2017 06:34
Bootstrap Carousel Dynamic in WP
@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 / 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 / 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 / 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 / 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%;
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'),
<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">