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
| // set up labels | |
| $labels = array( | |
| 'name' => 'Product Categories', | |
| 'singular_name' => 'Product Category', | |
| 'search_items' => 'Search Product Categories', | |
| 'all_items' => 'All Product Categories', | |
| 'edit_item' => 'Edit Product Category', | |
| 'update_item' => 'Update Product Category', | |
| 'add_new_item' => 'Add New Product Category', | |
| 'new_item_name' => 'New Product Category', |
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 | |
| /*Plugin Name: Create Product Category Taxonomy | |
| Description: This plugin registers the 'product category' taxonomy and applies it to the 'product' post type. | |
| Version: 1.0 | |
| License: GPLv2 | |
| */ | |
| // register two taxonomies to go with the post type | |
| function wpmudev_register_taxonomy() { | |
| // set up labels |
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
| while ( have_posts() ) : the_post(); |
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
| the_meta(); |
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
| $price = get_post_meta( get_the_ID(), 'Price', true ); | |
| if( ! empty( $price ) ) { | |
| echo '<p>Price: $' . $price . '</p>'; | |
| } |
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 rmcc_register_taxonomy() { | |
| $labels = array( | |
| 'name' => __( 'Weebles' ), | |
| 'singular_name' => __( 'Weeble' ), | |
| 'search_items' => __( 'Search Weebles' ), | |
| 'all_items' => __( 'All Weebles' ), | |
| 'edit_item' => __( 'Edit Weebles' ), | |
| 'update_item' => __( 'Update Weebles' ), | |
| 'add_new_item' => __( 'Add New Weebles' ), |
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 | |
| /* | |
| Theme Name: WPMU DEV Custom Navigation Menu Icons | |
| Theme URI: http://rachelmccollin.co.uk/wpmudev-custom-menu-icons | |
| Description: Theme to support WPMU DEV post on custom menu items | |
| Author: Rachel McCollin | |
| Author URI: http://rachelmccollin.co.uk/ | |
| Template: twentyfifteen | |
| Version: 1.0 | |
| */ |
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 | |
| function wmpudev_enqueue_icon_stylesheet() { | |
| wp_register_style( 'fontawesome', 'http:////maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' ); | |
| wp_enqueue_style( 'fontawesome'); | |
| } | |
| add_action( 'wp_enqueue_scripts', 'wmpudev_enqueue_icon_stylesheet' ); | |
| ?> |