WordPress.org

Ready to get started?Download WordPress

Forums

update_post_meta using Jeditable (1 post)

  1. hiphopinenglish
    Member
    Posted 10 months ago #

    I'm trying to allow users to edit a <div> using Jeditable.

    I have the editable <div> working fine, and all my Javascript options are set.

    I'm simply running into trouble with my save script. I would like to simply update a custom field (the only element in the editable div).

    In my save script, I know I should be using update_post_meta but I'm having some issues getting it to work. Are there other variables I need to set up before calling update_post_meta?

    Save script is currently a simple:

    $text = $_POST['editext'];
    	global $post;
    	$text = update_post_meta( $post->ID, '_cmb_editext_textarea' );
    	echo $text;

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 10 months ago by hiphopinenglish
  • This topic is not resolved
  • WordPress version: 3.6.1