The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
1answer
651 views

Adding Widget form fields dynamically

I am trying to add form field to a WordPress widget dynamically. So if the user want to add another date to an event they can click a button to get more fields. The question is: How do save newly ...
2
votes
1answer
2k views

Update Option Stored in Multi-Dimensional Array

I have data in the wp_options table currently stored as a multi-dimensional array (profile_element_order): ...
2
votes
1answer
146 views

update_option in javascript

So there's function in wordpress to update a named option/value pair to the options database table: <?php update_option( $option, $new_value ); ?>. And what I'm trying to do implement this ...
1
vote
1answer
94 views

Settings API - how to update multiple options manually?

I'm storing all my options using Settings API: function registerSettings() { register_setting('XX_theme_settings', 'XX_theme_settings', 'setting_validate' ); add_settings_section('theme_options', ...
1
vote
1answer
799 views

Why isn't get_option array contents displaying?

I've been to countless posts looking for the answer to this and have tried nearly every combination. So obviously, I'm missing a step so small that it's likely unfathomable to the Wordpress ...
1
vote
0answers
161 views

Multi-select field for Taxonomy can't save the value

I'm trying to create a multi select field for Taxonomy pages, and the problem is in saving all the selected values, for example if I choose couple of elements in the select field and save it, it will ...
1
vote
1answer
80 views

Insert/Update values to a table after blogname option etc. is updated

Im trying to update into another table the values blogname, blog description options when the user updated them from General Settings page. I use this code, $hook_array = ...
0
votes
1answer
230 views

Settings API - how to update options manually?

I'm storing all my options using Settings API: function registerSettings() { register_setting('XX_theme_settings', 'XX_theme_settings', 'setting_validate' ); add_settings_section('theme_options', ...
0
votes
1answer
123 views

Save wp_editor() content as option

I'm having some troubles with a extra feature i'm writing for my theme. The admin should be able to make some special posts, those posts are stored as an option. The options are atored as an array ...
0
votes
1answer
95 views

save new data to wp_options non-post form

I have a form on my front-page. It sends the entered address to Google API and returns the JSON to wp_options. That works fine. I am using update_option to do that, so it rewrites the meta_key each ...
0
votes
1answer
37 views

Update field in database for users

I have made a frontend form for the admins where they can check a checkbox for each user and submit the form data by post. For all the users that are checked, a value should be changed in a field in ...
0
votes
1answer
147 views

update_options and unique filenames

I was able to temporarily disable an automatic task of wordpress during a specific file type upload which is nice. For instance, I changed the usual upload path for the pdf uploads by doing this: ...
0
votes
2answers
181 views

[Multisite]How can I update custom blog option?

I wanted to update custom blog option created thru Settings Api using the function update_blog_option. I created this code. $country_base = get_blog_option($blog_id, 'mytheme_options');//retrieve ...
0
votes
2answers
624 views

update_option is not saving an array, but saving the string 'Array'

I have come across quite an odd problem when using the update_option function, and I am sure that I've tried everything I can think of to get it working, but unfortunately it isn't. I'm using AJAX to ...
0
votes
0answers
22 views

Excessive memory used by update_option()

I'm a newer WP developer trying to wrap his head around how to store information in the options table to support a plugin that I am writing. Unfortunately, trying to UPDATE the options table is making ...
0
votes
0answers
17 views

Save automatically data to user profile once or twice a day [duplicate]

The main goal : I am working on a panel which will display statistics of my user websites (external website). For that, I use the Google Analytics API. I save the Google Analytics profile number in a ...
0
votes
1answer
68 views

How do I setup nested repeatable option fields?

I'm trying to wrap my head around how to create a set of option fields that should be able to repeat for as many times as possible. But I'm having a hard time to figure out how to proceed. Currently ...
0
votes
0answers
61 views

update_option() updating the option with an empty value?

I have a call to update_option() inside a class which edits some keys from the options array passed to it and then saves the updated array to the database, I don't have any fancy code, the function is ...
0
votes
1answer
20 views

How to delete orphan userdata from array in wp-options

I have an option that subscribes members to forum email notifications. The list of emails is in an array as an option value. All is working fine and all subscribing and unsubscribing is done using ...
0
votes
0answers
37 views

Options not being deletd via ajax in wordpress

I have this fucntion which is called via Ajax to delete an option based on the name passed in. function uncheck_package(){ if(isset($_POST['element_value'])){ $element = ...
0
votes
1answer
50 views

Can I use add_option for a plugin categories and how?

So I am creating my first plugin for positioning ads around my site. I created one separate table where I store ads with all their options, such as position, expire date, active, name, type etc... But ...
0
votes
1answer
41 views

Plugin options page - save two related options as one entry

I created an options page for my plugin where the user can specify image dimensions which will be saved for later use. So far the image dimensions are entered by the user in one input field like ...
0
votes
2answers
87 views

update_option using variable name

Title may not be clear but I'm using update_option($my_option, $new_order); and for some reason it would not work but if instead I change to update_option('my-option-name' $new_order); it works. I ...
0
votes
3answers
252 views

Add Option if Not Exists

I need to see if an option, and if does, get the value. If not, I need to add it. The Codex provides: <?php $option_name = 'myhack_extraction_length' ; $new_value = '255' ; if ( get_option( ...
0
votes
2answers
47 views

How do I use update_option to give me a new option name each time a form is submitted? [duplicate]

How do I use update_option to give me a new option name each time a form is submitted? The code I'm using now overwrites the database value. Instead I need to have a new address saved each time. The ...
-1
votes
2answers
201 views

How to display update message only to admin

How can I show the update message only to super admin in the network wordpress ? I don't want the other admins/users see the update message that shows the current version. Is there any plugin to do ...
-1
votes
1answer
120 views

update_option onclick

I'm trying to add a update_option value when I click a text link. I came up with the following code, but I don't know how to make it "clickable", like <?php function ...