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
//career post | |
function create_job() { | |
register_post_type( 'job', | |
array( | |
'labels' => array( | |
'name' => __( 'Career' , 'softiconic'), | |
'singular_name' => __( 'Career' , 'softiconic'), | |
'add_new' => __('Add New Career', 'softiconic'), | |
'edit_item' => __('Edit Career', 'softiconic'), | |
'new_item' => __('New Career', 'softiconic'), |
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
var container = $('.filter-container'); | |
var elements = $('.filter-container > *'); | |
var buttons = $('.filter-buttons a'); | |
// set all elements active | |
elements.addClass('selected elements'); | |
// remove select all filter | |
$('.filter-buttons a.select-all').remove(); | |
buttons.click(function(){ | |
// set all elements inactive by first call |
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
.upload-btn-wrapper input[type=file] { | |
position: absolute; | |
font-size: 14px; | |
top: 0; | |
color: #141414; | |
right: 0; | |
} | |
input[type="file"]::-webkit-file-upload-button { | |
background: transparent; | |
border: 0; |
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
scrollBehavior (to, from, savedPosition) { | |
if (savedPosition) { | |
return savedPosition | |
} else { | |
return { x: 0, y: 0 } | |
} | |
} | |
or try, |
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
#map | |
{ | |
filter: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="g"><feColorMatrix type="matrix" values="0.3 0.3 0.3 0 0 0.3 0.3 0.3 0 0 0.3 0.3 0.3 0 0 0 0 0 1 0"/></filter></svg>#g'); | |
-webkit-filter: grayscale(100%); | |
filter: grayscale(100%); | |
filter: progid:DXImageTransform.Microsoft.BasicImage(grayScale=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
<script> | |
jQuery(document).ready(function($) { | |
$(document).on('submit_success', '#formsct', function() { | |
$submitted_form = $(this); | |
// $submitted_form.hide(); | |
$(".elementor-form-fields-wrapper").hide(); | |
$('.elementor-message-success').show(); // this is the sucess message that I created. | |
}); |
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
/** | |
* Change number of products that are displayed per page (shop page) | |
*/ | |
add_filter( 'loop_shop_per_page', 'new_loop_shop_per_page', 20 ); | |
function new_loop_shop_per_page( $cols ) { | |
// $cols contains the current number of products per page based on the value stored on Options –> Reading | |
// Return the number of products you wanna show per page. | |
$cols = 9; | |
return $cols; |
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
add_filter('woocommerce_default_catalog_orderby', 'misha_default_catalog_orderby'); | |
function misha_default_catalog_orderby($sort_by) | |
{ | |
return 'date'; | |
} |
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
add_filter('posts_clauses', 'order_by_stock_status'); | |
function order_by_stock_status($posts_clauses) { | |
global $wpdb; | |
if (is_woocommerce() && (is_shop() || is_product_category() || is_product_tag() || is_product_taxonomy())) { | |
$posts_clauses['join'] .= " INNER JOIN $wpdb->postmeta istockstatus ON ($wpdb->posts.ID = istockstatus.post_id) "; | |
$posts_clauses['orderby'] = " istockstatus.meta_value ASC, " . $posts_clauses['orderby']; | |
$posts_clauses['where'] = " AND istockstatus.meta_key = '_stock_status' AND istockstatus.meta_value <> '' " . $posts_clauses['where']; | |
} | |
return $posts_clauses; | |
} |