Skip to content

Instantly share code, notes, and snippets.

View sazzadh's full-sized avatar
💚
Ready for New

Sazzad Hussain sazzadh

💚
Ready for New
View GitHub Profile
@sazzadh
sazzadh / woocommerce-create-order.md
Created August 15, 2020 09:42 — forked from stormwild/woocommerce-create-order.md
WooCommerce Creating Order Programmatically

WooCommerce Creating Order Programmatically

WooCommerce Create Order

creating Woocommerce order with line_item programatically

// http://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically
$address = array(
            'first_name' => 'Fresher',
@sazzadh
sazzadh / Typeing-Text.html
Last active July 20, 2020 07:02
Typeing Text
<div class="home_hero_typing_text" data-number="130">
<span class="txt-rotate" data-period="1000" data-rotate='["Speaker", "Entrepreneur", "Fire Starter", "STORYTELLER"]'></span>
</div>
<!--
data-number="130" is for control the speed
use Class .txt-rotate to add the typeing to a html tag
-->
{% assign f = current_site.find_form[section.settings.form] %}
{% if f %}
{% assign labelStyle = section.settings.style %}
{% if labelStyle == "label" %}
{% assign use_label = true %}
{% assign use_placeholder = false %}
{% else %}
{% assign use_label = false %}
{% assign v = current_site.find_video[section.settings.video] %}
{% assign v-Image = section.settings.image | image_picker_url: 'video.png' %}
{% assign v-Auto = section.settings.autoplay %}
{% assign v-Color = section.settings.video_color %}
{% assign v-EndEdit = section.settings.end_cta_edit %}
{% assign v-EndShow = section.settings.end_cta %}
{% assign v-EndOverlay = section.settings.end_background %}
{% assign v-EndText = section.settings.end_text %}
{% assign v-EndTextColor = section.settings.end_text_color %}
{% assign v-EndDismiss = section.settings.end_dismiss %}
{% assign kjb-select = 'heading' | settings_id: section: section %}
<style>
.pf4_{{ section.id }}{
color: {{section.settings.text_color}};
background-image:url( {{'section-9-arrow.png' | asset_url}});
background-image:url( {{section.settings.image | image_picker_url: 'section_1_img__1.jpg'}} );
}
</style>
@sazzadh
sazzadh / kajabi-countdown-section-example.liquid
Created May 5, 2019 08:37
Kajabi Countdown Timer Section Example
{% assign c-NumberColor = section.settings.number_color | default: "" %}
{% assign c-Style = '' %}
{% assign c-End = section.settings.countdown_end_time %}
{% assign c-Timezone = section.settings.countdown_timezone %}
{% assign c-Days = section.settings.days_text %}
{% assign c-Hours = section.settings.hours_text %}
{% assign c-Minutes = section.settings.minutes_text %}
{% assign c-Seconds = section.settings.seconds_text %}
<div class="countdown countdown--{{ c-Style }} countdown--sunset" id="countdown-timer" kjb-settings-id="{{ kjb-End }}" data-end-time="{{ c-End }}" data-timezone="{{ c-Timezone }}">
@sazzadh
sazzadh / wp-custom-user-role-with-custom-post-edit-ability.php
Created April 9, 2019 10:09
WP Custom user role with custom post type edit capability. Using this code we will be able to control a user to edit a post type only.
/*
Registering new Role
===============================================*/
function TallyFunctions_add_roles_on_plugin_activation() {
add_role( 'shop_helper', 'Shop Helper', array( 'read' => true, 'level_1' => true ) );
}
register_activation_hook( __FILE__, 'TallyFunctions_add_roles_on_plugin_activation' );
/*
@sazzadh
sazzadh / Disable_Gutenberg_Editor_for_custom_page_templates.php
Created March 16, 2019 13:10
Disable Gutenberg Editor for custom page templates
/**
* Disable Editor
*
**/
/**
* Templates and Page IDs without editor
*
*/
function ea_disable_editor( $id = false ) {
.pagenav{
display: block;
text-align: center;
padding-top:31px;
}
.pagenav .page-numbers{
padding: 6px 16px;
border: solid 1px rgba(255, 255, 255, 0);
display: inline-block;
text-decoration: none;