Skip to content

Instantly share code, notes, and snippets.

View Korveld's full-sized avatar
🏠
Working from home

Kirill Korveld

🏠
Working from home
View GitHub Profile
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@timstl
timstl / wpseo_remove_home_breadcrumb.php
Last active July 14, 2023 10:00
Remove "Home" link from Yoast WordPress SEO's breadcrumbs. Add to functions.php.
function wpseo_remove_home_breadcrumb($links)
{
if ($links[0]['url'] == get_home_url()) { array_shift($links); }
return $links;
}
add_filter('wpseo_breadcrumb_links', 'tg_remove_home_breadcrumb');
@michael-cannon
michael-cannon / tw_remove_menu_pages.php
Created September 25, 2013 16:00
Remove custom post type submenu pages.
<?php
function tw_remove_menu_pages() {
// remove testimonials menu section
// remove_menu_page( 'edit.php?post_type=testimonials-widget' );
// remove categories
remove_submenu_page( 'edit.php?post_type=testimonials-widget', 'edit-tags.php?taxonomy=category&amp;post_type=testimonials-widget' );
// remove tags
@fazlurr
fazlurr / WP_Query_Args.php
Last active March 18, 2024 23:14 — forked from billerickson/gist:3698476
WP_Query arguments list
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@hyamamoto
hyamamoto / string.hashcode.js
Created September 30, 2016 07:19
JavaScript Implementation of String.hashCode() .
/**
* Returns a hash code for a string.
* (Compatible to Java's String.hashCode())
*
* The hash code for a string object is computed as
* s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]
* using number arithmetic, where s[i] is the i th character
* of the given string, n is the length of the string,
* and ^ indicates exponentiation.
* (The hash value of the empty string is zero.)
@amboutwe
amboutwe / yoast_seo_opengraph_change_image_size.php
Last active January 11, 2024 20:48
Code snippet to change or remove OpenGraph output in Yoast SEO. There are multiple snippets in this code.
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Change size for Yoast SEO OpenGraph image for all content
* Credit: Yoast Development team
* Last Tested: May 19 2020 using Yoast SEO 14.1 on WordPress 5.4.1
* Accepts WordPress reserved image size names: 'thumb', 'thumbnail', 'medium', 'large', 'post-thumbnail'
* Accepts custom image size names: https://developer.wordpress.org/reference/functions/add_image_size/
*/
@artikus11
artikus11 / wp_security_setting
Last active April 6, 2024 11:59
Настройки для плагина All In One WP Security
{"aiowps_enable_debug":"1","aiowps_remove_wp_generator_meta_info":"1","aiowps_prevent_hotlinking":"1","aiowps_enable_login_lockdown":"1","aiowps_allow_unlock_requests":"","aiowps_max_login_attempts":3,"aiowps_retry_time_period":5,"aiowps_lockout_time_length":60,"aiowps_set_generic_login_msg":"","aiowps_enable_email_notify":"","aiowps_email_address":"info@wp.com","aiowps_enable_forced_logout":"","aiowps_logout_time_period":"60","aiowps_enable_invalid_username_lockdown":"","aiowps_instantly_lockout_specific_usernames":[],"aiowps_unlock_request_secret_key":"jt1dsnktfg9u67hi14b2","aiowps_lockdown_enable_whitelisting":"","aiowps_lockdown_allowed_ip_addresses":"176.99.12.40","aiowps_enable_whitelisting":"","aiowps_allowed_ip_addresses":"","aiowps_enable_login_captcha":"","aiowps_enable_custom_login_captcha":"","aiowps_enable_woo_login_captcha":"","aiowps_enable_woo_register_captcha":"","aiowps_captcha_secret_key":"sc2se0fbuzrcku9ol9bh","aiowps_enable_manual_registration_approval":"","aiowps_enable_registration_page
@amboutwe
amboutwe / yoast_seo_canonical_change_woocom_shop.php
Last active April 11, 2024 02:02
Code snippets for the Yoast SEO canonical output
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Change the canonical link for the shop page
* Credit: Scott Weiss of somethumb.com
* Yoast Doc: https://developer.yoast.com/features/seo-tags/canonical-urls/api/
* Last Tested: Jan 25 2017 using Yoast SEO 6.0 on WordPress 4.9.1
*/
add_filter( 'wpseo_canonical', 'yoast_seo_canonical_change_woocom_shop', 10, 1 );
@sivadass
sivadass / index.html
Last active August 8, 2023 08:41
PHP Mailer - Ajax Submission
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Ping</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<style>
@ndunk28
ndunk28 / slick-on-mobile.js
Last active March 10, 2022 18:31
slick js only on mobile
// slider
$slick_slider = $('.slider');
settings_slider = {
dots: false,
arrows: false
// more settings
}
slick_on_mobile( $slick_slider, settings_slider);
// slick on mobile