Skip to content

Instantly share code, notes, and snippets.

View webhasan's full-sized avatar
🎯
GTM, GA4, Conversion Tracking (Coding Ninja)

Md Hasanuzzaman webhasan

🎯
GTM, GA4, Conversion Tracking (Coding Ninja)
View GitHub Profile
@webhasan
webhasan / quicktags.php
Created January 28, 2014 09:53
wp: quicktags
// Add buttons to html editor
add_action('admin_print_footer_scripts','eg_quicktags');
function eg_quicktags() {
?>
<script type="text/javascript" charset="utf-8">
/* Adding Quicktag buttons to the editor Wordpress ver. 3.3 and above
* - Button HTML ID (required)
* - Button display, value="" attribute (required)
* - Opening Tag (required)
* - Closing Tag (required)
@webhasan
webhasan / style.css
Last active May 28, 2021 08:32
css: reset css code
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
@webhasan
webhasan / style.css
Created January 26, 2014 06:51
wp: theme info css
/*
Theme Name: Buring Desire
Theme URI: webdevelopment24.net/wordpress/theme
Description: This theme for blogin and ecommerce
Author: webhasan(Hasanuzzaman Shozib)
Author URI: http://webdevelopment24.net/about-us
Version: 1.0
Tags: responsive, blog, pixel prefect, white, theme options, right widget, two menu, post formate etc.
License:
@webhasan
webhasan / hot-post.php
Last active January 4, 2016 13:39
wp: Create Hot Post like techtunes.com.bd
<!-- Hop Post Area-->
<div class="hot_post">
<header>
<ul>
<li><img src="<?php echo get_template_directory_uri(); ?>/images/hot_post.png" alt="hot post"></li>
<li><h1>Hot Posts</h1></li>
</ul>
</header>
@webhasan
webhasan / select.html
Created January 26, 2014 06:39
js: target very first latter of words
window.onload = function(){
var elements = document.getElementsByClassName("each-word")
for (var i=0; i<elements.length; i++){
elements[i].innerHTML = elements[i].innerHTML.replace(/\b([a-z])([a-z]+)?\b/gim, "<span class='first-letter'>$1</span>$2")
}
}
<style>
.first-letter {
@webhasan
webhasan / custom.js
Last active May 19, 2016 06:01
Dropdown Menu
<script>
$('#main-menu li').hover(function(){
$(this).children('ul').stop().slideToggle(250);
});
</script>
@webhasan
webhasan / comment.css
Last active May 13, 2018 05:47
wp: comment css
.comments-area {
margin-top: 3em;
}
.comments-area > h3 {
font-size: 18px;
}
#comments {
font-size: 16px;
color:#333;
}
@webhasan
webhasan / calender.css
Created January 26, 2014 05:50
wp: calendar css
/* calendar widget */
.widget_calendar {float: left;}
#wp-calendar {width: 100%; max-width: 100%;}
#wp-calendar caption { text-align: right; color: #333; font-size: 12px; margin-bottom: 15px; }
#wp-calendar thead { font-size: 10px; }
#wp-calendar thead th { padding-bottom: 10px; }
#wp-calendar tbody { color: #aaa; max-width: 100%;}
#wp-calendar tbody td a {color:#3d99ca;}
#wp-calendar tbody td { background: #f5f5f5; border: 1px solid #fff; text-align: center; padding:8px;}
#wp-calendar tbody td:hover { background: #fff; }
@webhasan
webhasan / realted-post.php
Created January 26, 2014 05:47
wp: related post
<?php $orig_post = $post;
global $post;
$categories = get_the_category($post->ID);
if($categories){
$categori_id = array();
foreach ($categories as $category) {
@webhasan
webhasan / making-theme-options.php
Last active January 4, 2016 13:39
wp: options tree
Use options Tree as theme mood:
<?php
add_filter( 'ot_show_pages', '__return_false' );
add_filter( 'ot_show_new_layout', '__return_false' );
add_filter( 'ot_theme_mode', '__return_true' );