Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #326133

    Hi,
    Enfold has the custom post type for “Portfolio Items”.
    I like to have another custom post type for “Gallery Items”.
    I installed the custom post type ui plugin that works fine to create posts. But I am not able the get pages with the Advanced Layout Editor as we get with “Portfolio Items”.
    Thank you for any help on this
    Peter

    #326930

    Hey Peter!

    Try adding this at the very end of your theme / child theme functions.php file:

    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('portfolio', page', 'NEW_POST_TYPE_SLUG'), 'context'=>'normal', 'expandable'=>true );
    	$boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('portfolio', page', 'NEW_POST_TYPE_SLUG'), 'context'=>'side', 'priority'=>'low');
    	$boxes[] = array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('portfolio', page', 'NEW_POST_TYPE_SLUG'), 'context'=>'normal', 'priority'=>'high' );
    	
    	return $boxes;
    }
    

    Replace NEW_POST_TYPE_SLUG by the slug of your gallery post type.

    Cheers!
    Josue

    #330384

    Hi Josue!

    I get a blank white page when i use this for the post type “galleries”:

    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(‘portfolio’, page’, ‘galleries’), ‘context’=>’normal’, ‘expandable’=>true );
    $boxes[] = array( ‘title’ =>__(‘Layout’,’avia_framework’ ), ‘id’=>’layout’, ‘page’=>array(‘portfolio’, page’, ‘galleries’), ‘context’=>’side’, ‘priority’=>’low’);
    $boxes[] = array( ‘title’ =>__(‘Additional Portfolio Settings’,’avia_framework’ ), ‘id’=>’preview’, ‘page’=>array(‘portfolio’, page’, ‘galleries’), ‘context’=>’normal’, ‘priority’=>’high’ );

    return $boxes;
    }

    Did I replace NEW_POST_TYPE_SLUG by the slug of the galleries post type as needed??

    Thanks for your help
    Peter

    • This reply was modified 10 years, 1 month ago by pegasso4444.
    #330388

    Hi Peter,

    Can you please create me a WordPress administrator account? post it here as a private reply.

    Regards,
    Josue

    #330421
    This reply has been marked as private.
    #330463

    Hi Peter,

    I’m unable to edit files via Dashboard (there is no Edit option in the menu), can you please hand us a temporary FTP account? post it here as a private reply.

    Regards,
    Josue

    #330471
    This reply has been marked as private.
    #330688

    Hey!

    It should work fine now, this is the code i used:

    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('portfolio', 'page', 'galleries'), 'context'=>'normal', 'expandable'=>true );
    	$boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('portfolio', 'page', 'galleries'), 'context'=>'side', 'priority'=>'low');
    	$boxes[] = array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('portfolio', 'page', 'galleries'), 'context'=>'normal', 'priority'=>'high' );
    	
    	return $boxes;
    }

    Regards,
    Josue

    #330729

    Hey Josue!
    Fantastic, it works perfect for the “galleries post type”.
    So i tried to get also a “projects post type” and I duplicated your code and replaced galleries with projects.
    But now this is no longer working, again I get a whitescreen as soon I add the code to functions.php.
    Do I miss something?
    Regards
    Peter

    • This reply was modified 10 years, 1 month ago by pegasso4444.
    #331015

    Hey Peter!

    Can you paste the exact code you are trying to use? use Pastebin or Gist.

    Best regards,
    Josue

    #331120

    Hey Josue!
    http://pastebin.com/AdxRL8Ta

    The editor is still activated if you need it.
    Thanks
    Peter

    #331181

    Hey Peter!

    Don’t duplicate the code, use only one, like this:

    // enable alb on projects
    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('portfolio', 'page', 'galleries', 'projects'), 'context'=>'normal', 'expandable'=>true );
    	$boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('portfolio', 'page', 'galleries', 'projects'), 'context'=>'side', 'priority'=>'low');
    	$boxes[] = array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('portfolio', 'page', 'galleries', 'projects'), 'context'=>'normal', 'priority'=>'high' );
    	
    	return $boxes;
    }

    Note the the array(‘portfolio’, ‘page’, ‘galleries’, ‘projects’) repeated three times.

    Regards,
    Josue

    #331383

    Hey Josue!

    Great – it works perfect now!!
    Special thank for your excellent support, I used AVADA and TOTAL before, but the support for ENFOLD is so much better – a class of it’s own…
    Cheers!
    Peter

    #331385

    Thanks for the kind words Peter :)

    Regards,
    Josue

    #332149

    HI Josue!
    Unfortunately there is an issue with the custom post types.
    http://pastebin.com/KyGeT8E9
    They work fine until the wordpress seo plugin is turned on.
    After that only the portfolio-items work.
    On all other post types the ALB will no longer function.
    This happens with any version even the new 3.0.1
    Regards
    Peter

    #332162

    Hi Peter!

    It’s not WordPress SEO (i disabled it and ALB was still bugged) the one causing the issue, try deactivating one by one.

    Regards,
    Josue

    #332204
    This reply has been marked as private.
    #332589

    Hey!

    ALB is still not working with WP SEO deactivated, it seems to be another problem. Try adding this line to your wp-config.php file:

    define( 'CONCATENATE_SCRIPTS', false );
    

    Cheers!
    Josue

    #332928

    Hey Josue
    I put define( ‘CONCATENATE_SCRIPTS’, false ); at the very end of wp-config, but ALB is still not working…
    Regards
    Peter

    #333037

    Hey Josue!
    I could find the problem – it’s the code!
    My code now:
    $boxes = array(
    array( ‘title’ =>__(‘Avia Layout Builder’,’avia_framework’ ), ‘id’=>’avia_builder’, ‘page’=>array(‘portfolio’,’page’,’post’,’artists’), ‘context’=>’normal’, ‘priority’=>’high’, ‘expandable’=>true ),
    array( ‘title’ =>__(‘Layout’,’avia_framework’ ), ‘id’=>’layout’, ‘page’=>array(‘portfolio’, ‘page’ , ‘post’,’artists’), ‘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’),
    );

    post was missing…
    Cheers
    Peter

    #333055

    Good catch, will keep that on mind for now on :)

    Regards,
    Josue

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