Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #912725

    How can I permanently add the avia layout builder to my custom post types? For exemple: I have a CPT names ‘infosheet’. I can add this to the arrays in line 11 and 12 of the avia-template-builder/config/meta.php in the Enfold-file, but after an update this will be overwritten.

    Thanks in advance!
    Ita

    #912733

    well a lot of custom post-types and portfolio entries are too custom post types can be activated.

    I have Events Manager installed and i can activate the alb by:

    add_filter('avf_builder_boxes','enable_boxes_on_events');
    function enable_boxes_on_events($boxes) {
    $boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('event'), 'context'=>'normal', 'expandable'=>true );
    $boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('event'), 'context'=>'side', 'priority'=>'low');
      return $boxes;
    }

    Look to the body class what kind of single you have : on my events there is : single-event – so for me the event is to activate
    the function name is anything you like but it is better to have something meaningful

    #912738

    Ah – by the way – for my events a few days ago i’m looking for a solution to have post navigation left/right (as on portfolio)
    it works from the beginning but to have only the same cat there has to be something special in functions.php

    we all new something like this in functions.php of child-theme:

    add_filter( 'avia_post_nav_settings', 'enfold_customization_same_cat' );
    function enfold_customization_same_cat( $s ) {
        $s['same_category'] = true;
      return $s;
    }

    but on portfolio case this category is set to taxonomy (which is portfolio-entries))
    maybe you like to have that for your custom-post-type too
    i found the solution for event to this:

    add_filter('avia_post_nav_settings', 'avia_post_nav_settings_mod');
    function avia_post_nav_settings_mod($settings)
    {
      if(is_singular('portfolio')) {
        $settings['taxonomy'] = 'portfolio_entries';
        $settings['same_category'] = true;}
      if(is_singular('event')) {
        $settings['taxonomy'] = 'event-categories';
        $settings['same_category'] = true;}
      return $settings;
    }

    so i think you have to find first your custom post-type ( event is mine) and the taxonomy you will find at the custom post type list (“category”)

    https://kriesi.at/support/topic/having-for-custom-post-type-event-the-avia-post-nav-too/#post-909664

    #912749

    Hi Guenter,

    Thank you very much for your solution! It’s works fine!!

    Have a really nice day!
    Ita

    #913089

    Hi Ita,

    Great, glad you got it working. Thanks @guenni007 for helping out :-)

    Best regards,
    Rikard

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