Skip to content

Instantly share code, notes, and snippets.

View wichaksono's full-sized avatar
🤔
Coding Is Fun.. Right ?

Wakhid Wichaksono wichaksono

🤔
Coding Is Fun.. Right ?
View GitHub Profile
/*
Theme Name: Onphpid Themes
Theme URI: http://www.onphpid.com/
Author: onphpid atau tulis namamu
Author URI: http://www.onphpid.com/
Description: Belajar Membuat Theme WordPress untuk pemula
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: onphpid-theme
/* Comments */
.comment-container {
border-top:1px solid #ddd;
margin-top:40px;
}
h3#comments {
font-size:18px;
}
<?php
session_start();
require 'config.php';
if(isset($_POST['username']) && isset($_POST['password']))
{
$sql_check = "SELECT nama,
level_user,
id_user
FROM users
<?php
session_start();
require 'config.php';
/**
* Check POST request
*/
if (isset($_POST['username']) && isset($_POST['password'])) {
// SQL syntax to get username & password
$sql_check = "SELECT nama,
level_user,
<?php
session_start();
/**
* Config Harus disisipkan sebelum melakukan Pemanggilan/Edit/Delete data.
*/
require './../config.php';
/**
* Jika Tidak login atau sudah login tapi bukan sebagai admin
* maka akan dibawa kembali kehalaman login atau menuju halaman yang seharusnya.
<?php
/**
* tutorial membuat semi toko online
* @package https://www.onphpid.com/category/membuat-semi-toko-online
* @see : https://www.onphpid.com/langkah-awal-membuat-semi-toko-online-dengan-wordpress.html
*/
function onphpid_post_type()
{
// add post-type
register_post_type(
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Halaman Registrasi</title>
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/style.css" rel="stylesheet">
<?php
if (isset($_POST['nickname']) && $_POST['nickname']) {
// memasukan file koneksi ke database
require_once 'config.php';
// menyimpan variable yang dikirim Form
$nama = $_POST['nickname'];
$username = $_POST['username'];
$password = $_POST['password'];
$repassword = $_POST['repassword'];
@wichaksono
wichaksono / page-store.php
Created November 7, 2016 01:07
Bagian dari tutorial Membuat Semi Toko Online : Page Template
<?php
/**
* Template Name: Toko Ku
*/
get_header();
// wordpress wp query : https://codex.wordpress.org/Class_Reference/WP_Query
$args = array(
'posts_per_page' => 10,
@wichaksono
wichaksono / single-onphpid_products.php
Created November 8, 2016 01:32
bagian dari tutorial membuat semi toko online
<?php
/**
* template single untuk menampilkan product
*/
get_header();?>
<div id="primary" class="site-product">
<div id="product" role="main">
<?php while ( have_posts() ) : the_post();