wp_editor doesn’t work in front end area

You need to first define the $settings and the $editor_id and the $content variables. Then you can call wp_editor(). Something like this should work for you: // default settings $content=”This content gets loaded first.”; $editor_id = ‘my_frontend_editor’; $settings = array( ‘wpautop’ => true, // use wpautop? ‘media_buttons’ => true, // show insert/upload button(s) ‘textarea_name’ => … Read more

Front-End Editor email notification issue

I believe Front End Editor calls wp_update_post, which in turn calls wp_insert_post. You should be able to hook either save_post or wp_insert_post for new/updated posts, and edit_post or post_updated for updated posts.

Not redirecting upon front-end post submission

That’s beacuse you are calling wp_redirect after you have some buffer output from your code. you should change the order of the template functionally, meaning that first check if the form has been submitted and then show the page, so try something like this: <?php /* Template Name: Submit Work */ ?> <?php // Check … Read more

Listing registered scripts

There’s a global variable called $wp_scripts which is an instance of the WP_Scripts class. It doesn’t have a public API for looking at registered or enqueued scripts, but you can look inside the object and see what’s going on. You can see all the registered scripts with: global $wp_scripts; var_dump( $wp_scripts->registered ); To see the … Read more

Prevent empty Post Title on form submit via front end post (wp_insert_post_)

Simply put the wp_insert_post call inside your conditional check so its only called if the post title is not empty, something like this: if (empty($_POST[‘my_title’])){ echo ‘error: please insert a title’; } else { $title = $_POST[‘my_title’]; $new_post = array( ‘post_title’ => $title, ‘post_status’ => ‘publish’, ‘post_type’ => ‘post’); $pid = wp_insert_post($new_post); }

add_editor_style is not loading in frontend. Any solution?

Here is my solution: add_filter(‘the_editor_content’, “firmasite_tinymce_style”); function firmasite_tinymce_style($content) { add_editor_style(‘assets/css/custom.css’); // This is for front-end tinymce customization if ( ! is_admin() ) { global $editor_styles; $editor_styles = (array) $editor_styles; $stylesheet = (array) $stylesheet; $stylesheet[] = ‘assets/css/custom.css’; $editor_styles = array_merge( $editor_styles, $stylesheet ); } return $content; } Live Example: http://unsalkorkmaz.com/firmasite-social-buddypress-bbpress-theme-based-on-bootstrap/ Check comments wp_editor.. its loading bootstrap.css … Read more

Deleting users from front-end with wp_delete_user()

You could use AJAX to request a custom ‘action’ and send the users’ ID. Alternatively ‘post’ the action and user ID to the same page. They are both essentially the same thing, but the former doesn’t require the page to be reloaded. There are plenty of topics on this site that deal with AJAX, so … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)