Skip to content

Instantly share code, notes, and snippets.

View topmask's full-sized avatar
🤩
Out sick

Allen Smith topmask

🤩
Out sick
View GitHub Profile
@topmask
topmask / page-contact-form.php
Created October 19, 2021 08:03 — forked from tmblog/page-contact-form.php
Simple WordPress Contact Form without Plugin - Bootstrap ready.
<?php /* Template Name: Contact Page */
$response = "";
//function to generate response
function my_contact_form_generate_response($type, $message){
global $response;
if($type == "success") $response = "<div class='alert alert-success'>{$message}</div>";
else $response = "<div class='alert alert-danger'>{$message}</div>";
@topmask
topmask / _common.conf
Created October 15, 2021 00:06 — forked from Daniel15/_common.conf
WordPress config with WP Super Cache for Nginx
# /etc/nginx/snippets/wordpress/common.conf
index index.php;
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
}
# Block PHP files in uploads, content, and includes directory.
location ~* /(?:uploads|files|wp-content|wp-includes)/.*\.php$ {