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
[lgc_column grid="33" tablet_grid="33" mobile_grid="100"]First column content in here[/lgc_column] | |
[lgc_column grid="33" tablet_grid="33" mobile_grid="100"]Second column content in here[/lgc_column] | |
[lgc_column grid="33" tablet_grid="33" mobile_grid="100" last="true"]Third column content in here[/lgc_column] |
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
add_action( 'wp', 'tu_disable_cpt_elements' ); | |
function tu_disable_cpt_elements() { | |
if ( is_page() || 'product' == get_post_type() ) { | |
remove_action( 'generate_before_header', 'generate_top_bar', 5 ); | |
remove_action( 'generate_header', 'generate_construct_header' ); | |
add_filter( 'generate_show_title', '__return_false' ); | |
} | |
} |
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
if ( strpos( $content, '{{custom_field' ) !== false ) { | |
$data = preg_match_all('/{{custom_field="([^"]*)"}}/', $content, $matches); | |
foreach ( $matches[1] as $match ) { | |
if ( null !== get_post_meta( get_the_ID(), $match, true ) && '' !== get_post_meta( get_the_ID(), $match, true ) ) { | |
$search[] = '{{custom_field="' . $match . '"}}'; | |
$replace[] = get_post_meta( get_the_ID(), $match, true ); | |
} | |
} | |
} |
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
add_filter( 'generate_typography_google_fonts', 'tu_add_google_font_request' ); | |
function tu_add_google_font_request( $fonts ) { | |
return $fonts . '|Amatic+SC'; | |
} |
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
add_action( 'template_redirect','tu_add_elementor_filter', 999 ); | |
function tu_add_elementor_filter() { | |
if ( in_array( 'elementor-page elementor-page-' . get_the_ID(), get_body_class() ) ) { | |
add_filter( 'body_class', 'tu_add_elementor_classes' ); | |
add_filter( 'generate_show_title','__return_false' ); | |
} | |
} | |
function tu_add_elementor_classes( $classes ) { | |
$classes[] = 'full-width-content'; |
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
add_filter( 'body_class', 'tu_bb_full_width_class' ); | |
function tu_bb_full_width_class( $classes ) { | |
if ( class_exists( 'FLBuilderModel' ) && FLBuilderModel::is_builder_enabled() ) { | |
$classes[] = 'full-width-content'; | |
return $classes; | |
} | |
} |
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
add_filter('wp_get_attachment_image_attributes','tu_featured_image_alt', 10, 2); | |
function tu_featured_image_alt( $attr, $attachment ) { | |
remove_filter('wp_get_attachment_image_attributes','tu_featured_image_alt'); | |
$attr['alt'] = $attachment->post_title; | |
return $attr; | |
} |
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
if ( ! function_exists( 'generate_content_nav' ) ) : | |
/** | |
* Display navigation to next/previous pages when applicable | |
*/ | |
function generate_content_nav( $nav_id ) { | |
global $wp_query, $post; | |
// Don't print empty markup in archives if there's only one page. | |
if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) ) { |
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
add_action( 'after_setup_theme','tu_beta_tester' ); | |
function tu_beta_tester() { | |
add_filter( 'generate_premium_beta_tester','__return_true' ); | |
} |
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
add_action( 'after_setup_theme','tu_remove_gp_admin_menu' ); | |
function tu_remove_gp_admin_menu() { | |
remove_action('admin_menu', 'generate_create_menu'); | |
} |