Skip to content

Instantly share code, notes, and snippets.

View hemusyl's full-sized avatar

Humayun Kabir hemusyl

View GitHub Profile
<?php
----------------------------------------------------------
For style css
/*
Theme Name: Payra TV
Theme URI: http://www.payratv.com
Author: Humayun Kabir
Author URI: http://www.hkfolio.com/
Description: This theme created for payratv.
http://docs.woothemes.com/documentation/plugins/woocommerce/ All documentation is here
<?php
http://docs.woothemes.com/document/editing-product-data-tabs/
===================================================================================
http://code.tutsplus.com/articles/an-introduction-to-theming-woocommerce-for-wordpress--wp-31577
Disabling the Default Stylesheet and Starting From Scratch
//code to your themes functions.php
define('WOOCOMMERCE_USE_CSS', false);
jQuery(document).ready(function () {
$(".current-menu-item").addClass("active");
});
OR
jQuery(document).ready(function () {
jQuery(".current-menu-item").addClass("active");
});
OR
jQuery(document).ready(function ($) {
@hemusyl
hemusyl / How to Show Your MailChimp Subscriber Count in WordPress
Created October 9, 2015 13:56
How to Show Your MailChimp Subscriber Count in WordPress
http://www.wpbeginner.com/wp-tutorials/how-to-show-your-mailchimp-subscriber-count-in-wordpress/
<?php
/*
Plugin Name: MailChimp Subscriber Count
Plugin URI: http://www.wpbeginner.com
Description: Retrieves MailChimp subscriber count and displays it as a text
Version: 1.0
Author: WPBeginner
Author URI: http://www.wpbeginner.com
@hemusyl
hemusyl / gist:a32c9d848c506e0ecf85
Created October 9, 2015 13:59 — forked from wcodex/gist:8825693
Custom WordPress search form using bootstrap 3.0
?>
<form class="navbar-form" role="search" action="<?php echo site_url('/'); ?>" method="get" >
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" name="s" id="search" value="<?php the_search_query(); ?>">
<div class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>
@hemusyl
hemusyl / Bootstrap Dropdown with Hover
Created October 22, 2015 19:42
Bootstrap Dropdown with Hover
Bootstrap Dropdown with Hover
.dropdown:hover .dropdown-menu {
display: block;
margin-top: 0; // remove the gap so it doesn't close
}
==================================================================
OR
.sidebar-nav {
@hemusyl
hemusyl / TinyMCE by Hk
Created October 30, 2015 07:47
TinyMCE by Hk
http://www.wpexplorer.com/wordpress-tinymce-tweaks/
//tinymce-domain.php
<?php
// Hooks your functions into the correct filters
function desparate_add_mce_button() {
// check user permissions
if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) {
return;
}
// check if WYSIWYG is enabled
@hemusyl
hemusyl / carousel.js
Last active November 22, 2015 17:24
Carousel Active Class
@hemusyl
hemusyl / new_gist_file.php
Created November 14, 2015 18:47 — forked from nickberens360/new_gist_file.php
wordpress: Full dynamic bootstrap carousel code
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<?php
$args = array(
'post_type' => 'slides1',
'orderby' => 'menu_order title',
'order' => 'ASC',
);
$query = new WP_Query( $args );
@hemusyl
hemusyl / bootstraptab.php
Last active November 24, 2015 18:57
Tab Dynamic (Bootsrap tab)
http://wordpress.stackexchange.com/questions/192451/dynamic-bootstrap-tabs-with-post-title-doesnt-display-the-content?lq=1
<div id="tab">
<ul class="nav nav-tabs" role="tablist">
<?php $loop = new WP_Query( array( 'post_type' => 'candidates', 'posts_per_page' => -1 ) ); ?>
<?php
$counter = 0;
while ( $loop->have_posts() ) : $loop->the_post();
$counter++;
?>
<li role="presentation" class="post-<?php the_ID(); ?> <?=($counter == 1) ? 'active' : ''?>"><a href="#post-<?php the_ID(); ?>" aria-controls="home" role="tab" data-toggle="tab"><?php the_title();?></a></li>