Skip to content

Instantly share code, notes, and snippets.

@ONEKENO
ONEKENO / polylang-langswitcher-shortcode.php
Last active April 20, 2022 15:24 — forked from nicomollet/polylang-langswitcher-shortcode.php
Polylang shortcode for lang switcher
<?php
/**
* Polylang Shortcode - https://wordpress.org/plugins/polylang/
* Add this code in your functions.php
* Put shortcode [polylang_langswitcher] to post/page for display flags inline-block
*
* @return string
*/
function custom_polylang_langswitcher() {
$output = '';
@ONEKENO
ONEKENO / hidetdo.js
Created December 6, 2019 09:08 — forked from arafathusayn/hidetdo.js
Hide Tidio Chat Branding (Old Theme). For new theme, check: https://gist.github.com/arafathusayn/663217f383b02017d20be6ba465959d4
function hideTdo() {
var timer = null;
var target = document.querySelectorAll('#tidio-chat iframe')[0];
if(!target || typeof target === 'undefined') {
if(timer !== null) {
clearTimeout(timer);
}
timer = setTimeout(hideTdo, 500);
return;
} else {
@ONEKENO
ONEKENO / functions.php
Created July 22, 2019 07:01 — forked from vielhuber/functions.php
#wordpress polylang disable language in frontend
<?php
if( !is_admin() && $pagenow != 'wp-login.php' && pll_current_language() == 'en' )
{
wp_redirect(site_url().'/de/');
die();
}
@ONEKENO
ONEKENO / letsencrypt.md
Last active June 1, 2019 14:45 — forked from justinatack/letsencrypt.md
Installing Let's Encrypt with Cerbot on Vultr & ServerPilot

Let's Encrypt

1.SSH as root into the server

ssh root@SERVER_IP_ADDRESS

2.Install Certbot (ถ้าเคย install แล้วข้ามขั้นนี้)

$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:certbot/certbot