This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//hook into the init action and call create_book_taxonomies when it fires | |
add_action( 'init', 'create_book_taxonomies', 0 ); | |
//create two taxonomies, genres and writers for the post type "book" | |
function create_book_taxonomies() | |
{ | |
// Add new taxonomy, make it hierarchical (like categories) | |
$labels = array( | |
'name' => _x( 'Genres', 'taxonomy general name' ), | |
'singular_name' => _x( 'Genre', 'taxonomy singular name' ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add new taxonomy, NOT hierarchical (like tags) | |
$labels = array( | |
'name' => _x( 'Writers', 'taxonomy general name' ), | |
'singular_name' => _x( 'Writer', 'taxonomy singular name' ), | |
'search_items' => __( 'Search Writers' ), | |
'popular_items' => __( 'Popular Writers' ), | |
'all_items' => __( 'All Writers' ), | |
'parent_item' => null, | |
'parent_item_colon' => null, | |
'edit_item' => __( 'Edit Writer' ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mobile SELECT navigation for responsive websites | |
/** | |
* LEGENDS | |
*/ | |
"#menu-main-menu" - is the Main Desktop Navigation UL | |
"select.navigation" - is the Mobile Navigation select element | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Meta Boxes | |
$key = "portfolio"; // POST TYPE NAME | |
$meta_boxes = array( | |
"caption" => array( | |
"name" => "caption", // "name" attribute for input element | |
"title" => "Portfolio Item Caption", // "lable" of the field | |
"description" => "Description for this field" // helpful description shown in WordPress Admin Panel | |
), | |
"gallery" => array( | |
"name" => "gallery-id", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Html basic form | |
<form id="" action="" method="post"> | |
<table> | |
` <tr> | |
<td>Name</td> | |
<td>:</td> | |
<td><input id="" type="text" name="name" /></td> | |
</tr> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table> | |
<form action="" method=""> | |
<tr> | |
<td>Name</td> | |
<td><input type="text" class="" name="username" /></td> | |
</tr> | |
<tr> | |
<td>E-Mail</td> | |
<td><input type="text" class="" name="email" /></td> | |
</tr> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Basic HTML Form | |
<form id="contact-form" class="span7 cf" action="" method="post"> | |
<div id="status"> | |
</div> | |
<legend>Leave us a message</legend> | |
<span class="col3 first"> | |
<input type="text" id="name" name="name" placeholder="Name"> | |
</span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Multiple videos in Lightbox / Overlay | |
Dependencies: | |
http://releases.flowplayer.org/js/flowplayer-3.2.12.min.js | |
http://cdn.jquerytools.org/1.2.6/all/jquery.tools.min.js | |
The CSS | |
<style> | |
.overlay { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'type' => 'post', | |
'child_of' => 0, | |
'parent' => '', | |
'orderby' => 'name', | |
'order' => 'ASC', | |
'hide_empty' => 1, | |
'hierarchical' => 1, | |
'exclude' => '', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/bainternet/My-Meta-Box |