Skip to content

Instantly share code, notes, and snippets.

View iqbalmauludy's full-sized avatar

Iqbal Mauludy iqbalmauludy

View GitHub Profile
@iqbalmauludy
iqbalmauludy / google-ads.php
Created December 20, 2017 12:55
Contoh sample kode dari Google Adsense
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-76782292xxxxxxxx",
enable_page_level_ads: true
});
</script>
@iqbalmauludy
iqbalmauludy / header-location.php
Created December 19, 2017 12:15
Gist sampel untuk artikel blog
<?php
header('Location: https://google.com'); // Manual atau dokumentasi dari http://php.net/manual/en/function.header.php
?>
<script>
function openNav() {
document.getElementById("myNav").style.height = "100%";
}
function closeNav() {
document.getElementById("myNav").style.height = "0%";
}
</script>
<div id="myNav" class="mobilemenu">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
<div class="mobilemenu-content">
<a href="#">Home</a>
<a href="#">Services</a>
<a href="#">Clients</a>
<a href="#">Contact</a>
</div>
</div>
@iqbalmauludy
iqbalmauludy / overlay-menu-1.html
Created June 23, 2017 17:17
Overlay Menu Lanjutan
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Overlay Menu</title>
<link rel="stylesheet" href="overlay-menu.css"> <!-- barisan baru yang ditambah agar dapat menampilkan css -->
</head>
<body>
body {
margin: 0;
font-family: 'Lato', sans-serif;
}
.mobilemenu {
height: 0%;
width: 100%;
position: fixed;
z-index: 1;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Overlay Menu</title>
</head>
<body>
</body>
</html>
@iqbalmauludy
iqbalmauludy / header.php
Created June 6, 2017 19:21
Untuk memanggil function agar menampilkan menu
<?php wp_nav_menu( array( 'theme_location' => 'new-menu' ) ); ?>
@iqbalmauludy
iqbalmauludy / function.php
Created June 6, 2017 19:20
penggunaan untuk lebih dari satu menu
function register_my_menus() {
register_nav_menus(
array(
'menu-baru' => __( 'New Menu' ),
'second-menu' => __( 'Second Menu' )
)
);
}
add_action( 'init', 'register_my_menus' );
@iqbalmauludy
iqbalmauludy / function.php
Created June 6, 2017 19:20
Penggunaan untuk satu menu
function register_my_menu() {
register_nav_menu('new-menu',__( 'New Menu' ));
}
add_action( 'init', 'register_my_menu' );