This file contains 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
/*adding stock option*/ | |
function add_custom_stock_type() { | |
?> | |
<script type="text/javascript"> | |
jQuery(function(){ | |
jQuery('._stock_status_field').not('.custom-stock-status').remove(); | |
}); | |
</script> | |
<?php |
This file contains 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 register fields for WooCommerce registration. | |
* | |
* @return string Register fields HTML. | |
*/ | |
function wooc_extra_register_fields() { | |
?> | |
<p class="form-row form-row-first"> | |
<label for="reg_billing_first_name"><?php _e( 'First name', 'woocommerce' ); ?> <span class="required">*</span></label> |
This file contains 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
/**make sure you are adding search in top right widgets **/ | |
.site-header .widget-area { | |
/* float: right; */ | |
width: 500px; | |
margin: 0 auto; | |
} | |
.title-area { | |
font-weight: 700; |
This file contains 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 | |
/*sample code to inject code in HEAD tags*/ | |
/*check out the tutorials: https://www.ministryofwp.com/add-codes-in-child-theme-header/ */ | |
add_action('wp_head', 'mwp_header_code'); | |
function mwp_header_code(){ | |
?> | |
<script type="text/javascript"> | |
This file contains 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 | |
/* | |
*Creating custom widgets | |
*Check out the tuts: https://www.ministryofwp.com/build-custom-wordpress-widget/ | |
*/ | |
class mwp_wid extends WP_Widget{ | |
function mwp_wid(){ |
This file contains 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 | |
/* | |
check out the full tuts: https://www.ministryofwp.com/how-to-add-wordpress-meta-box/ | |
*/ | |
function add_guest_details() { | |
add_meta_box('guest-details', 'Guest details', 'guestcallback', 'post', 'side', 'high'); | |
} |