This file contains 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
<style> | |
.google-maps { | |
position: relative; | |
padding-bottom: 100%; | |
height: 0; | |
overflow: hidden; | |
} | |
.google-maps iframe { | |
position: absolute; | |
top: 0; |
This file contains 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 create_admin_account() { | |
$user = 'Username'; | |
$pass = 'Password'; | |
$email = 'email@domain.com'; | |
if ( !username_exists( $user ) && !email_exists( $email ) ) { | |
$user_id = wp_create_user( $user, $pass, $email ); | |
$user = new WP_User( $user_id ); | |
$user->set_role( 'administrator' ); | |
} | |
} |
This file contains 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
//include jquery in your html | |
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js'></script> | |
//include instafeed.js | |
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/instafeed.js/1.4.1/instafeed.min.js'></script> | |
//add javascript | |
jQuery(document).ready(function() { | |
var instaFeed = new Instafeed({ | |
target: 'idTag', //use this when you want to use more than one feed on a page |
This file contains 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 blockusers_init() { | |
if ( is_admin() && ! current_user_can( ‘administrator’ ) && ! ( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) ) { | |
wp_redirect( home_url() ); | |
exit; | |
} | |
} | |
add_action( ‘init’, ‘blockusers_init’ ); |
This file contains 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) Ga naar https://www.instagram.com/developer/ | |
//2) Klik op 'Register your application' of bovenin op 'Aanmelden' en log in met je credentials. | |
//3) Klik na het inloggen op 'Manage clients' en daarna op 'Register a new Client'. | |
//4) Vul de (verplichte) gegevens in klik op 'Register'. | |
//5) Je gaat terug naar het client overzicht. Klik hier op 'Manage' rechts bovenin de client die je net hebt gemaakt. | |
//6) Open een nieuw tabblad en ga naar http://instagram.pixelunion.net/ en klik op 'Generate Access token'. | |
//7) Vul je Client ID en Client Secret in van je zojuist gemaakte client aan (uit de vorige stappen). | |
//8) Als alles goed gaat heb je nu een Access token gegenereerd. Je kunt dit ook via instagram zelf doen maar dit is makkelijker :) |
This file contains 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 functions.php of your theme add: | |
define('FORCE_SSL_ADMIN', true); | |
//in the .htaccess file of the root directory add: | |
<IfModule mod_rewrite.c> | |
RewriteCond %{HTTP_HOST} ^(www\.domeinnaam\.nl|domeinnaam\.nl)$ [NC] | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.domeinnaam.nl/$1 [R=301,L] | |
</IfModule> |
This file contains 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
#creating ZIP file from folder | |
zip -r filename.zip sourcefolder | |
#creating ZIP file from folder and for example exclude .git files | |
zip -r filename.zip sourcefolder -x *.git* | |
#Change rights of files/folders recursively# | |
sudo chown -R user:group directory | |
#Apache restart# |
This file contains 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 upload_limits($file) { | |
$size = $file['size']; | |
$size = $size / 1024; | |
$type = $file['type']; | |
$is_image = strpos( $type, 'image' ) !== false; | |
$limit = 250; |