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 / 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 / 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 / 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 / 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 / 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 / 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 / populat_post.php
Created January 29, 2014 09:47
wp: post query by comment_count
<?php
$pop = $wpdb->get_results("SELECT id,post_title,guid FROM {$wpdb->prefix}posts WHERE post_type='post' ORDER BY comment_count DESC LIMIT 10");
foreach($pop as $post) : ?>
<li><a href="<?php echo $post->guid; ?>"><?php echo get_the_post_thumbnail($post->id); ?></li>
<?php endforeach; ?>
@webhasan
webhasan / popular_post.php
Last active February 28, 2017 08:27
wp: post view count
/**
* Function for post counter table
* Show post cunter and use
* show more view post as popular
*/
//Create function for new table for post counter
function wpb_set_post_views($postID) {
$count_key = 'wpb_post_views_count';
$count = get_post_meta($postID, $count_key, true);
@webhasan
webhasan / color.css
Created February 2, 2014 03:45
Beautifu color
/*
Beautiful link color
*/
a {
color:#50AAEB;
}
@webhasan
webhasan / gist:8764037
Created February 2, 2014 07:05
css: niddel shape
hr.shape {
background-color: #dcdbdb;
background-image: -moz-linear-gradient(left, #ffffff 0%, #dcdbdb 50%, #ffffff 100%);
background-image: -o-linear-gradient(left, #ffffff 0%, #dcdbdb 50%, #ffffff 100%);
background-image: -webkit-linear-gradient(left, #ffffff 0%, #dcdbdb 50%, #ffffff 100%);
background-image: linear-gradient(left, #ffffff 0%, #dcdbdb 50%, #ffffff 100%);
border: none;
height: 1px;
margin: 1.5em auto;
width: 100%;