រចនាក្បាលគេហទំព័រ


មុន​នឹង​ចាប់​ផ្តើម​រចនា​​ក្បាល​គេហទំព័រ​ផ្កាឈូក​ស​ យើង​ចាំ​បាច់​ត្រូវ​បំបាត់​ចោល​នូវ​របារ​ពណ៌​ខ្មៅ​​របស់​ប្រព័ន្ធ​ WordPress នៅ​ផ្នែក​ខាង​លើគេ​បង្អស់​ជា​មុន​សិន​ ដោយ​បើក​ឯកសារ​ឈ្មោះ​ functions.php រួច​សរសេរ​បន្ថែម​កូដ​ដូច​ខាង​ក្រោម​នេះ ចូល​ទៅ​ក្នុង​ឯកសារ​នោះ​៖
function hide_admin_bar(){ return false; }
add_filter( 'show_admin_bar', 'hide_admin_bar' );

បន្ទាប់មកទៀត យើង​ត្រូវ​បើក​ឯកសារ header.php រួច​សរសេរ​កូដ​ដូច​ខាង​ក្រោម​នេះ នៅ​ក្នុង​នោះ​៖
<?php
/**
 * The header for our theme
 *
 * This is the template that displays all of the  section and everything up until 
* * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials * * @package Lotus_White */ ?> <!doctype html> <html <?php language_attributes(); ?>> <head> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <style> body{ background: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6nWafI2MsUFoSbT0G73JiaXFjg6krQWUrErHJnQHUqFWdIiReypXlzkz_AF_09uwLuaxkIGlvaA0RNzRVPCG98MiUTcU2yp-OV4210mgQKyFCTKMTNNsj7h2y_JL8IM5-5jGRzI2ZF80/s1600/ADB1.jpg"); } .region,.menu{ width:1300px; margin: 0 auto; } .site-header{ background:#EDB9AB; text-align:center; } .site-title a{ font:50px/1.5 Koulen,Oswald; color:white; text-decoration:none; text-shadow:0px 0px 0 rgb(231,231,231),1px 1px 0 rgb(216,216,216),2px 2px 0 rgb(202,202,202),3px 3px 0 rgb(187,187,187),4px 4px 0 rgb(173,173,173),5px 5px 0 rgb(158,158,158), 6px 6px 0 rgb(144,144,144),7px 7px 6px rgba(0,0,0,0.6),7px 7px 1px rgba(0,0,0,0.5),0px 0px 6px rgba(0,0,0,.2); } .site-description{ font:italic 22px/1.5 Nokora; color:white; } .header-outer{ display:grid; grid-template-columns:33% 33% auto; align-items: center; } .header-outer img{ height:150px; } @media only screen and (max-width : 768px) { .region{ width: 100%; margin: 0; } .header-outer{ grid-template-columns:100%; } } </style> <div id="page" class="site"> <div id="content" class="site-content">