dashboard widget form not submit mails

There are three issues I see in your code: Your form doesn’t have an action set. You should add it and set the value to admin-post.php. <form method=”POST” action=”<?php echo esc_url( admin_url( ‘admin-post.php’ ) ); ?>”> Because the function which processes the form and then sends the email is hooked to admin_post_submit_support_ticket (i.e. admin_post_<action>) and … Read more

Where does php code to load data go?

Thing is, the code can go to many places. For me, personally, is to develop own plugin and add code there. If you need to something execute at certain point, use add_action hook. From what you wrote, this question might be helpful: add_action hook for completely new post?

Create dashboard widget for custom theme support

Yes, you can link directly from the dashboard to files within a plugin or theme directory. There are PHP and WP functions you can use to make sure you’re targeting the correct directory: Themes: Let’s say you have example.com/wp-content/themes/wpse-theme/example.html, and “wpse-theme” is either the only theme, or the parent theme. You can link to this … Read more

Force Sidebar on Full Width page

I’m not certain this would work without seeing the theme but you could try something like this… Change… if ( $sidebar_layout === ‘sidebar-left’ && empty( $zerif_change_to_full_width ) ) { zerif_sidebar_trigger(); } To this… if ( $sidebar_layout === ‘sidebar-left’ && empty( $zerif_change_to_full_width ) || is_singular(‘post’)) { zerif_sidebar_trigger(); } This, in theory, would force the left sidebar … Read more

How to use Datatable with Ajax when creating plugin on WordPress?

Solution to my own problem: Enqueue your custom file.js and localize admin-ajax.php. index.php function script_enqueue() { // Register the JS file with a unique handle, file location, and an array of dependencies wp_register_script(“dt_csc”, plugin_dir_url(__FILE__). ‘js/cdt.js’, array(‘jquery’)); // localize the script to your domain name, so that you can reference the url to admin-ajax.php file easily … Read more