Skip to content

Instantly share code, notes, and snippets.

@lukecav
lukecav / Links
Last active June 14, 2021 02:05
Speed Up Your WordPress Site with These 3 Advanced Techniques Workshop - WordSesh 2021
@dkvadratu
dkvadratu / http_headers_security.htaccess
Last active June 17, 2024 15:44
{HTACCESS} HTTP headers for security in .htaccess file
# Check your website headers here: https://www.serpworx.com/check-security-headers/ or https://gf.dev/
# This configuration works for WP, WC on LiteSpeed server. Be careful. Test site after installing. All lines are explained are in serpworx.com tester.
# More docs:
# https://www.netsparker.com/whitepaper-http-security-headers/#XFrameOptionsHTTPHeader
# https://owasp.org/www-project-secure-headers/
# https://www.keycdn.com/blog/http-security-headers
# WordPress plugin for Headers setup https://wordpress.org/plugins/http-headers/
# Main security options in .htaccess file:
@DEBA1801
DEBA1801 / woocommerce-category-accordion.css
Last active March 26, 2024 08:46
WooCommerce | Accordion style child categories with custom toggle in the sidebar widget | Useful for a large number of categories
/* - woo cat toggling elements, injected via jQuery - */
/* make list item be relative, to be able to position toggle within this item, if desired */
#secondary .widget_product_categories ul.product-categories > li.cat-parent {
position: relative;
}
/* the new toggle element wrapper, which is added via jQuery */
#secondary .widget_product_categories ul.product-categories > li.cat-parent .woo-cat-toggle {
cursor: pointer;
float:right;
@premanshup
premanshup / functions.php
Last active January 8, 2020 14:12
Astra WordPress Theme Description <p> tag missing.
/**
* Archive Page Title
*/
if ( ! function_exists( 'astra_archive_page_info' ) ) {
/**
* Wrapper function for the_title()
*
* Displays title only if the page title bar is disabled.
*/
@sirchrispy
sirchrispy / wpms-genesis-network-menu.php
Last active March 16, 2021 08:57
WordPress MultiSite and Genesis: Display a Network-Wide Menu Raw
<?php
/*
* This code adds a network-wide menu in Genesis Header Right.
* It can be altered to be in any location your heart desires.
*
* For this code to work, your main site and all sub-sites need to meet the following conditions:
* 1) Register a menu with the same name on all themes used in network
* 2) Create a menu via the Appearance menu on main site and sub-sites and assign it to the same location
* 3) Leave the menu created in condition 2 blank on all sub-sites
@mightyx
mightyx / .htaccess
Created May 6, 2016 12:00 — forked from seoagentur-hamburg/.htaccess
Die optimale .htaccess-Datei für mehr Speed und Sicherheit
# ----------------------------------------------------------------------
# | Komprimierung und Caching |
# ----------------------------------------------------------------------
# Serve resources with far-future expires headers.
#
# (!) If you don't control versioning with filename-based
# cache busting, you should consider lowering the cache times
# to something like one week.
#
@seoagentur-hamburg
seoagentur-hamburg / .htaccess
Last active January 30, 2023 10:58
Die optimale .htaccess-Datei für mehr Speed und Sicherheit
# ----------------------------------------------------------------------
# | Komprimierung und Caching |
# ----------------------------------------------------------------------
# Serve resources with far-future expires headers.
#
# (!) If you don't control versioning with filename-based
# cache busting, you should consider lowering the cache times
# to something like one week.
#
@zottto
zottto / .htaccess
Last active December 7, 2018 11:20
Mehr Sicherheit in WordPress durch .htaccess
# Beispiel-Codeschnipsel für die WordPress-htaccess-Datei
# https://www.wp-sicherheit.info
# Marc Nilius, info@wp-sicherheit.info
# Mit Material von Zodiac1978, siehe auch https://gist.github.com/Zodiac1978/d25a8f3aebba7cd1c01c
#
# Diese Codeschnipsel gehören in die .htaccess-Datei im Hauptverzeichnis von WordPress
# Jeder einzelne Bestandteil kann einzeln kopiert und genutzt werden.
# Bitte die Verwendungshinweise (Kommentare) an jedem Schnipsel beachten
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/