Monday, July 13, 2015

Add Avia Advanced Layout Editor support for Custom Post Type

It took me awhile to find how to do this. All the other instructions I found did not work on the versions I have.
  • Avia Enfold Theme version: 3.2.1
  • The Events Calendar version 3.10.1 by Modern Tribe, Inc.(http://m.tri.be/1x)

 Add this to the function.php file in your /wp-content/themes/enfold-child folder

// Add Avia Advanced Layout Editor support for custom post type
add_filter('avf_builder_boxes','custom_post_types_options');
function custom_post_types_options($boxes)
{
$boxes = array(
array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('portfolio','page', 'post', 'tribe_events', 'tribe_organizer', 'te_announcements', 'tribe_venue'), 'context'=>'normal', 'priority'=>'high', 'expandable'=>true ),
array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('portfolio', 'page' , 'post', 'tribe_events', 'tribe_organizer', 'te_announcements', 'tribe_venue'), 'context'=>'side', 'priority'=>'low'),
array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('portfolio'), 'context'=>'normal', 'priority'=>'high' ),
array( 'title' =>__('Breadcrumb Hierarchy','avia_framework' ), 'id'=>'hierarchy', 'page'=>array('portfolio'), 'context'=>'side', 'priority'=>'low'),
);
return $boxes;
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.