Title: simne7's Replies | WordPress.org

---

# simne7

  [  ](https://wordpress.org/support/users/simne7/)

 *   [Profile](https://wordpress.org/support/users/simne7/)
 *   [Topics Started](https://wordpress.org/support/users/simne7/topics/)
 *   [Replies Created](https://wordpress.org/support/users/simne7/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/simne7/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/simne7/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/simne7/engagements/)
 *   [Favorites](https://wordpress.org/support/users/simne7/favorites/)

 Search replies:

## Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Secondary Title] quick edit displays wrong secondary title and wont update](https://wordpress.org/support/topic/quick-edit-displays-wrong-secondary-title-and-wont-update/)
 *  [simne7](https://wordpress.org/support/users/simne7/)
 * (@simne7)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/quick-edit-displays-wrong-secondary-title-and-wont-update/#post-6190283)
 * The problem was that clicking “update” in the quick-edit view triggers a re-creation
   of the row for page/post. Thus the handler gets killed. But if we use a delegated
   handler it works again
 *     ```
       /**
        * Scripts executed on post overview page.
        */
       if(jQuery(".edit-php").length > 0) {
       	jQuery('#the-list').on('click', 'a.editinline',	function() {
       			var postId = jQuery(this).parents("tr").attr("id").replace("post-", "");
       			// var secondaryTitle = jQuery(".my-secondary-title-quick-edit-label").clone();
       			setTimeout(
       				function() {
       					// jQuery("#edit-" + postId).find(".inline-edit-col label:first").after(secondaryTitle).show();
       							jQuery("#edit-" + postId).find(".my-secondary-title-quick-edit-label input").val(
       								jQuery('#post-' + postId).find('.secondary_title').text()
       					);
       				}, 50
       			);
       		}
       	);
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Secondary Title] quick edit displays wrong secondary title and wont update](https://wordpress.org/support/topic/quick-edit-displays-wrong-secondary-title-and-wont-update/)
 *  [simne7](https://wordpress.org/support/users/simne7/)
 * (@simne7)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/quick-edit-displays-wrong-secondary-title-and-wont-update/#post-6190282)
 * Hey,
    sorry, I’ve been quite busy. Hm, yes, I experience the same error under
   Firefox. I’ll have a look.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Secondary Title] quick edit displays wrong secondary title and wont update](https://wordpress.org/support/topic/quick-edit-displays-wrong-secondary-title-and-wont-update/)
 *  [simne7](https://wordpress.org/support/users/simne7/)
 * (@simne7)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/quick-edit-displays-wrong-secondary-title-and-wont-update/#post-6190248)
 * Hi,
    had the same problem. I fixed it for me locally and would really appreciate
   if you included it into your code.
 * hooks.php (add it)
 *     ```
       /**
       	 * Add a custom input field to the quick edit menu
       	 */
       	function secondary_title_quick_edit_custom_box($column_name, $post_type){
   
       		// return early for all columns not owned by us
       		if( $column_name !== 'secondary_title')
       			return;
   
       		// quite the same like secondary_title_overview_quick_edit() but class name differs
       		echo '<label class="my-secondary-title-quick-edit-label">';
       		echo '<span class="title">' . __("Sec. title", "secondary_title") . '</span>';
       		// no value here (will be inserted on click on a.editinline)
       		echo '<span class="input-text-wrap"><input type="text" name="secondary_title" value="" /></span>';
       		echo "</label>";
   
       	}
   
       	add_action('quick_edit_custom_box',  'secondary_title_quick_edit_custom_box', 10, 2);
       ```
   
 * admin.js (modify)
 *     ```
       /**
       		 * Add the "Sec. title" input field to the quick edit.
       		 */
       		jQuery('tr#inline-edit td .inline-edit-col-left > .inline-edit-col > label').eq(0).after(jQuery('.my-secondary-title-quick-edit-label'));
   
       		/**
       		 * Scripts executed on post overview page.
       		 */
       		if(jQuery(".edit-php").length > 0) {
       			jQuery("a.editinline").click(
       				function() {
       					var postId = jQuery(this).parents("tr").attr("id").replace("post-", "");
       					// var secondaryTitle = jQuery(".my-secondary-title-quick-edit-label").clone();
       					setTimeout(
       						function() {
       							// jQuery("#edit-" + postId).find(".inline-edit-col label:first").after(secondaryTitle).show();
       							jQuery("#edit-" + postId).find(".my-secondary-title-quick-edit-label input").val(
       								jQuery('#post-' + postId).find('.secondary_title').text()
       							);
       						}, 50
       					);
       				}
       			);
       		}
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)