Skip to content

Instantly share code, notes, and snippets.

View mehedicsit's full-sized avatar

Mehedi Hasan mehedicsit

View GitHub Profile
@mehedicsit
mehedicsit / customise css3 media queries
Created February 11, 2015 05:39
My customised css3 queries for my personal use
@media (min-width:960px) and (max-width:1500px){
.slicknav_menu {
background: none repeat scroll 0 0 #4c4c4c;
display: none;
padding: 5px;
}
}
/* #1- Portrait tablet to landscape and desktop */
@mehedicsit
mehedicsit / Important slider link
Created February 16, 2015 07:24
important sllider link
@mehedicsit
mehedicsit / php important script link
Created February 16, 2015 08:53
php important script link
@mehedicsit
mehedicsit / how to create outside circle of a font-awesome icon
Created March 12, 2015 05:25
how to create outside circle of a font-awesome icon
i.fa {
display: inline-block;
-moz-border-radius: 60px;
-webkit-border-radius: 60px;
border-radius: 60px;
-moz-box-shadow: 0px 0px 4px #94908f;
-webkit-box-shadow: 0px 0px 4px #94908f;
box-shadow: 0 0 4px #94908f;
display: inline-block;
margin-right: 6px;
@mehedicsit
mehedicsit / wp register custom post code and register sidebar code
Created May 29, 2015 19:36
wp register custom post code and register sidebar code include it in functions.php
<?php
/********
*custom post type for slider an services
*********/
function zBoom_slider(){
register_post_type('zBoom_slider',array(
'label'=>'slider',
'labels'=>array(
'name'=>'slider',
@mehedicsit
mehedicsit / wp custom register post type calling
Created May 29, 2015 19:40
wp custom register post type calling
<section id="content">
<?php $image_gallery=new WP_Query(
array(
'post_type'=>'zBoom_gallery',
'posts_per_page'=>20,
)); ?>
<div class="wrap-content zerogrid">
<div class="row block03">
@mehedicsit
mehedicsit / gist:16a5c3f20862cd4edfbd
Created June 5, 2015 04:47
Tricks about redux frame work
আমরা যারা WordPress theme এ Redux Framework নিয়ে কাজ করি তারা Redux এর নতুন version এ কিছু সমস্যায় পরি যেমন allow tracking এই নামে একটি popup open হয় theme option এ যাওয়ার পর এছাড়াও tools menu তে Redux About Page টি যুক্ত হয়ে যায় এবং কিছু Ads, Developer mode এ গুলো show করে। এ সমস্যা থেকে মুক্তি পেতে আপনাকে যা করতে হবেঃ
Allow tracking option টি যদি আপনি না চান তাহলে
Framework.php file এ গিয়ে লাইন নম্বর ৫৫১ তে disable_tracking => flase কে true করে দিন। অথবা লাইন নম্বরটি আপনার Redux Version এর ওপর নির্ভর করবে।
Tools menu থেকে Redux About page টি সরাতে চাইলে আপনাকে যা করতে হবেঃ
আপনার functions.php file টিতে একটি function apply করতে হবে।
একটি function নিবেন যে কোন নামে যেমন
function remove_redux_menu() {
remove_submenu_page('tools.php','redux-about');
}
add_action( 'admin_menu', 'remove_redux_menu',12 );
@mehedicsit
mehedicsit / Important upcoming website link
Created July 2, 2015 14:58
Important upcoming website link
@mehedicsit
mehedicsit / functions.php
Created February 3, 2016 04:53 — forked from fuyuko/functions.php
Cheatsheet - WooCommerce Customization in functions.php
//Add a stylesheet after default style.css
wp_enqueue_style( 'my-css', get_template_directory_uri() . 'my-css.css', array('themename-style'));
//WooCommerce - Sort products by SKU
add_filter('woocommerce_get_catalog_ordering_args', 'custom_woocommerce_catalog_orderby');
function custom_woocommerce_catalog_orderby( $args ) {
$args['meta_key'] = '_sku';
$args['orderby'] = 'meta_value';
$args['order'] = 'asc';
return $args;
@mehedicsit
mehedicsit / index.php
Created April 17, 2016 12:41
woocommerce custom loop with
I have made the necessary changes for the code to work. Make sure woocommerce add-to-cart.js or add-to-cart.min.js is enqueued in the page.
<div class="all_content_shop">
<?php wc_print_notices(); ?>
<?php $new_posts = new WP_Query( array(
'post_type' => 'product', //post of page of my post type
'cat' => 0, // category id, 0 for all categories.
'posts_per_page' => 12,
'offset' => 0, //how many posts you want to eliminate from the query
'orderby' => '', // order by title or date ?