This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>My FB Reactions Page</title> | |
<style> | |
html { | |
box-sizing: border-box; | |
width: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* [list_searcheable_acf list all the custom fields we want to include in our search query] | |
* @return [array] [list of custom fields] | |
*/ | |
function list_searcheable_acf(){ | |
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF"); | |
return $list_searcheable_acf; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: WooCommerce Remove Billing Fields for Free Virtual Products | |
* Plugin URI: https://gist.github.com/BFTrick/7873168 | |
* Description: Remove the billing address fields for free virtual orders | |
* Author: Patrick Rauland | |
* Author URI: http://patrickrauland.com/ | |
* Version: 2.0 | |
* | |
* This program is free software: you can redistribute it and/or modify |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* this hook will be fired while you uploading a picture | |
*/ | |
add_filter( 'intermediate_image_sizes', 'misha_reduce_image_sizes' ); | |
function misha_reduce_image_sizes( $sizes ){ | |
/* | |
* $sizes - all image sizes array Array ( [0] => thumbnail [1] => medium [2] => large [3] => post-thumbnail ) | |
* get_post_type() to get post type | |
*/ |
If you have a slow import, or if you're running into a lot of server timeouts, then you can follow these steps to optimize your import.
Follow all of the steps listed here: http://www.wpallimport.com/documentation/troubleshooting/slow-imports/.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Redirect Postname permalinks to a custom permalink structured url in Wordpress | |
# How it works | |
It would check your post slug in Request url and would redirect all your Postname permalinks to | |
the blog's updated permalinks with Response 301 code. If you have changed your permalink | |
structure for your posts to something like: | |
🔗 Old permalink structure | |
/%postname%/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place this in wp-config | |
define( 'ACF_5_KEY', 'yourkeyhere' ); | |
// Set ACF 5 license key on theme activation. Stick in your functions.php or equivalent. | |
function auto_set_license_keys() { | |
if ( ! get_option( 'acf_pro_license' ) && defined( 'ACF_5_KEY' ) ) { | |
$save = array( | |
'key' => ACF_5_KEY, |
-
SSH into proxmox node and become root user. Run the following commands to download extra software dependencies we'll need.
apt update apt install -y libsasl2-modules
-
Enable 2FA for the gmail account that will be used by going to security settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'manage_edit-product_columns', 'add_custom_products_column',15 ); | |
function add_custom_products_column($columns){ | |
$columns['time_from_creation'] = __( 'Time from Creation'); | |
return $columns; | |
} | |
add_action( 'manage_product_posts_custom_column', 'output_time_from_creation', 10, 2 ); | |
function output_time_from_creation( $column, $post_id ) { | |
if ( $column == 'time_from_creation' ) { | |
$product = get_product($post_id); |
OlderNewer