Skip to content

Instantly share code, notes, and snippets.

View itszaman's full-sized avatar

Sarwar Zaman itszaman

View GitHub Profile
<?php
/**
* The custom template for the Design category for Modern Portfolio Pro
*/
//* Force full width content layout
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
//* Remove the entry meta in the entry header
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
@itskawsar
itskawsar / WordPress Custom Metabox Snippet
Created June 24, 2014 11:35
WordPress Custom Metabox Snippet
// Product meta box
/**
* Adds a box to the main column on the Post and Page edit screens.
*/
function tormuz_add_meta_box() {
$screens = array( 'product' );
foreach ( $screens as $screen ) {
@archiechen
archiechen / index.html
Created November 9, 2012 12:57
use bootstrap css and jqueryui to draggable and droppable
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
@kasparsd
kasparsd / custom-post-taxonomy-permalinks.php
Created June 13, 2012 15:47
Create permalink structure URLs for custom post types that include all parent terms from a custom taxonomy
<?php
/*
Term Archive Pages:
- http://example.com/recipes/dinner/
- http://example.com/recipes/breakfast,brunch/
Single Recipe Pages:
- http://example.com/recipes/dinner/soup-title/
@ninnypants
ninnypants / single-page-walker.php
Created June 5, 2012 01:56
Nav walker for single page WordPress sites
<?php
class Single_Page_Walker extends Walker_Nav_Menu{
function start_el(&$output, $item, $depth, $args) {
global $wp_query;
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
$class_names = $value = '';
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
$classes[] = 'menu-item-' . $item->ID;