I'm afraid that we didn't quite get what you want to achieve exactly? Can you explain to us in a little more detail, and send us a couple of screenshots?
I want my employees to be able to see the Amelia employee panel on the wp-admin dashboard - the same dashboard they already use for another custom app that we use on our wordpress site. I wish Amelia had a dashboard widget by default, but they are pretty easy to add. I crossed my fingers and used the shortcode, but that doesn't work in the backend. After some research, I think I just need to know the actual PHP function that is called by the employee panel shortcode.
If you can provide the name of the function, that would be super helpful - otherwise I am starting to go through all the Amelia code in hopes that I discover what it is :)
Unfortunately, currently, this feature is not built-in in Amelia. I will forward this to our developer for opinion to see if this is possible to achieve. As soon as I get the feedback from them I will contact you on this ticket.
Hi Marko - thanks so much for the quick reply. Unfortunately that code doesn't quite do it for me. It's possible I am not including something or placing it in an unexpected file... But as you can see from the screenshot, the "do_shortcode" function is not doing anything except echoing the string.
In my googling around, the do_shortcode function cannot be used on the admin side of WP and so that's why I was trying to find a direct call to the function.
If your developer has a tip on how to get shortcodes to work on the wp-admin dashboard, I'd appreciate it though.
We just got the feedback from our colleagues and they have told us that this is because we add shortcodes only if the page is not an admin page. That's why I have put add_shortcode call just before the do_shortcode call. I have tested this and the employee panel appeared as a widget. If it still doesn't work tell us which file are you adding the code to? (For testing I have put it in ameliabooking.php, but it shouldn't make a difference)
I had originally put that code snipet into my own custom plugin file. After moving the code, as you suggest, into ameliabooking.php I get the following error:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'register_my_dashboard_widget' not found or invalid function name in /home/customer/www/staging2.adhhardware.com/public_html/wp-includes/class-wp-hook.php on line 308
Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/staging2.adhhardware.com/public_html/wp-includes/class-wp-hook.php:308) in /home/customer/www/staging2.adhhardware.com/public_html/wp-admin/admin-header.php on line 9
I have tried the code at the bottom of the file, then inside the class, then near the top of the file after all the constants are defined, and finally I moved it to right after all the "use"s (i.e. line 40). No matter where I try to insert that code I always get the same error.
I had high hopes this time as you gave very specific instructions. But unfortunately I tried both solutions you proposed and neither way works. I think I am going to have to wait for the developer to add this option to the plugin...
If I add the code to my theme's functions.php I get the same Widget with just the code displayed (screen shot attached)
If I add the code to the ameliabooking.php as you instructed, I instead get the "headers already sent" error again:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'AmeliaBookingPlugin' not found in /home/customer/www/adhhardware.com/public_html/wp-includes/class-wp-hook.php on line 308
Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/adhhardware.com/public_html/wp-includes/class-wp-hook.php:308) in /home/customer/www/adhhardware.com/public_html/wp-admin/admin-header.php on line 9
I tried to attach the PHP files, but looks like this forum doesn't accept that file type.
We just got the feedback from our colleagues and they have told us that everything is fine they have tested it again. They have placed the code in "wp-content/mu-plugins/functions.php". Can you please try and place the code there instead of the theme?
How can I add Amelia to the WP-Admin Dashboard as a widget for my employees when they login?
Hello Mark,
I'm afraid that we didn't quite get what you want to achieve exactly? Can you explain to us in a little more detail, and send us a couple of screenshots?
We wish you all the best.
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
I want my employees to be able to see the Amelia employee panel on the wp-admin dashboard - the same dashboard they already use for another custom app that we use on our wordpress site. I wish Amelia had a dashboard widget by default, but they are pretty easy to add. I crossed my fingers and used the shortcode, but that doesn't work in the backend. After some research, I think I just need to know the actual PHP function that is called by the employee panel shortcode.
If you can provide the name of the function, that would be super helpful - otherwise I am starting to go through all the Amelia code in hopes that I discover what it is :)
I've gotten this far:
function custom_amelia_widget_content() {
$amelia = new CabinetEmployeeShortcodeService();
$amelia->shortcodehandler(['ameliaemployeepanel']);
}
Still trying to figure out the format for the $atts array that has to be passed into the function...
Hello Mark,
Unfortunately, currently, this feature is not built-in in Amelia. I will forward this to our developer for opinion to see if this is possible to achieve. As soon as I get the feedback from them I will contact you on this ticket.
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello Mark,
We just got the feedback from our colleagues and they have sent us this
You should probably also check if the user has wpamelia-provider role before adding the widget.
Hope this helps.
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Marko - thanks so much for the quick reply. Unfortunately that code doesn't quite do it for me. It's possible I am not including something or placing it in an unexpected file... But as you can see from the screenshot, the "do_shortcode" function is not doing anything except echoing the string.
In my googling around, the do_shortcode function cannot be used on the admin side of WP and so that's why I was trying to find a direct call to the function.
If your developer has a tip on how to get shortcodes to work on the wp-admin dashboard, I'd appreciate it though.
Attached files: notquite.png
Hello Mark,
We just got the feedback from our colleagues and they have told us that this is because we add shortcodes only if the page is not an admin page. That's why I have put add_shortcode call just before the do_shortcode call. I have tested this and the employee panel appeared as a widget. If it still doesn't work tell us which file are you adding the code to? (For testing I have put it in ameliabooking.php, but it shouldn't make a difference)
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Marko,
I had originally put that code snipet into my own custom plugin file. After moving the code, as you suggest, into ameliabooking.php I get the following error:
I have tried the code at the bottom of the file, then inside the class, then near the top of the file after all the constants are defined, and finally I moved it to right after all the "use"s (i.e. line 40). No matter where I try to insert that code I always get the same error.Attached files: ide_shot.png
Hello Mark,
We have forwarded your ticket to our developers and as soon as we get some feedback from them we will contact you.
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello Mark,
We just got the feedback from our colleagues and they have told us that
You can add it to ameliabooking.php by putting it into Plugin class at the end:
And calling it outside the class, at the end of the file:
You can also add it to the functions.php file of your theme ( the same code as before):
function register_my_dashboard_widget() { wp_add_dashboard_widget('my_dashboard_widget', 'Employee Panel', function () { add_shortcode('ameliaemployeepanel', array('AmeliaBooking\Infrastructure\WP\ShortcodeService\CabinetEmployeeShortcodeService', 'shortcodeHandler')); echo do_shortcode('[ameliaemployeepanel]'); } ); } add_action( 'wp_dashboard_setup', 'register_my_dashboard_widget' );
With both of these I get the widget in the dashboard:
(Logged into WordPress as amelia employee).
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Marko,
I had high hopes this time as you gave very specific instructions. But unfortunately I tried both solutions you proposed and neither way works. I think I am going to have to wait for the developer to add this option to the plugin...
If I add the code to my theme's functions.php I get the same Widget with just the code displayed (screen shot attached)
If I add the code to the ameliabooking.php as you instructed, I instead get the "headers already sent" error again:
I tried to attach the PHP files, but looks like this forum doesn't accept that file type.Attached files: amelia.png
Hello Mark,
We have forwarded your ticket to our developers again and as soon as we get some feedback from them we will contact you.
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello Mark,
Can you please tell us where is your functions.php file located so that we can reproduce the issue?
Looking forward to your reply.
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
It is in the theme's directory:
/wp-content/themes/Avada/
Hello Mark,
We have forwarded your ticket to our developers again and as soon as we get some feedback from them we will contact you.
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello Mark,
We just got the feedback from our colleagues and they have told us that everything is fine they have tested it again. They have placed the code in "wp-content/mu-plugins/functions.php". Can you please try and place the code there instead of the theme?
If you can not you can send us the admin access to WP and access to FTP.
Looking forward to your reply.
Kind Regards,
Marko Davidovic [email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables