Skip to content

Instantly share code, notes, and snippets.

@takien
takien / custom-login-logo.php
Created June 3, 2023 01:28
WordPress custom login Logo
<?php
function custom_loginlogo() {
echo '<style type="text/css">
.login h1 a {background-image: url('.wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'large', false )[0]
.') !important;
pointer-events: none;
background-size: contain;
height: 100px;
font-size: inherit;
width: auto;
# ...
#comet cache config, exclude wp-admin
location ~ ^/(?!(wp-admin)) {
etag on;
expires 7d;
if_modified_since before;
gzip on;
gzip_vary on;
@takien
takien / nginx.conf
Created August 18, 2025 03:36
Membuat RapidCache atau CometCache akses langsung ke file statis HTML
set $domain_dir parahitatour-com;
set $cache_path /wp-content/cache/rapid-cache/cache/https/$domain_dir;
location ~ ^(?<filename>/.+)/$ {
sub_filter '<!--headers' ' ';
sub_filter 'a:' '<!-- a:';
try_files $uri $uri/ $cache_path/$filename.html /index.php$args;
}
location = / {