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 | |
| /** | |
| * Rename product data tabs | |
| */ | |
| add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 ); | |
| function woo_rename_tabs( $tabs ) { | |
| $tabs['description']['title'] = __( 'More Detail' ); // Rename the description tab | |
| $tabs['reviews']['title'] = __( 'Ratings' ); // Rename the reviews tab | |
| $tabs['additional_information']['title'] = __( 'Product Data' ); // Rename the additional information tab |
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 | |
| /** | |
| * Add the custom tab | |
| */ | |
| function woo_custom_product_tab( $tabs ) { | |
| $tabs['my_custom_tab'] = array( | |
| 'title' => __( 'Custom Tab', 'textdomain' ), | |
| 'callback' => 'woo_custom_tab_content', | |
| 'priority' => 50, | |
| ); |
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: Woo IK Manufacturer | |
| Plugin URI: http://codeinform.com/custom-woocommerce-plugin-development/ | |
| Description: Product Manufacturer. | |
| Author: Imran Khan | |
| Version: 1.2 | |
| Author URI: http://codeinform.com/ | |
| */ |
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 wcik_add_page_template ($templates) { | |
| $templates['archive-manufacturer.php'] = 'Manufacturer'; | |
| return $templates; | |
| } | |
| add_filter ('theme_page_templates', 'wcik_add_page_template'); | |
| function wcik_archive_page_template ($template) { | |
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 | |
| get_header(); ?> | |
| <div id="main-content" class="main-content"> | |
| <div id="primary" class="content-area"> | |
| <div id="content" class="site-content" role="main"> | |
| <table> | |
| <?php | |
| // Start the Loop. |
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 | |
| /* | |
| Template Name: Manufacturer | |
| */ | |
| ?> | |
| <?php get_header(); ?> | |
| <section id="primary"> | |
| <div id="content" role="main" style="width: 100%"> | |
| <?php | |
| $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; |
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 | |
| //Frontend Product detail page | |
| function display_manufacturer() | |
| { | |
| global $product; | |
| $id = $product->id; | |
| $manufacturer = get_post_meta( $id, 'meta_box_manufacturer', true ); | |
| echo "<p><b>Manufacturer:</b> $manufacturer</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
| <?php | |
| /** | |
| * Add new "Manufacturer" column to products list | |
| */ | |
| add_filter( 'manage_edit-product_columns', 'add_product_manufacturer' ); | |
| function add_product_manufacturer( $columns ) { | |
| $columns['meta_box_manufacturer'] = 'Manufacturer'; | |
| return $columns; | |
| } | |
| /** |
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 | |
| if( !function_exists( 'manufacturer_post_type' ) ){ | |
| function manufacturer_post_type(){ | |
| $labels = array( | |
| 'name' => __( 'manufacturer'), | |
| 'singular_name' => __( 'manufacturer' ), | |
| /*'menu_name' => __( 'All Manufactuers'),*/ | |
| 'all_items' => __( 'Manufacturer'), | |
| 'add_new' => __('Add New'), | |
| 'add_new_item' => __('Add New manufacturer'), |
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: Woo IK Manufacturer | |
| Plugin URI: http://codeinform.com/custom-woocommerce-plugin-development/ | |
| Description: Product Manufacturer. | |
| Author: Imran Khan | |
| Version: 1.2 | |
| Author URI: http://codeinform.com/ | |
| License: GPL2 | |
| */ |