Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1285566

    I’d like to have the blog post entries show the image on the left and the text on the right rather than having the featured image above the text. How could I go about doing that?

    #1285567

    Hey Brendan!
    put the following code into the functions.php of your Child Theme and you’re able to use the Advanced Layout Builder not only on pages, but on your Blog Posts too.

    /*Use Advanced Builder on Posts*/
    add_theme_support('add_avia_builder_post_type_option');
    add_filter('avf_builder_boxes','enable_boxes_on_posts');
    function enable_boxes_on_posts($boxes) {
    	$boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('page','post', 'portfolio'), 'context'=>'normal', 'expandable'=>true );
    	$boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('page','post', 'portfolio'), 'context'=>'side', 'priority'=>'low');
    	$boxes[] = array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('page','post','portfolio'), 'context'=>'normal', 'priority'=>'high' );
    	
    	return $boxes;
    }
    
    function enfold_post_nav_settings($settings) {
    	if(is_singular('portfolio')) {
    	   $settings['is_fullwidth'] = false;
    	   $settings['skip_output'] = false;
    	}
    	return $settings;
    }
    add_filter('avf_post_nav_settings','enfold_post_nav_settings', 999, 1);
    
    /*Remove Tooltips in Masonry Gallery*/
    function add_custom_tooltip(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery('a').removeAttr('title');
    jQuery('img').removeAttr('title');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_tooltip');
    
    // add tag support to pages
    function tags_support_all() {
    register_taxonomy_for_object_type('post_tag', 'page');
    }
    
    // ensure all tags are included in queries
    function tags_support_query($wp_query) {
    if ($wp_query->get('tag')) $wp_query->set('post_type', 'any');
    }
    
    // tag hooks
    add_action('init', 'tags_support_all');
    add_action('pre_get_posts', 'tags_support_query');
    #1286564

    Thanks tribaleye13, I’ve added that code to the functions.php file. Is there a way to make the blog posts element reflect the look of a blog post made with the Advanced Layout Builder?

    #1287622

    Hi BrendanG,

    Sorry for the late reply. That is not possible unfortunately, you would need custom CSS for that. If you explain your intentions a bit further, then we might be able to help you out with that.

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.