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
$( document ).ready( function() { | |
/** Features Recent Posts Search Functionality **/ | |
$( '#__search_recent' ).keyup( function( event ) { | |
var search = $( this ).val().toUpperCase(); | |
$( '#features_archive .__recent_post_sub_container' ).each( function( index, el ) { | |
if( $( 'a', el ).text().toUpperCase().indexOf( search ) > -1 ) { | |
$( el ).show(); | |
// $(".__recent_post_sub_container:nth-of-type(11)").addClass('hide-post'); | |
// $(".__recent_post_sub_container:nth-of-type(12)").addClass('hide-post'); | |
$(".__recent_post_sub_container:nth-of-type(11)").removeClass('hide-post-hidden'); |
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
<div class="__select_field"> | |
<div class="__select"> | |
<p class="__selected" data-selected="all-locations">All Locations</p> | |
<div class="__select--list"> | |
<div> | |
<p data-value="all-locations">All Locations</p> | |
<p data-value="location-1">Location 1</p> | |
<p data-value="location-2">Location 2</p> | |
<p data-value="location-3">Location 3</p> | |
<p data-value="location-4">Location 4</p> |
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
if (!is_admin()) { | |
function defer_parsing_of_js($url) { | |
if (FALSE === strpos($url, '.js')) return $url; | |
if (strpos($url, 'jquery.js')) return $url; | |
return "$url' defer='defer"; | |
} | |
add_filter('clean_url', 'defer_parsing_of_js', 11, 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
UPDATE wp_options SET option_value = replace(option_value, 'https://livesite.com', 'http://localhost/sitename') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'https://livesite.com','http://localhost/sitename'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'https://livesite.com', 'http://localhost/sitename'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'https://livesite.com', 'http://localhost/sitename'); | |
UPDATE wp_usermeta SET meta_value = replace(meta_value, 'https://livesite.com', 'http://localhost/sitename'); |
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
easyweb-italia | |
4764fbb159e067e22458285444e844c313f26d6d |
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
$( window ).scroll( function() { | |
if ( $(window).scrollTop() <= 50 ) { | |
$( 'header' ).removeClass( 'sticky' ); | |
} else { | |
$( 'header' ).addClass( 'sticky' ); | |
} | |
} ); |
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 first and last button to the | |
* default pagination of wordpress | |
* | |
* Note: Don't forget to initialize your default | |
* query to limit your post in pre_get_post hook | |
* | |
* @var string $post_type name of your post type | |
* @var int $total_post number of total post to get the number of pagination | |
* @return void pagination |
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
jQuery( function( $ ) { | |
if( $( window ).width() > 750 ) { | |
autoHeight( '.__your_class' ); | |
} else { | |
$( '.__your_class' ).height( 'auto' ); | |
} | |
$( window ).resize( function() { | |
if( $( window ).width() > 750 ) { | |
autoHeight( '.__your_class' ); |
NewerOlder