Skip to content

Instantly share code, notes, and snippets.

.form-field {
margin-bottom: 10px;
}
.form-field label {
display:block;
}
.form-field .input,
.form-field textarea {
width: 100%;
}
@yeriepiscesa
yeriepiscesa / wp-img-url-to-featured-image.php
Created August 27, 2020 05:21
Insert WP Post Featured Image from URL
[md-form spacing="tight"]
[md-select label="Pilih Support" outlined="yes"]
[select_channel* service]
[/md-select]
[md-text label="Nama Lengkap" outlined="yes"]
[text* your-name]
[/md-text]
[md-text label="No WhatsApp" outlined="yes"]
[number* your-whatsapp]
[/md-text]
woo_checkout_first_name: your-name
woo_checkout_phone: whatsapp
woo_checkout_order_note: order-note
@yeriepiscesa
yeriepiscesa / shortcodes.html
Last active June 19, 2020 04:21
Shortcode for CF7 Send WA Quick Shop
Default Shortcode, menampilkan seluruh produk simple & variabel dan dikelompokan per kategori.
[cf7sendwa-quickshop]
Menampilkan text & category filter.
[cf7sendwa-quickshop filter="yes"]
Menampilkan produk dengan kategori hoodies. Untuk beberapa kategori gunakan koma sebagai pemisah. misal hoodies,tshirts
[cf7sendwa-quickshop category="hoodies"]
Menampilkan produk tertentu saja, gunakan product ID.
@yeriepiscesa
yeriepiscesa / functions.php
Last active July 23, 2020 07:52
Contact Form 7 Send to WhatsApp, integrasi pihak ketiga. https://solusipress.com/download/contact-form-7-send-to-whatsapp/
<?php
function solusipress_custom_wa_api_send( $data, $form_id ) {
/**
* Do something here
* $data contains this information:
[
'to_number' => 'the number you defined',
'message' => 'message content from mail tab template',
'cf7_inputs' => the_posted_data_array_from_cf7,
'to_number_2' => 'the number for autorespond',
post_type=post&posts_per_page=5&sp_related=yes
@yeriepiscesa
yeriepiscesa / code-block.php
Last active March 4, 2020 13:35
Post Carousel using Oxygen Builder - Kode dari tutorial https://solusipress.com/membuat-post-slider-pada-oxygen-builder-basic/
<link rel="stylesheet" href="<?php echo CT_FW_URI . '/vendor/unslider/unslider.css' ?>">
<script type="text/javascript" src="<?php echo CT_FW_URI . '/vendor/unslider/unslider-min.js' ?>"></script>
<script type="text/javascript">
(function($){
$( '.post-sliders .oxy-repeater-pages-wrap' ).remove();
<?php if( !is_admin() ): ?>
$( '.post-sliders' ).each( function(){
var the_html = $(this).html();
$(this).replaceWith( $( '<div class="the-sliders"><ul>' + the_html + '</ul></div>' ) );
});
@yeriepiscesa
yeriepiscesa / solusipress-contact-form-7-wa.php
Created March 3, 2020 16:47
Send Contact Form 7 to WhatsApp
<?php
class SP_Contact_Form_WA {
protected $ids = array();
protected $script_loaded = false;
protected $bodies = array();
protected $numbers = array();
public function __construct() {
add_shortcode( 'contact-form-7-wa', array( $this, 'render_contact_form' ) );
<?php
/* Display 2 columns post archive in GeneratePress theme */
class SolusiPress_Post_Grid {
protected $post_count = 0;
protected $valid_area = false;
public function __construct() {
add_action( 'wp_head', array( $this, 'custom_css' ) );