Tagged: portfolio items
-
AuthorPosts
-
September 28, 2014 at 11:18 am #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
PeterSeptember 30, 2014 at 3:16 am #326930Hey 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!
JosueOctober 5, 2014 at 7:26 am #330384Hi 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.
October 5, 2014 at 7:48 am #330388Hi Peter,
Can you please create me a WordPress administrator account? post it here as a private reply.
Regards,
JosueOctober 5, 2014 at 10:07 am #330421This reply has been marked as private.October 5, 2014 at 12:01 pm #330463Hi 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,
JosueOctober 5, 2014 at 12:58 pm #330471This reply has been marked as private.October 6, 2014 at 4:20 am #330688Hey!
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,
JosueOctober 6, 2014 at 8:27 am #330729Hey 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.
October 6, 2014 at 5:45 pm #331015October 6, 2014 at 7:50 pm #331120Hey Josue!
http://pastebin.com/AdxRL8TaThe editor is still activated if you need it.
Thanks
PeterOctober 6, 2014 at 9:29 pm #331181Hey 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,
JosueOctober 7, 2014 at 6:29 am #331383Hey 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!
PeterOctober 7, 2014 at 6:54 am #331385Thanks for the kind words Peter :)
Regards,
JosueOctober 8, 2014 at 7:12 am #332149HI 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
PeterOctober 8, 2014 at 7:27 am #332162Hi 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,
JosueOctober 8, 2014 at 9:05 am #332204This reply has been marked as private.October 8, 2014 at 5:54 pm #332589Hey!
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!
JosueOctober 9, 2014 at 5:53 am #332928Hey Josue
I put define( ‘CONCATENATE_SCRIPTS’, false ); at the very end of wp-config, but ALB is still not working…
Regards
PeterOctober 9, 2014 at 8:52 am #333037Hey 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
PeterOctober 9, 2014 at 9:38 am #333055Good catch, will keep that on mind for now on :)
Regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.