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
| if (typeof jQuery == 'undefined') { | |
| // jQuery IS NOT loaded, do stuff here. | |
| } |
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
| $args = array( | |
| 'label' => __('Products'), | |
| 'singular_label' => __('Product'), | |
| 'public' => true, | |
| 'show_ui' => true, | |
| 'capability_type' => 'page', | |
| 'hierarchical' => false, | |
| 'rewrite' => true, | |
| 'query_var' => 'products', | |
| 'supports' => array('title', 'thumbnail') |
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
| function post_type_albums() { | |
| register_post_type( | |
| 'albums', | |
| array( 'label' => __('Albums'), | |
| 'public' => true, | |
| 'show_ui' => true, | |
| 'supports' => array('post-thumbnails', 'excerpts', 'trackbacks', 'comments') | |
| ) | |
| ); | |
| // Custom Taxonomy for Genres: categories specific for this post type |
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 echo get_post_meta($post->ID, "Camera_Specs", true); ?> |
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
| <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js" ></script> |
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
| .text { | |
| overflow:visible; /* Shrinkwrap the text in IE7- */ | |
| margin:0; | |
| padding:0; | |
| border:0; | |
| color:#8f1f08; /* Match your link colour */ | |
| background:transparent; | |
| font:inherit; /* Inherit font settings (doesn’t work in IE7-) */ | |
| line-height:normal; /* Override line-height to avoid spacing issues */ | |
| text-decoration:underline; /* Make it look linky */ |
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
| // get a list of categories, in this case your custom taxonomy (your_taxonomy_name) | |
| $querystr = "SELECT terms.* FROM $wpdb->term_taxonomy tax LEFT JOIN $wpdb->terms terms ON tax.term_id = terms.term_id WHERE tax.taxonomy = 'retouch_types'"; | |
| $categories = $wpdb->get_results($querystr, OBJECT); | |
| // begin a loop through those terms (categories in your custom taxonomy) | |
| foreach( $categories as $category ) { | |
| echo '<div class="category-header"><h2>'.$category->name.'</h2>'; // print the cat title | |
| echo '<p class="category-description">'.strip_tags(term_description($category->term_id,'retouch_types')).'</p></div>'; // cat description | |
| //select posts in this category, and of a specified content type |
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
| if( !function_exists( 'create_quote_post_type' ) ): | |
| function create_quote_post_type() { | |
| $labels = array( | |
| 'name' => __( 'Quote' ), | |
| 'singular_name' => __( 'Quote' ), | |
| 'add_new' => __( 'Add quote' ), | |
| 'all_items' => __( 'All quotes' ), | |
| 'add_new_item' => __( 'Add quote' ), | |
| 'edit_item' => __( 'Edit quote' ), | |
| 'new_item' => __( 'New quote' ), |
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
| .break { | |
| -ms-word-break: break-all; | |
| word-break: break-all; | |
| word-break: break-word; | |
| -webkit-hyphens: auto; | |
| -moz-hyphens: auto; | |
| hyphens: auto; |
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
| jQuery.fn.log = function (msg) { | |
| console.log("%s: %o", msg, this); | |
| return this; | |
| }; | |
| $('#some_div').find('li.source > input:checkbox').log("sources to uncheck").removeAttr("checked"); |