Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #3740
      actiontwo
      Member

      I try to use ajax to update options in setting page which it use by Piklist. I used update_option function to update my field so it doesn’t work.

    • #3741
      Steve
      Keymaster

      @actiontwo– What are you trying to do? Are you hooking into the piklist_pre_update_option filter?

    • #3747
      actiontwo
      Member

      I use ajax to update some filed in setting page so this is my code

      $page_setting = get_option(‘page_info_setting’);
      $page_setting[‘video-views’] = $page_setting[‘video-views’] + 1;
      $result = update_option(‘page_info_setting’, $page_setting);
      $page_setting[‘result’] = $result;
      echo json_encode($page_setting);
      exit();

      so the $result is false when I try to update ‘video-views’ files

    • #3749
      Steve
      Keymaster

      @actiontwo– A few questions:

      1) Where are you placing this code?
      2) Does this line show any results: $page_setting[‘video-views’] = $page_setting[‘video-views’] + 1;

Viewing 3 reply threads
  • You must be logged in to reply to this topic.