Skip to content

Instantly share code, notes, and snippets.

@zephyrmike
zephyrmike / gp-nav-effects
Created August 26, 2023 17:59
GeneratePress Navigation Effects
/* rising underline on hover */
@media (min-width: 769px) {
.main-navigation .main-nav ul li > a {
box-shadow: 0 -4px 0px #0088ff inset;
padding-bottom: 2px;
transition: all 300ms ease-in-out;
margin: 0 30px;
}
}
@Jehu
Jehu / image_sizes.php
Created February 8, 2022 16:07
WordPress - Additional Image Sizes
<?php
add_theme_support( 'post-thumbnails' );
add_image_size( 'image-480', 480, 0 );
add_image_size( 'image-640', 640, 0 );
add_image_size( 'image-720', 720, 0 );
add_image_size( 'image-960', 960, 0 );
add_image_size( 'image-1168', 1168, 0 );
add_image_size( 'image-1440', 1440, 0 );
add_image_size( 'image-1920', 1920, 0 );
@hostz-frank
hostz-frank / functions.php
Created May 21, 2018 18:03
Impressum-Link neben Datenschutz-Link auf der wp-login.php
/**
* Impressum-Link zum Privacy Policy Link auf Login-Seite hinzufügen (wp-login.php).
*/
add_filter( 'the_privacy_policy_link', function( $link, $privacy_policy_url ) {
return $link . '&nbsp; | &nbsp;<a href="/impressum/">Impressum</a>';
}, 10, 2 );
@seoagentur-hamburg
seoagentur-hamburg / .htaccess
Last active June 14, 2024 14:23
UPDATE 2024/03: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://seoagentur-hamburg.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@lukecav
lukecav / Advanced Options Settings (Improved)
Last active May 23, 2018 11:15
MainWP Dashboard - Advanced Options (Performance)
Cross IP Settings
Maximum simultaneous requests 0 Default: 4
Minimum delay between requests (milliseconds) 50 Default: 200
IP Settings
Maximum simultaneous requests per ip 0 Default: 1
Minimum delay between requests to the same ip (milliseconds) 100 Default: 1000
Frontend request Settings
Maximum simultaneous sync requests 24 Default: 8
@neverything
neverything / comopser-wp-cli.md
Last active December 7, 2021 07:42
Install composer and wp-cli on cyon.ch hostings with SSH access.

Cyon.ch/Hostpoint - Install composer & wp-cli

SSH into your server and stay in the home directory of the user. Check if you have a bin directory in your user directory already, in case you do, omit the mkdir bin.

Use bin folder in $HOME for user scriptsr

For the commands to be loaded from the bin directory run echo "export PATH=$HOME/bin:$PATH" >> ~/.bashrc. For the new config to be used run source ~/.bashrc or close and reopen your SSH session.

Composer

@spivurno
spivurno / gw-gravity-forms-manual-entries.php
Last active February 21, 2023 20:45
Gravity Wiz // Gravity Forms // Manual Entries
<?php
/**
* WARNING! THIS SNIPPET MAY BE OUTDATED.
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library:
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-manual-entries.php
*/
/**
* Gravity Wiz // Gravity Forms // Manual Entries
*
* Create entries manually for Gravity Forms. Adds an "Add New" button next to the page title on all entry-related pages.