-
AuthorPosts
-
July 1, 2015 at 10:08 pm #467256
Hi,
Please refer to the following link as the background for the question:
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,
July 3, 2015 at 1:42 pm #467979Hey 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,
AndyJuly 3, 2015 at 10:42 pm #468241Hi Andy,
Please use this account:
I am using the latest of everything. Please do check.
July 5, 2015 at 11:48 am #468528Hi!
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,
IsmaelJuly 14, 2015 at 2:23 am #472789HI 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
July 14, 2015 at 3:52 pm #473253Hi!
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!
IsmaelJuly 17, 2015 at 5:11 am #474678Hi 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: galleriesThis 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.
July 17, 2015 at 2:55 pm #474970Hi!
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,
JosueJuly 21, 2015 at 3:53 am #476277Hi 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
-
AuthorPosts
- The topic ‘Custom post type not showing in the Portfolio Grid or Masonry elements’ is closed to new replies.