Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'bimber_custom_home_after_main_collection', function() {
- $vc_page_id = 981; //ID of your VC page
- $vc_page_id = apply_filters( 'bimber_home_vc_page_id', $vc_page_id );
- if ( ! $vc_page_id ) {
- return;
- }
- $vc_page_template = get_post_meta( $vc_page_id, '_wp_page_template', true );
- $template_name = ( 'g1-template-page-full.php' === $vc_page_template ) ? 'full' : 'with-sidebar';
- global $post;
- $orig_post = $post;
- $post = get_post( $vc_page_id );
- setup_postdata( $post );
- $quads_priority = function_exists( 'quads_get_load_priority' ) ? quads_get_load_priority() : 20;
- add_filter('the_content', 'bimber_disable_quads_content_ads', $quads_priority - 1 );
- // Load VC page related custom CSS.
- $vc_page_css = get_post_meta( $vc_page_id, '_wpb_shortcodes_custom_css', true );
- if ( ! empty( $vc_page_css ) ) {
- echo '<style type="text/css">';
- echo $vc_page_css;
- echo '</style>';
- }
- get_template_part( 'template-parts/home-static/' . $template_name );
- remove_filter('the_content', 'bimber_disable_quads_content_ads', $quads_priority - 1 );
- $post = $orig_post;
- wp_reset_postdata();
- });
Advertisement
Add Comment
Please, Sign In to add comment