Skip to content

Instantly share code, notes, and snippets.

View cryptexvinci's full-sized avatar
🏆
Focusing

Towhid cryptexvinci

🏆
Focusing
  • Ultimate Member Group Ltd
  • Bangladesh
View GitHub Profile
@cryptexvinci
cryptexvinci / storefront-section-description.php
Created September 6, 2017 07:57
add Storefront section description.
add_action('storefront_homepage_after_featured_products_title', 'custom_storefront_product_featured_description');
function custom_storefront_product_featured_description(){ ?>
<p class="element-title--sub">
<?php echo "Section description here";?>
</p>
<?php }
@cryptexvinci
cryptexvinci / storefront-category.php
Last active September 16, 2017 15:04
set number of product category you want to display on Storefront Homepage.
add_filter('storefront_product_categories_shortcode_args','custom_storefront_category_per_page' );
// Category Products
function custom_storefront_category_per_page( $args ) {
$args['number'] = 10;
return $args;
}
@cryptexvinci
cryptexvinci / storefront-category-child.php
Created September 6, 2017 12:42
Display child categories on Storefront Homepage.
add_filter('storefront_product_categories_shortcode_args','custom_storefront_category_child' );
// Category Products - display child categories
function custom_storefront_category_child( $args ) {
$args['child_categories'] = 1;
return $args;
}
@cryptexvinci
cryptexvinci / storefront-header.css
Created September 7, 2017 06:29
Make storefront Header Fullwidth
.site-header .col-full{
max-width:100%;
}
@cryptexvinci
cryptexvinci / storefront-remove-search.php
Created September 7, 2017 06:57
Remove search box from Storefront Header section.
add_action( 'init', 'custom_remove_storefront_header_search' );
function custom_remove_storefront_header_search() {
remove_action( 'storefront_header', 'storefront_product_search', 40 );
}
@cryptexvinci
cryptexvinci / um-allowed-type.php
Last active October 17, 2018 14:57
Allow PPT & PPTX file upload for Ultimate Member
/**
* Allow PPT & PPTX file upload for Ultimate Member
* @link https://wordpress.org/plugins/ultimate-member/
*/
add_filter( 'um_allowed_file_types', 'matt_allowed_new_file_types', 10, 1 );
function matt_allowed_new_file_types( $types ) {
$types = array(
'pdf' => 'PDF',
'txt' => 'Text',
@cryptexvinci
cryptexvinci / um-profile-show-id.php
Last active February 22, 2021 11:30
Ultimate member - Display User ID below Username in Profile Page.
<?php
/**
* Ultimate member - Display User ID below Username in Profile Page.
* @link https://wordpress.org/plugins/ultimate-member/
*/
function custom_display_id_profile_page(){
echo '<p>';
esc_html_e( 'Membership ID: ', 'theme-name');
echo um_profile_id();
@cryptexvinci
cryptexvinci / um-woo-order.php
Created November 6, 2018 05:25
Ultimate Member - WooCommerce Order Tab Sorting
add_filter( 'um_woocommerce_account_orders_args', 'um_woo_order_tab_custom' );
function um_woo_order_tab_custom( $args ) {
$args['order'] = 'DESC';
return $args;
}
@cryptexvinci
cryptexvinci / um-group-responsive.css
Created November 8, 2018 03:17
Ultimate Member - Group Extension
.uimob340 .um-group-name,
.uimob340 .um-group-item .um-group-image,
.uimob340 .um-group-item .um-group-meta,
.uimob340 .um-group-item .actions{
width:100%;
float:left;
text-align:center;
margin:.5em 0;
}
@cryptexvinci
cryptexvinci / ext-um-theme-header.php
Last active November 25, 2018 08:36
Extending UM Theme Header Profile Section to add last login date & Time.
<?php
add_action('um_theme_header_profile_before', 'custom_add_last_login_time' );
function custom_add_last_login_time(){
echo '<div class="small alert alert-light" role="alert">';
echo "Last Login : ";
echo um_user_last_login( get_current_user_id() );
echo '</div>';
}