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 (event) { | |
var scroll = $(window).scrollTop(); | |
console.log( scroll ); | |
if( scroll > 100 ){ | |
// Run | |
}else{ | |
// Run | |
} | |
}); |
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 my_custom_login() { | |
echo '<link rel="stylesheet" type="text/css" href="' . get_bloginfo('stylesheet_directory') . '/css/custom-login.css" />'; | |
} | |
add_action('login_head', 'my_custom_login'); |
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 background */ | |
body.login { | |
background-image: url('home-bg.jpg'); | |
background-repeat: no-repeat; | |
background-attachment: fixed; | |
background-position: center; | |
} | |
/* Change login logo */ | |
.login h1 a { |
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
$category = get_the_category(); | |
$parent_cat = $category->category_parent; |
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
@media only screen and (min-width: 320px) { | |
} | |
@media only screen and (min-width: 480px) { | |
} | |
@media only screen and (min-width: 768px) { | |
} | |
@media only screen and (min-width: 1024px) { |
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
// O arquivo bp-custom deve estar localizado na pasta plugins | |
function antipole_remove_rich_text( $field_id = null ) { | |
if ( ! $field_id ) { | |
$field_id = bp_get_the_profile_field_id( '3' ); | |
} | |
$field = xprofile_get_field( $field_id ); | |
if ( $field ) { |
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_action('after_setup_theme', 'qwp_remove_admin_bar'); | |
function qwp_remove_admin_bar() { | |
if (!current_user_can('administrator') && !is_admin() || !is_user_logged_in()) | |
add_filter( 'show_admin_bar', '__return_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
//https://css-tricks.com/snippets/wordpress/remove-privateprotected-from-post-titles/ | |
function the_title_trim($title) { | |
$title = attribute_escape($title); | |
$findthese = array( | |
'#Protected:#', | |
'#Private:#' | |
); |
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 | |
echo bp_core_fetch_avatar( array( | |
'item_id' => bp_loggedin_user_id(), | |
'width' => 50, | |
'height' => 50, | |
'class' => 'avatar', | |
) | |
); | |
?> |
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
// $user_id is a global variable | |
$about = xprofile_get_field_data( 'About', $user_id); |