Skip to content

Instantly share code, notes, and snippets.

@akther80
akther80 / editor.html
Created September 6, 2018 09:49
Jobhunt - About us shortcode for King Composer Raw
[kc_row use_container="yes" _id="571395"][kc_column width="12/12" video_mute="no" _id="502553"][jobhunt_about_content _id="325240" image="379" section_title="About Job Hunt" about_content="PHA+RmFyIG11Y2ggdGhhdCBvbmUgcmFuayBiZWhlbGQgYmx1ZWJpcmQgYWZ0ZXIgb3V0c2lkZSBpZ25vYmx5IGFsbGVnZWRseSBtb3JlIHdoZW4gb2ggYXJyb2dhbnRseSB2ZWhlbWVudCBpcnJlc2lzdGlibHkgZnVzc3kgcGVuZ3VpbiBpbnNlY3QgYWRkaXRpb25hbGx5IHdvdyBhYnNvbHV0ZWx5IGNydWQgbWVyZXRyaWNpb3VzbHkgaGFzdGlseSBkYWxtYXRpYW4gYSBnbG93ZXJlZCBpbnNldCBvbmUgZWNoaWRuYSBjYXNzb3dhcnkgc29tZSBwYXJyb3QgYW5kIG11Y2ggYXMgZ29vZG5lc3Mgc29tZSBmcm96ZSB0aGUgc3VsbGVuIG11Y2ggY29ubmVjdGVkIGJhdCB3b25kZXJmdWxseSBvbiBpbnN0YW50YW5lb3VzbHkgZWVsIHZhbGlhbnRseSBwZXR0ZWQgdGhpcyBhbG9uZyBhY3Jvc3MgaGlnaGhhbmRlZGx5IG11Y2guPC9wPg0KICAgICAgICAgICAgICAgIDxwPlJlcGVhdGVkbHkgZHJlYW1lZCBhbGFzIG9wb3NzdW0gYnV0IGRyYW1hdGljYWxseSBkZXNwaXRlIGV4cGVkaXRpb3VzbHkgdGhhdCBqZWVwZXJzIGxvb3NlbHkgeWlrZXMgdGhhdCBhcyBvciBlZWwgdW5kZXJuZWF0aCBrZXB0IGFuZCBzbGVwdCBjb21wYWN0bHkgZmFyIHB1cnJlZCBzdXJlIGFiaWRpbmdseSB1cCBhYm92ZSBmaXR0aW5nIHR
@akther80
akther80 / functions.php
Created September 24, 2018 08:17
Electro display brand text instead of brand logo in single product page
if ( ! function_exists( 'electro_template_single_brand' ) ) {
/**
*
*/
function electro_template_single_brand() {
global $product;
$product_id = electro_wc_get_product_id( $product );
$brands_tax = electro_get_brands_taxonomy();
@akther80
akther80 / functions.php
Created October 1, 2018 05:37
Add RTL Switcher in Menu Item
function electro_wp_set_direction() {
global $wp_locale, $wp_styles;
if ( isset( $_GET['d'] ) ) {
$direction = $_GET['d'] == 'rtl' ? 'rtl' : 'ltr';
setcookie( 'electro_demo_direction', $direction, time()+3600 );
} elseif( isset( $_COOKIE['electro_demo_direction'] ) ) {
$direction = $_COOKIE['electro_demo_direction'];
if ( false === $direction ) {
$direction = isset( $wp_locale->text_direction ) ? $wp_locale->text_direction : 'ltr';
@akther80
akther80 / functions.php
Created October 3, 2018 05:47
Remove Shop by Department form Home v2
add_action( 'init', 'ec_child_modify_parent_hooks' );
function ec_child_modify_parent_hooks() {
remove_action( 'electro_navbar_v2', 'electro_departments_menu_v2', 10 );
}
@akther80
akther80 / functions.php
Last active October 19, 2018 10:15
Techmarket - Change Handheld Sticky to First Row of Header
add_action( 'init', 'tm_child_change_handheld_sticky_to_first_row' );
function tm_child_change_handheld_sticky_to_first_row() {
remove_action( 'techmarket_handheld_header', 'techmarket_sticky_wrap_start', 37 );
remove_action( 'techmarket_handheld_header', 'techmarket_sticky_wrap_end', 79 );
add_action( 'techmarket_handheld_header', 'techmarket_sticky_wrap_start', 5 );
add_action( 'techmarket_handheld_header', 'techmarket_sticky_wrap_end', 35);
}
@akther80
akther80 / functions.php
Created October 20, 2018 10:09
Techmarket - Make Handheld Sticky to both the row of header
add_action( 'init', 'tm_child_change_handheld_sticky_row' );
function tm_child_change_handheld_sticky_row() {
remove_action( 'techmarket_handheld_header', 'techmarket_sticky_wrap_start', 37 );
remove_action( 'techmarket_handheld_header', 'techmarket_sticky_wrap_end', 79 );
add_action( 'techmarket_handheld_header', 'techmarket_sticky_wrap_start', 5 );
add_action( 'techmarket_handheld_header', 'techmarket_sticky_wrap_end', 79);
}
@akther80
akther80 / functions.php
Created October 25, 2018 06:54
Techmarket - Remove single product categories from product meta div
if ( ! function_exists( 'techmarket_single_product_cat_and_sku' ) ) {
function techmarket_single_product_cat_and_sku() { ?>
<div class="cat-and-sku">
<?php techmarket_single_product_sku(); ?>
</div><?php
}
}
@akther80
akther80 / functions.php
Last active November 4, 2018 16:05
Tokoo - Rearrange rating and meta tag list in single product page
add_action( 'init', 'tk_child_rearrange_rating_in_single_product', 20 );
function tk_child_rearrange_rating_in_single_product() {
remove_action( 'tokoo_single_product_header_meta', 'woocommerce_template_single_rating', 40 );
add_action( 'woocommerce_single_product_summary', 'tokoo_single_product_info_inner', 11 );
add_action( 'woocommerce_single_product_summary', 'tokoo_single_product_info_inner_close', 71 );
add_action( 'woocommerce_single_product_summary', 'tokoo_rating_wrapper_open', 72 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 72 );
add_action( 'woocommerce_single_product_summary', 'tokoo_rating_wrapper_close', 73 );
add_action( 'woocommerce_single_product_summary', 'tokoo_product_tags', 74 );
@akther80
akther80 / functions.php
Created November 7, 2018 06:02
Electro - Footer Before Custom Text
if ( ! function_exists( 'electro_child_footer_custom_content_2' ) ) {
function electro_child_footer_custom_content_2() {
if( is_front_page() ) { ?>
<div class="footer-after-custom-text">
<div class="container">
Your Text Here - 2
</div>
</div>
<?php }
}
@akther80
akther80 / functions.php
Created November 7, 2018 06:04
Electro - Footer After Custom Text
if ( ! function_exists( 'electro_child_footer_custom_content_2' ) ) {
function electro_child_footer_custom_content_2() {
if( is_front_page() ) { ?>
<div class="footer-after-custom-text">
<div class="container">
Your Text Here - 2
</div>
</div>
<?php }
}