PHP

Show File with PHP

<?php foreach ($files as $key => $value) { if($value!=’.’ AND $value!=’..’){ echo “<img src=’folder/”.$value.”‘ class=’img-responsive’>”; } } ?>

Remove Menu WP Admin

put it on your function.php theme add_action( ‘admin_menu’, ‘my_remove_menu_pages’ ); function my_remove_menu_pages() { remove_menu_page( ‘index.php’ ); //Dashboard remove_menu_page( ‘edit.php’ ); //Posts remove_menu_page( ‘upload.php’ ); //Media remove_menu_page( ‘edit.php?post_type=page’ ); //Pages remove_menu_page( ‘edit-comments.php’ ); //Comments remove_menu_page( ‘themes.php’ ); //Appearance remove_menu_page( ‘plugins.php’ ); //Plugins remove_menu_page( ‘users.php’ ); //Users remove_menu_page( ‘tools.php’ ); //Tools remove_menu_page( ‘options-general.php’ ); //Settings }

Woocommerce Cart

<a href=”<?php echo wc_get_cart_url(); ?>” title=”<?php _e( ‘View your shopping cart’ ); ?>”><?php echo sprintf ( _n( ‘%d item’, ‘%d items’, WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() ); ?> – <?php echo WC()->cart->get_cart_total(); ?></a>

mySQL Count Table

$result = mysqli_query($con,”SELECT COUNT(*) FROM TABLE WHERE FIELD LIKE ‘Domain%’;”); $data = mysqli_fetch_array($result); echo $data[0];

Auto Complete Search

<?php $cars = array(“facebook”, “google”); ?> <link rel=”stylesheet” href=”http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css”> <script src=”http://code.jquery.com/jquery-1.10.2.js”></script> <script src=”http://code.jquery.com/ui/1.11.4/jquery-ui.js”></script> <form id=”frm” method=”post”> <input id=”cartag” type=”text” name=”car”> </form> <script> $(function() { var availableTags = <?php echo json_encode($cars); ?>; $( “#cartag” ).autocomplete({ source: availableTags, select: function (e, ui) { if(ui.item.value==’facebook’){ window.location.href = “http://facebook.com”; } else if (ui.item.value==’google’){ window.location.href = “http://google.com”; } } }); …

Auto Complete Search Selengkapnya »

Maps with Marker

<!DOCTYPE html> <html> <head> <title>Add Marker to Map</title> <meta name=”viewport” content=”initial-scale=1.0, user-scalable=no”> <meta charset=”utf-8″> <style> html, body, #map-canvas { height: 90%; margin: 0px; padding: 0px } </style> <script src=”https://maps.googleapis.com/maps/api/js?v=3.exp”></script> <script src=”https://code.jquery.com/jquery-1.11.1.min.js”></script> <script> var map; function initialize() { var mapOptions = { zoom: 8, center: new google.maps.LatLng(1.288633, 103.837534) }; map = new google.maps.Map(document.getElementById(‘map-canvas’), mapOptions); } google.maps.event.addDomListener(window, …

Maps with Marker Selengkapnya »

Contact Form Inbox

<?php $errors = ”; $myemail = ‘me@hikmal.web.id’;//<—–Put Your email address here. if(empty($_POST[‘name’])){ $errors .= “n Error: all fields are required”; } $name = $_POST[‘name’]; $email = $_POST[‘email’]; $subject = $_POST[‘subject’]; $message = $_POST[‘message’]; if( empty($errors)){ $to = $myemail; $email_subject = “Contact form submission: $name”; $email_body = ” <html> <head></head> <body> <h2>Enquiry From $name</h2> <hr style=’width:100%’> …

Contact Form Inbox Selengkapnya »

×