Tagged: , ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #467256

    Hi,

    Please refer to the following link as the background for the question:

    Procedure for adding CPT

    Everything was working fine, but now since the latest updates of the theme, I am no longer seeing the CPT in the box next to “Select Post Type” at the top. This is the case for both Portfolio and the Gallery elements in the layout builder. I have a CPT called galleries and there is code in the functions.php that enables use of CPT (see below):

    /* code to support displaying custom post types */
    add_theme_support('add_avia_builder_post_type_option');
    add_theme_support('avia_template_builder_custom_post_type_grid');
    
    /* 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', 'galleries'), 'context'=>'normal', 'expandable'=>true );
    	$boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('portfolio', 'page', 'post', 'galleries'), 'context'=>'side', 'priority'=>'low');
    	$boxes[] = array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('portfolio', 'galleries'), 'context'=>'normal', 'priority'=>'high' );
    		return $boxes;
    }

    the CPT used to be there and was visible. See Screen 4 in the above example. This CPT does not show up now. Don’t know what’s happened. Thank you for looking into it.

    Regards,

    #467979

    Hey Tameez!

    please post admin access, so we can take a closer look into the issue. Make sure to use newest theme and WordPress versions. Deactivate all plugins and check again.

    Best regards,
    Andy

    #468241

    Hi Andy,

    Please use this account:

    I am using the latest of everything. Please do check.

    #468528

    Hi!

    You can’t select other custom post types or taxonomies when using the Portfolio Grid element. For the gallery, you can only use images. Please try the blog posts element or the masonry element then select the cpt gallery taxonomies.

    Regards,
    Ismael

    #472789

    HI Ismael,

    I see what you’re saying, but the CPT is not showing up in the “Select Post Type” selection. If the CPT doesn’t show, I can’t select/filter content based on that. This is regardless of portfolio grid or masonry element. Take a look again and you’ll see.

    As I said this was working earlier and now it’s not.

    Regards,

    Tameez

    #473253

    Hi!

    Alright. The post type name is “gallery-items”, not “galleries”. Is that correct? What happens when you replace “galleries” with “gallery-items”?

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

    Cheers!
    Ismael

    #474678

    Hi Ismael,

    OK. Here’s more info on the CPT:

    The CPT plural name is: Galleries
    The CPT singular name is: Gallery
    The CPT slug is: galleries

    This is how they appear in Types plugin.

    I used the slug in the code above and it was working earlier. This is not working any longer since the latest updates.

    #474970

    Hi!

    I can recall this and i think it’s a problem with Types latest releases (they may have changed something on how post types get registered), try installing version 1.6.5 and check if the issue is fixed:
    https://wordpress.org/plugins/types/download/

    Best regards,
    Josue

    #476277

    Hi Josue,

    Thanks a lot. That worked fine when I went back to earlier version of Types. I don’t know what these guys have done but it messed up the CPT’s.

    Best Regards,

    Tameez

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Custom post type not showing in the Portfolio Grid or Masonry elements’ is closed to new replies.