Skip to content

Instantly share code, notes, and snippets.

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

Fabio Tielen codeagencybe

🏠
Working from home
View GitHub Profile
<?php
/*
* Code snippet to make login form with Fluent Forms WordPress Plugins
* Steps:
* 1. make a form with email and password (Make sure the name attribute is 'email' and 'password' for corresponding field)
* 2. Paste the shorcode in a page
* 3. Change the form id in the bellow code (23) with your created fluentform's form id and paste in your theme's functions.php file
* 4. That's it
*
@codeagencybe
codeagencybe / custom-hooks.php
Created February 7, 2020 08:56 — forked from djrmom/custom-hooks.php
facetwp show/hide labels
<?php
add_action( 'wp_footer', function() {
?>
<script>
(function($) {
if ('object' !== typeof FWP) {
return;
}
$(function() {
@codeagencybe
codeagencybe / functions.php
Created December 9, 2019 23:21 — forked from maddisondesigns/functions.php
WooCommerce Custom Fields for Simple & Variable Products
/*
* Add our Custom Fields to simple products
*/
function mytheme_woo_add_custom_fields() {
global $woocommerce, $post;
echo '<div class="options_group">';
// Text Field
@codeagencybe
codeagencybe / cloud-init.yaml
Created December 3, 2019 13:09 — forked from syntaqx/cloud-init.yaml
cloud init to install docker on ubuntu
#cloud-config
package_update: true
package_upgrade: true
package_reboot_if_required: true
manage-resolv-conf: true
resolv_conf:
nameservers:
- '8.8.8.8'
[options]
#
# WARNING:
# If you use the Odoo Database utility to change the master password be aware
# that the formatting of this file WILL be LOST! A copy of this file named
# /etc/odoo/openerp-server.conf.template has been made in case this happens
# Note that the copy does not have any first boot changes
#-----------------------------------------------------------------------------
# Odoo Server Config File - TurnKey Linux
@codeagencybe
codeagencybe / gist:92a7e2330e33cfde022b7749569d89d7
Created September 8, 2018 10:09 — forked from teodorboev/gist:c3f125c1fd8b2b829d99672c0d686362
Wordpress MySQL table converter to InnoDB
DROP PROCEDURE IF EXISTS convertToInnodb;
DELIMITER //
CREATE PROCEDURE convertToInnodb()
BEGIN
mainloop: LOOP
SELECT TABLE_NAME INTO @convertTable FROM information_schema.TABLES
WHERE `TABLE_SCHEMA` LIKE DATABASE()
AND `ENGINE` LIKE 'MyISAM' ORDER BY TABLE_NAME LIMIT 1;
IF @convertTable IS NULL THEN
LEAVE mainloop;
@codeagencybe
codeagencybe / wget.txt
Created May 2, 2018 11:50 — forked from suzannealdrich/wget.txt
wget spider cache warmer
wget --spider -o wget.log -e robots=off -r -l 5 -p -S --header="X-Bypass-Cache: 1" live-mysite.gotpantheon.com
# Options explained
# --spider: Crawl the site
# -o wget.log: Keep the log
# -e robots=off: Ignore robots.txt
# -r: specify recursive download
# -l 5: Depth to search. I.e 1 means 'crawl the homepages'.  2 means 'crawl the homepage and all pages it links to'...
# -p: get all images, etc. needed to display HTML page
# -S: print server response
@codeagencybe
codeagencybe / CSS
Created April 27, 2018 07:03 — forked from soldier99/CSS
Woocommerce sale flash badges: New, Featured and save percentage
/* Woocommerce regular Sale badge */
.woocommerce span.onsale {
left: 0;
top: -10;
font-weight: 600 !important;
min-width: 100px !important;
text-align: center;
}
.woocommerce ul.products li.product .onsale {
@codeagencybe
codeagencybe / text-changes.php
Created January 14, 2016 14:36 — forked from BurlesonBrad/text-changes.php
For Nikki ~ Change Text in WooCommerce
<?php
/**
* Plugin Name: Nikki Gets to Change Her Text
* Plugin URI: https://bradgriffin.me
* Description:
* Version: 1
* Author: Brad
* Author URI: https://bradgriffin.me
* Requires at least: 4.5
* Tested up to: 4.5