Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1308040

    Hi Support

    I’ve created a custom post type, and I try to display the results thanks to ALB Portfolio Grid or Masonry, but the entries aren’t displayed in the settings.

    I knew I can use such code

    /* to display advanced portfolio setting for gallery CPT */
    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', 'post', 'mycpt'), 'context'=>'normal', 'expandable'=>true );
    	$boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('portfolio', 'page', 'post', 'mycpt'), 'context'=>'side', 'priority'=>'low');
    	$boxes[] = array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('portfolio'), 'context'=>'normal', 'priority'=>'high' );
    		return $boxes; }

    But it doesn’t seem to work anymore. Is there a hook or a piece of code more suitable for the new versions of Enfold?
    Thanks and have a nice day

    #1308301

    Hey Ikyo,

    Thank you for the inquiry.

    Instead of the previous code, try to use the filter that we provided in the following thread.

    // https://kriesi.at/support/topic/custom-post-type-not-displaying-correctly/#post-1299723

    Make sure to define the name of the post type where you need to enable the advance layout builder.

    Best regards,
    Ismael

    #1308375

    Thank you for your quick and complete help.
    Nevertheless, I added the code in functions.php placed in my child theme.

    I have of course customized it, but I don’t get the expected effect.

    Did I forget something?
    Many thanks

    CPT

    #1308728

    Hi,

    The snippet that we recommended previously will only enable the advance settings for the post type. If you want to include the custom post type in the masonry or blog selection, you have to create a custom taxonomy for the custom post type and attach the terms or categories to your posts. You can then select the custom taxonomy to display the posts associated with it.

    You can also add this code in the functions.php file to make the public post types selectable but we do not recommend it.

    add_theme_support("add_avia_builder_post_type_option");
    

    Best regards,
    Ismael

    #1310103

    Thank you very much for your help always so precious Ismael !

    If anyone has the same problem, the following code should be added to the CPT code
    'taxonomies' => array( 'category' ),

    #1310337

    Hi,

    Great, I’m glad that Ismael could help you out, and thanks for sharing your solution. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

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