Description

People today are more aware of their well being and the fact that they have to take care of their body, mind and soul. Meditation and mindfullness are becoming more popular each day. Most of the companies who are providing these kind of services can't afford a website or they simply lack resources and know-how for it. Relaxy.ee gathers providers of wellness services in Estonia and makes them available for the potential customers.
Businesses can post job, room rent and event listings in addition to their profile and they can also publish articles in the blog.

Contact Form
General Customization

Custom PHP:

//24H FORMAT

add_filter( 'mylisting/datepicker/enable_24h_format', '__return_true' );
add_filter( 'mylisting/datepicker/datetime_format', function() {
return 'DD MMMM, YY, H:mm';
} );

add_action( 'mylisting/schedule:hourly', function() {
global $wpdb;
// Change status to expired.
$listing_ids = $wpdb->get_col(
$wpdb->prepare( "
SELECT postmeta.post_id FROM {$wpdb->postmeta} as postmeta
LEFT JOIN {$wpdb->posts} as posts ON postmeta.post_id = posts.ID
WHERE postmeta.meta_key = '_job_date'
AND postmeta.meta_value > 0
AND postmeta.meta_value < %s
AND posts.post_status = 'publish'
AND posts.post_type = 'job_listing'",
date( 'Y-m-d', current_time( 'timestamp' ) )
)
);
if ( $listing_ids ) {
foreach ( $listing_ids as $listing_id ) {
$data = [];
$data['ID'] = $listing_id;
$data['post_status'] = 'expired';
wp_update_post( $data );
}
}
} );

//ML - LIMIT IMAGE UPLOAD SIZE
function ml_max_image_size( $file ) {
$size = $file['size'];
$size = $size / 1024;
$type = $file['type'];
$is_image = strpos( $type, 'image' ) !== false;
$limit = 3072;
$limit_output = '3MB';
if ( $is_image && $size > $limit ) {
$file['error'] = 'Image files must be smaller than ' . $limit_output;
}//end if
return $file;
}//end ml_max_image_size()
add_filter( 'wp_handle_upload_prefilter', 'ml_max_image_size' );

// CHANGE $0 TO FREE
function my_wc_custom_get_price_html( $price, $product ) {

if ( $product->get_price() == 0 ) {
if ( $product->is_on_sale() && $product->get_regular_price() ) {
$regular_price = wc_get_price_to_display( $product, array( 'qty' => 1, 'price' => $product->get_regular_price() ) );
$price = wc_format_price_range( $regular_price, __( 'Free!', 'woocommerce' ) );
} else {
$price = '<span class="amount">' . __( 'TASUTA', 'woocommerce' ) . '</span>';
}
}
return $price;
}

add_filter( 'woocommerce_get_price_html', 'my_wc_custom_get_price_html', 10, 2 );

 

// SHOW COVER IMAGE WHEN SHARING

add_filter( 'mylistingsingleog:image', function() {
return 'cover';
} );

 

JS:

// EXPAND WORK HOURS BY DEFAULT
jQuery(document).ready(function($) {
$('.open-hours-wrapper').each(function(index, el) {
$(el).collapse('show');
});
});

// HIDE SUBSCRIPTION DETAILS FOR FREE PACKAGES
jQuery(document).ready(function($) {
$('span:contains("TASUTA")').siblings('.subscription-details').css('opacity', '0');
});

// HIDE CART WHEN EMPTY
jQuery( document ).ready( function( $ ) {

setInterval(function(){
if ($(".widget_shopping_cart_content .woocommerce-mini-cart__empty-message").length ) {
$( '#user-cart-menu' ).hide();
} else {
$( '#user-cart-menu' ).show();
}
}, 2000);
});

// ML - OPEN SOCIAL MEDIA LINKS IN NEW BROWSER TAB
jQuery(document).ready(function($){
$('.block-type-social_networks ul > li a').attr('target', '_blank');
});

// REMOVE SWITCH
jQuery(document).ready(function($){
$('.cts-listing-action-switch').remove()
});

mood_bad
  • No comments yet.
  • Add a review

    We are all in this together.

    We are all in this together.