This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // do not include this line and enter the bottom code in your theme's functions.php file | |
/** | |
* Hiding the element based on the condition | |
* | |
* @author Chinmoy Paul | |
* @version 1.0 | |
*/ | |
class EmptyElement { | |
public function render_element( $extra_data ) { | |
echo ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //* do not include this line if you are adding into the functions.php file | |
/** | |
* Write the code in snippets plugin | |
*/ | |
add_filter( 'before_after_image_initial_offset', 'ou_change_before_after_image_initial_offset'); | |
function ou_change_before_after_image_initial_offset( $offset ) { | |
global $post; | |
if( ! is_a( $post, 'WP_Post') ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //* do not include this line | |
add_filter( 'gettext_woocommerce', 'ouwoo_translate_cart_text', 10, 3); | |
function ouwoo_translate_cart_text( $translated_text, $text, $domain ) { | |
switch( $translated_text ) { | |
case 'No products in the cart.' : | |
$translated_text = "Please add some products from our shop, so we can generate a quote for you."; | |
break; | |
} | |
return $translated_text; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //* do not include this line | |
add_filter( 'woocommerce_order_button_text', 'ouwoo_custom_place_order_text'); | |
function ouwoo_custom_place_order_text( $button_text ) { | |
$button_text = "ENTERYOURTEXT"; | |
return $button_text; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //* do not add this line | |
/** | |
* enter the code into the functions.php file | |
*/ | |
add_filter( "bricks/elements/heading/controls", 'bu_filter_heading_element_controls' ); | |
function bu_filter_heading_element_controls( $controls ) { | |
$controls['tag']['options']['custom'] = esc_html__('Custom'); |
OlderNewer