WordPress

Logo & Link WordPress backend

tema/function.php

add_action("login_head", "my_login_head");
function my_login_head() {
	echo '
	<style>
	body.login #login h1 a {
		background: url("http://www.pools.it/wp-content/uploads/2015/12/pools-logo2.png") no-repeat scroll center top transparent;
		height: 120px;
		width: 300px;
	}
	</style>
	';
}

function loginpage_custom_link() {
	return 'http://www.pools.it';
}
add_filter('login_headerurl','loginpage_custom_link');

 

WordPress

WordPress Core

Accedere al core di WordPress è semplicissimo, basta includere il percorso assoluto del file wp-load.php

require( '../../../../wp-load.php' );

// controllo user loggato

if ( is_user_logged_in() ) {
    echo 'Welcome, registered user!';
} else {
    echo 'Welcome, visitor!';
}

 

Senza categoria

Breakpoint CSS mobile

/*IPHONE 4/5*/
@media only screen and (max-width : 320px) {

}


/*IPHONE 6*/

@media only screen and (max-width : 375px) and (min-width: 321px) {

}

/*	IPHONE 6 PLUS*/
@media only screen and (min-width: 414px) and (max-height: 736px){
	

}

 

javascript, jQuery

Smooth Scroll

<script type="text/javascript">
 jQuery(document).ready(function($) { 
 
 //EFFETTO MORBIDOSO
 
 $(function() {
 $('a[href*="#"]:not([href="#"])').click(function() {
 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
 var target = $(this.hash);
 target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
 if (target.length) {
 $('html, body').animate({
 scrollTop: target.offset().top-100
 }, 1000);
 return false;
 }
}
 });
});
 
 });
</script>
Senza categoria

configurazione VNC

sudo apt-get install –no-install-recommends ubuntu-desktop tightvncserver xfce4 xfce4-goodies
vncserver :1

// da eseguire sul terminale locale per attuare il tunnel ssh
ssh -L 5901:127.0.0.1:5901 -N -f -l root 51.254.143.69