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
<?php | |
add_shortcode( 'shortcodename', 'display_custom_post_type' ); | |
function display_custom_post_type(){ | |
$args = array( | |
'post_type' => 'my-custom-post-type', | |
'post_status' => 'publish' | |
); | |
$string = ''; |
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
# Hide Backend | |
RewriteRule ^(/DIR/)?SLUG/?$ /DIR/wp-login.php [QSA,L] |
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 myOptions = { | |
... | |
scrollwheel: false | |
<?php if( wp_is_mobile() ) : ?> | |
,draggable: false | |
<?php endif; ?> | |
}; |
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 ($(this).scrollTop() > 135) { | |
$('#task_flyout').addClass('fixed'); | |
} else { | |
$('#task_flyout').removeClass('fixed'); | |
} | |
}); |
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
/* equivalent to li:nth-child(1) */ | |
.classname> li:first-child { | |
// your css code | |
} | |
/* equivalent to li:nth-child(2) */ | |
.classname> li:first-child + li { | |
// your css code |
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
define( 'WP_HTTP_BLOCK_EXTERNAL', TRUE ); |
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
/** | |
* Remove WP "Emoji" | |
* https://anythinggraphic.net/disable-emojis-in-wordpress-without-a-plugin | |
* | |
*/ | |
function iz_remove_emoji() { | |
// all actions related to emojis | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); |
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() { | |
/* https://coderwall.com/p/7mjjeg/check-if-touch-device */ | |
//Check Mobile Devices | |
var checkMobile = function(){ | |
//Check Device | |
var isTouch = ('ontouchstart' in document.documentElement); | |
//Check Device //All Touch Devices |
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
$("#help_icon").hover( | |
function () { | |
$("#msg_div").show(); | |
}, | |
function () { | |
$("#msg_div").hide(); | |
} | |
); |
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 taxonomies_redirect() { | |
if( is_tax('filter') ) { | |
wp_redirect( home_url('/fotouebersicht/'), 301 ); | |
exit; | |
} | |
} | |
add_action( 'template_redirect', 'taxonomies_redirect' ); | |
*/ |