I created a site with a Custom Content Type (Jet Engine) "Contact form" that is added from the front page. I need to display a dashboard widget (box) for this CCT in order to avoid having to enter to the CCT menu and checking if there is any new entry.
I can't find any related documentation for what I am trying to do. But I found how to add a new box into the dashboard from functions.php:
// Widget Contact Form
add_action( 'wp_dashboard_setup', 'custom_widget_contact_form' );
function custom_widget_contact_form() {
if ( current_user_can ( 'manage_options' ) ) {
wp_add_dashboard_widget (
'custom_contact_form_widget',
'Formularios de Contacto',
'custom_dashboard_contact_form'
);
}
}
if ( ! function_exists ( 'custom_dashboard_contact_form' ) ) {
function custom_dashboard_contact_form() {
?>
A shortcode? Pure PHP? what...
<?php
}
}
I don't know what to enter there. But I guess this is how I should start...