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
function ws_register_images_field() { | |
register_rest_field( | |
'post', | |
'images', | |
array( | |
'get_callback' => 'ws_get_images_urls', | |
'update_callback' => null, | |
'schema' => null, | |
) | |
); |
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
/* | |
And a bit of CSS to show disabled Owl element: | |
.owl-carousel.off { | |
display: block; | |
} | |
*/ | |
$(function() { | |
var owl = $('.owl-carousel'), |
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, 'oldurl.com', 'newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'oldurl.com','newurl.com'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'oldurl.com', 'newurl.com'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl.com','newurl.com'); |
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
function disable_theme_update_notification( $value ) { | |
if ( isset( $value ) && is_object( $value ) ) { | |
unset( $value->response['themename'] ); | |
} | |
return $value; | |
} | |
add_filter( 'site_transient_update_themes', 'disable_theme_update_notification' ); |
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
In the same directory where you have package.json create an npm-shrinkwrap.json file with the following contents: | |
{ | |
"dependencies": { | |
"graceful-fs": { | |
"version": "4.2.2" | |
} | |
} | |
} |
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
function remove_parent($var) | |
{ | |
if ($var == 'current_page_parent' || $var == 'current-menu-item' || $var == 'current-page-ancestor') { return false; } | |
return true; | |
} | |
function tg_add_class_to_menu($classes) | |
{ | |
if (is_singular('projects')) | |
{ |
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="content"> | |
<h1>Sticky Footer with Flexbox</h1> | |
<p><button id="add">Add Content</button></p> | |
</div> | |
<footer class="footer"> | |
Footer | |
</footer> |
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="quote big" style="background-image: url('<?php echo wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) ); ?>');"> | |
</div> |
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
https://blog.logrocket.com/13-ways-to-vertical-center-in-2018-cb6e98ed8a40/ |
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
AOS.init({ | |
disable: function() { | |
var maxWidth = 992; | |
return window.innerWidth < maxWidth; | |
} | |
}); |
NewerOlder