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 | |
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 | |
/* | |
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 | |
/** | |
* 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 | |
/** | |
* 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 | |
function woo_custom_physical_product_tab( $tabs ) { | |
global $product; | |
// Ensure it doesn't show for virtual products | |
if ( ! $product->is_virtual() ) { | |
$tabs['shipping'] = array( | |
'title' => __( 'Shipping', 'textdomain' ), | |
'callback' => 'woo_custom_shipping_tab', | |
'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 | |
/** | |
* Reorder woocommerce product data tabs | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_reorder_product_data_tabs', 98 ); | |
function woo_reorder_product_data_tabs( $tabs ) { | |
$tabs['reviews']['priority'] = 5; // Reviews first | |
$tabs['description']['priority'] = 10; // Description second | |
$tabs['additional_information']['priority'] = 15; // Additional information third |
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 | |
/** | |
* Remove woocommerce product data tabs | |
*/ | |
function remove_woo_product_data_tabs( $tabs ) { | |
//unset will remove the product tabs | |
unset( $tabs['description'] ); // Remove the description tab | |
unset( $tabs['reviews'] ); // Remove the reviews 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 | |
// Customize woocommerce product data tabs | |
function customize_woo_description_tab( $tabs ) { | |
$tabs['description']['callback'] = 'woo_description_tab_content'; // Custom description callback | |
return $tabs; | |
} |
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 ci_admin_posts_filter( $query ) | |
{ | |
global $pagenow; | |
if ( is_admin() && $pagenow=='edit.php' && isset($_GET['ADMIN_SEARCH_FIELD_NAME']) && $_GET['ADMIN_SEARCH_FIELD_NAME'] != '') { | |
$query->query_vars['meta_value'] = $_GET['ADMIN_SEARCH_FIELD_NAME']; | |
} | |
} |