Skip to content

Instantly share code, notes, and snippets.

View hemusyl's full-sized avatar

Humayun Kabir hemusyl

View GitHub Profile
@hemusyl
hemusyl / mixitup&magnific-popup.css
Last active November 6, 2016 15:41
mixitup&magnific-popup
http://dimsemenov.com/plugins/magnific-popup/documentation.html
https://mixitup.kunkalabs.com/
https://mixitup.kunkalabs.com/learn/tutorial/get-started/
https://mixitup.kunkalabs.com/docs/
<!--magnific-popup -->
<link rel="stylesheet" href="css/magnific-popup.css">
<section id="portfolio" class="portfolio-area fix ptb-80">
<div class="column">
@hemusyl
hemusyl / responsive.css
Created September 25, 2016 07:18
Responsive CSS Code
/**
* Responsive Layout
*/
/* Normal Desktop: 992px. */
@media only screen and (min-width: 992px) and (max-width: 1200px) {
.column {
@hemusyl
hemusyl / skill.php
Created August 29, 2016 07:57
Skill Option Tree
<div class="col-lg-6 col-md-6 col-sm-6 wow zoomIn" data-wow-duration ="1s" data-wow-delay="0.5s">
<?php // Loop for Social Links
if (function_exists('ot_get_option')) {
/* get the option array */
$skill_items = ot_get_option('skill_items', array());
if (!empty($skill_items)) {
foreach ( $skill_items as $skill) {
@hemusyl
hemusyl / taxonomy.php
Created August 28, 2016 07:59
Taxonomy
<?php
function versiontwos_taxonomy() {
register_taxonomy(
'filter', //The name of the taxonomy. Name should be in slug form (must not contain capital letters or spaces).
'portfolio', //post type name
array(
'hierarchical' => true,
'label' => 'Portfolio Category', //Display name
'query_var' => true,
'show_admin_column' => true,
@hemusyl
hemusyl / tabbed_taxonomy.php
Last active May 9, 2016 18:05 — forked from FernE97/tabbed_taxonomy.php
PHP: WordPress custom taxonomy/post query
<?php
$args = array(
'orderby' => 'ID'
);
$terms = get_terms( 'testimonial_category', $args );
?>
<!-- bootstrap tabs -->
<ul class="nav-tabs">
<?php
@hemusyl
hemusyl / functions.php
Created May 6, 2016 15:55
wp advances search
function advance_newpage_search() {
$args = array();
$args['wp_query'] = array( 'post_type' => array('job'),
'orderby' => 'title',
'order' => 'ASC' );
// Here is where we specify the page where results will be shown
$args['form'] = array( 'action' => get_bloginfo('url') . '/newpage' ); // create a page what slug name is "newpage".
$args['fields'][] = array( 'type' => 'search',
@hemusyl
hemusyl / mixitORisotop.php
Last active August 28, 2016 16:03
Mixit Up and Isotope Dynamic
http://webdgallery.com/how-to-dynamic-mixitup-or-isotop-in-wordpress/
functions.php
/**
* Adds terms from a custom taxonomy to post_class
*/
add_filter( 'post_class', 'theme_t_wp_taxonomy_post_class', 10, 3 );
function theme_t_wp_taxonomy_post_class( $classes, $class, $ID ) {
$taxonomy = 'filters';
$terms = get_the_terms( (int) $ID, $taxonomy );
if( !empty( $terms ) ) {
@hemusyl
hemusyl / add.js
Created March 24, 2016 07:58
Add Google fonts and JS file in Funcctions.php
//Adding "Bitter" google fonts
wp_enqueue_style( 'et-googleFonts', 'http://fonts.googleapis.com/css?family=Bitter:400,400italic,700');
// Add google maps
wp_enqueue_script( 'maps-google', 'http://maps.google.com/maps/api/js?sensor=true');
@hemusyl
hemusyl / style.css
Last active March 23, 2016 07:54
Child Theme
/*
Theme Name: Twenty Fifteen Child
Theme URI: http://example.com/twenty-fifteen-child/
Description: Twenty Fifteen Child Theme
Author: John Doe
Author URI: http://example.com
Template: twentyfifteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
<?php
global $paged;
$posts_per_page = 9;
$settings = array(
'showposts' => $posts_per_page,
'post_type' => 'portfolio',
'orderby' => 'menu_order',
'order' => 'ASC',
'paged' => $paged)
);