Skip to content

Instantly share code, notes, and snippets.

View ahmedeshaan's full-sized avatar

Ahmed Eshaan ahmedeshaan

View GitHub Profile
[vc_row row_width="container"][vc_column el_class="css-faq-content"][vc_tta_accordion style="modern" shape="square" color="white" active_section="1" title="Retail"][vc_tta_section title="Why i will purchase Sink theme to build my project?" tab_id="1442728431553-60c1865d-4494"][vc_column_text]Minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim.[/vc_column_text][/vc_tta_section][vc_tta_section title="How to install or modify this theme?" tab_id="1442728431792-608d31d6-0884"][vc_column_text]Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et
<?php
/* Add Add to Cart After */
function support_flatsome_woocommerce_shop_loop_button(){
if(flatsome_option('add_to_cart_icon') !== "button") return;
global $product;
$lists = array();
<?php
// Logout without confirmation.
function iconic_bypass_logout_confirmation() {
global $wp;
if ( isset( $wp->query_vars['customer-logout'] ) ) {
wp_redirect( str_replace( '&', '&', wp_logout_url( wc_get_page_permalink( 'myaccount' ) ) ) );
exit;
}
}
add_action( 'template_redirect', 'iconic_bypass_logout_confirmation' );
@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE ***************/
}
/*GRAVUR*/
@font-face {font-family:"NK_Monotype Corsiva";src:url("../../../wp-content/themes/flatsome-child/fonts/NK_Mono.eot?") format("eot"),url("../../../wp-content/themes/flatsome-child/fonts/NK_Mono.woff") format("woff"),url("../../../wp-content/themes/flatsome-child/fonts/NK_Mono.ttf") format("truetype"),url("../../../wp-content/themes/flatsome-child/fonts/NK_Mono.svg#NK_MonotypeCorsiva") format("svg");font-weight:normal;font-style:normal;}
add_filter( 'wc_product_sku_enabled', '__return_false' );
function my_custom_translations( $strings ) {
$text = array(
'Related products' => 'Customers Also Viewed',
'Some other one you like to translate/change' => 'Translate/Change'
);
$strings = str_ireplace( array_keys( $text ), $text, $strings );
return $strings;
}
// [follow]
function my_shortcode_reorder_follow_icons($atts, $content = null) {
$sliderrandomid = rand();
extract(shortcode_atts(array(
'title' => '',
'style' => 'outline',
'align' => '',
'scale' => '',
'defaults' => '',
'twitter' => '',
function custom_flatsome_woocommerce_shop_loop_excerpt(){
if(!flatsome_option('short_description_in_grid')) return; ?>
<p class="box-excerpt is-small">
<?php /*echo get_the_excerpt();*/ ?>
<?php echo wp_trim_words( get_the_excerpt(), 10); ?>
</p>
<?php
}
add_action('flatsome_product_box_after', 'custom_flatsome_woocommerce_shop_loop_excerpt', 21);
function custom_flatsome_woocommerce_shop_loop_excerpt(){
if(!flatsome_option('short_description_in_grid')) return; ?>
<p class="box-excerpt is-small">
<?php /*echo get_the_excerpt();*/ ?>
<?php echo wp_trim_words( get_the_excerpt(), 10); ?>
</p>
<?php
}
add_action('flatsome_product_box_after', 'custom_flatsome_woocommerce_shop_loop_excerpt', 21);