I am Unable to access WP admin

The problem is not with the WP Admin, but as you are directed and you already is there, the plugin p3-profiler. If you have the cpanel access, just get into the wp-content/plugins/ folder and move the folder p3-profiler on step up (so that it would go to the wp-content/ folder, and out of the /plugins … Read more

Call another page in forms

WordPress has a generic handler to deal with all forms – admin-post.php. If you include a hidden field in your form called action, you can then hook in to a function of your choice with all the goodness of wordpress included. echo “<form action='”.get_admin_url().”admin-post.php’ method=’post’>”; echo “<input type=”hidden” name=”action” value=”submit-form” />”; echo “<input type=”hidden” name=”hide” … Read more

override function from my plugin [closed]

In WordPress ‘do_action’ is used to add an action hook in a plugin, which then can be used to hook our own function with plugin. Check Codex for more details: Hooks API WordPress To add your own function you will have to do the following: add_action(‘groups_screen_group_request_membership’, ‘your_function_callback’); function your_function_callback($id){ //here id can be used to … Read more

Exporting Custom Taxonomy in plugin

If you use admin_init no text should be output in the file unless you have some php notice. Edit: The following code should do. <?php /** * download_custom_taxonomy_csv_154304 */ add_action(‘admin_init’, ‘download_custom_taxonomy_csv_154304’); function download_custom_taxonomy_csv_154304 () { // Check for GET request if ( isset( $_GET[‘download_ct_csv’] ) ){ header(‘Content-type: text/csv’); header(‘Content-disposition: attachment;filename=myct.csv’); // Run here your code … Read more

Best practices for user registration with WordPress from an MVC background

The basic building block of WordPress templating is template tag, that is function echoing (the_*()) or returning (get_*()) specific information. It’s no that far off from other kinds of templating, the largest difference is that WP “context” is typically much larger, way less contained, and rarely controlled by developer directly much. Form workflows in WordPress … Read more

How to redirect to a page after the form is submitted

You can remove the else statement so that user will see the message and will be able to upload csv again or you can redirect using echo ‘<script>windows.location.href=”‘ . $url . ‘”</script>’; die; Edit $admin_services = add_menu_page( ‘Fee Schedule’, ‘Fee Schedule’, ‘administrator’, ‘pd- services’, ‘pd_services’ ); function pd_services() { ?> <div class=”wrap”> <form name=”csvupload” action=”” … Read more

Custom Template for wordpress cpt plugin

The file testimonial_archive.php is not a valid WP template if you don’t define a custom way to use that file. The expected name is cpt-archive.php, in your case astestimonial-archive.php. Also, instead of using file_exists, you should use locate_template() to take adventage of template hierarchy and compatibility with child and parent themes. add_filter(‘template_include’, ‘testimonial_archive’); function testimonial_archive( … Read more