Front end login form not working on live site

Do not use wp_login function it is deprecated , instead use wp_signon. wp_signon function returns WP_Error on failure so use it to evaluate condition as following. <?php if ( ‘POST’ == $_SERVER[‘REQUEST_METHOD’] && !empty( $_POST[‘action’] ) && $_POST[‘action’] == ‘log-in’ ) : $login = wp_signon( array( ‘user_login’ => $_POST[‘user-name’], ‘user_password’ => $_POST[‘password’], ‘remember’ => $_POST[‘remember-me’] … Read more

Multiple TinyMCEs breaking Distraction Free Writing

Don’t use meta boxes for TinyMCE. It has some kind of conflict with the DOM. Hook your code including wp_editor to edit_page_form action instead: add_action( ‘edit_page_form’, ‘my_second_editor’ ); function my_second_editor() { // get and set $content somehow… wp_editor( $content, ‘mysecondeditor’ ); } See Notes on wp_editor in the Codex.

insert link in wordpress editor greyout whole screen?

Looks like you need to update jQuery. You are running /*! jQuery v1.8.3 jquery.com | jquery.org/license */ and a very quick search of the error message text lead to this, posted five months ago– https://github.com/blueimp/jQuery-File-Upload/issues/1794–, and to the simple instructions “You need to upgrade to jquery-ui 1.9”. I would suggest updating your install as a … Read more

Calling a custom profile field only it it exists

On an “author” page you can get a lot of the information you need with get_queried_object and additional information with get_user_meta. What you want (sounds like) should be in that second chunk of information.That is… $author = $wp_query->get_queried_object(); $ameta = get_user_meta($author->ID); var_dump($author,$ameta); // debugging if(!empty($ameta[‘facebook’])) { var_dump($ameta[‘yim’]); // debugging } // and so one for … Read more

How to throw the “We need ftp info” at a user

simple function: protected function _cred_check(){ $aisis_file_system_structure = WP_Filesystem(); if($aisis_file_system_structure == false){ echo ‘<div class=”alert”><strog>NOTE!</strong> We need your ftp creds before we continue!</div>’; return true; } return false; } then do: if($this->_cred_check()){ request_filesystem_credentials(‘your/link/to/your/update/page’); }else{ // your update stuff }

Show infos only to the author in the author.php

You can check who the current user is and whether they have the same ID as the user that is being viewed. global $current_user wp_get_current_user(); if(the_author_meta(‘ID’) === $current_user->ID) : // Add your code here… endif; See these Codex pages for more information – wp_get_current_user() the_author_meta()

Canonicalization + Custom Post Types not working as expected

Think ive solved it and can’t believe what it was! On my rewrite rule I had: add_rewrite_rule( ‘custom-post-type/([0-9]+)/([^/]*)/?$’, ‘index.php?post_type=customposttype&p=$matches[1]’, ‘top’ ); Adding in and passing the post_name for the custom post type got it to start redirecting. add_rewrite_rule( ‘custom-post-type/([0-9]+)/([^/]*)/?$’, ‘index.php?post_type=customposttype&p=$matches[1]&customposttype=$matches[2]’, ‘top’ ); Anycase for now its late and it seems to have started working 🙂 … Read more