-
AuthorPosts
-
January 25, 2022 at 4:32 pm #1337105
Hi
We have the following code in our functions.php to enable the Advanced Layout Editor for The Events Calendar events:add_filter('avf_builder_boxes', 'add_builder_to_posttype'); function add_builder_to_posttype($metabox) { foreach($metabox as &$meta) { if($meta['id'] == 'avia_builder' || $meta['id'] == 'layout') { $meta['page'][] = 'tribe_events'; /*instead add the name of the custom post type here*/ } } return $metabox; }
Now we have the button “Advanced Layout-Editor” (Erweiterter Layout-Editor”), but then we cannot use the editor, it is not shown. What we have to do in addition for that we can use the Advanced Layout Editor for The Events Calendar events?
Thanks very much.
Best regards
MikeJanuary 25, 2022 at 4:42 pm #1337108Hey Mike,
Thanks for contacting us!
I just tested this on my local installation however it is working fine on my end. I attached a screenshot in private content field below :)
Regards,
YigitJanuary 25, 2022 at 4:50 pm #1337116Hi Yigit
At the moment, we use Enfold shortcodes without the Advanced Layout Editor, but the new events we like to use directly the Advanced Layout Editor ;-)
It is very special. I just created a user for you and there it works. But with my user it does not work… what can be the problem?
See the login below where it works. Perhaps you see, why with my user it does not work ;-)
Thanks very much.
Best regards
MikeJanuary 25, 2022 at 5:13 pm #1337120Hi,
I was able to create a private test event and it worked with my profile as you mentioned but I am not sure why it is not working on user. I see that you are using User Role Editor plugin. I am not sure if it is related but could you please try de-activating the plugin temporarily to check if that helps?
Regards,
YigitJanuary 25, 2022 at 8:23 pm #1337164Hi Yigit
I deactivated the User Role Editor plugin but it still did not work.
The special thing is, that we have 3 Administrator accounts, at 2 of them it works, at 1 it does not work ;-(
seeschwalbe –> here it works
yourchoice –> here it does not work
kriesi –> here it works as you saidAny other idea what the problem could be? ;-)
Best regards
MikeJanuary 26, 2022 at 5:03 am #1337203Hi Mike,
Thanks for the update.
Can we get access to the site using the other account? Please provide the info in the private field. We may have to deactivate the plugins temporarily while testing the site. Is that alright?
Best regards,
IsmaelJanuary 26, 2022 at 7:56 am #1337228Hi Ismael
Sure. You can find the login data in the private content section.
It’s ok, when you temporarily deactivate plugins.
Best regards
MikeJanuary 26, 2022 at 1:01 pm #1337266Hi,
It is hidden by inline CSS on your account. I think there is a plugin conflict but I did not try de-activating all active plugins. I attached a screenshot in private content field.
Please try de-activating all active plugins and activate them one by one to find the culprit. You can add following code to bottom of Functions.php file as a temporary solution
add_action('admin_head', 'ava_custom_admin_css_admin'); function ava_custom_admin_css_admin() { echo '<style> #avia_builder.hide-if-js { display: block !important; } </style>'; }
Best regards,
YigitJanuary 26, 2022 at 1:13 pm #1337275Hi Yigit
Very special because this is only hidden for one user …
But I will try with deactivating plugins… will inform you, which plugin makes this problems.
Best regards
MikeJanuary 26, 2022 at 1:17 pm #1337280Hi,
It seems to be related to “hide-if-js” class but I have no idea where it comes from. I hope you can find out by de-activating plugins.
We will keep the thread open and wait to hear from you :)
Best regards,
YigitJanuary 27, 2022 at 3:58 pm #1337549Hi Yigit
I didn’t try this out yet.
But perhaps, it could also be an Enfold Update problem? Because we find more and more problems, see also here:This only a possible hint…
Best regards
MikeJanuary 27, 2022 at 5:29 pm #1337565Hi Yigit
I went back to Enfold 4.8.8.1 but this probleme here is still there. So I will check out the plugins.
Best regards
MikeJanuary 28, 2022 at 9:12 am #1337635Hi Yigit
So, i tested it with deactivating plugins.
First I deactivated one by one or groups (i.e. all Contact Form 7 Plugins), then I deactivated ALL plugins except the The Events Calendar plugin (because this is needed for the events).
Unfortunately the Advanced Layout Builder still did not work for this one user.
Have you any other idea?
Or should I send you the content of functions.php of the Enfold Child theme?
Best regards
MikeJanuary 28, 2022 at 9:42 am #1337648i noted a different snippet on including a CPT to Advanced Layout Builder –
i can not test it here – i haven’t installed “The Events Calendar”try :
add_filter('avf_builder_boxes','enable_boxes_on_tribeevents'); function enable_boxes_on_tribeevents($boxes) { $boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('tribe_events'), 'context'=>'normal', 'expandable'=>true ); $boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('tribe_events'), 'context'=>'side', 'priority'=>'low'); return $boxes; }
________
Edit: it seem to be an older (deprecated) snippet – see docu on that:
https://kriesi.at/documentation/enfold/intro-to-layout-builder/#alb-for-any-post-type
i guess “YOUR CUSTOM POST NAME” is a bit confusing and i suppose that it is for tribe events: tribe_eventsJanuary 28, 2022 at 10:07 am #1337655Hi Guenni007
Thanks for your response. With your snippet it is the same as with my snippet.
With one administrator user it works, with the other administrator user it does not work ;-(
But thanks anyway.
Best regards
MikeJanuary 28, 2022 at 12:00 pm #1337689did you check the docu link?
January 28, 2022 at 12:22 pm #1337698Hi Guenni007
Yes I did it. Also with the new code snippet we have the same problem, one administrator sees the ALB stuff, the other one not… very strange this…
Cheers
MikeJanuary 31, 2022 at 10:37 am #1338007Hi,
As @Yigit observed, the display property of the avia-builder container is set to “none” when the other user is active. Adding the snippet that he provided above should override the inline css.
add_action('admin_head', 'ava_custom_admin_css_admin'); function ava_custom_admin_css_admin() { echo '<style> #avia_builder { display: block !important; } </style>'; }
Best regards,
IsmaelJanuary 31, 2022 at 9:29 pm #1338090Hi Ismael
Yeah, with your code, also the other administrator user can use the ALB for creating or editing events with The Events Calendar.
But my question is, WHY this happens… what you mean with “when the other use is active”? I only use one or the other user and no one else uses this two users…
Thanks vey much.
Best regards
MikeFebruary 1, 2022 at 5:54 am #1338139Hi,
WHY this happens…
We are not really sure why this is happening. It works fine on our end, so it might be due to a plugin or because of a custom modification. Adding the snippet above or overriding the inline styling should fix the issue.
Best regards,
IsmaelFebruary 1, 2022 at 9:01 am #1338160Hi Ismael
As we wrote further up, we deactivated all plugins and there was still the same problem.
But yes, with this snippet it is fixed, so you can close the issue.
Thanks very much.
Best regards
Mike -
AuthorPosts
- The topic ‘Advanded Layout Editor for The Events Calendar’ is closed to new replies.