Questions tagged [plugin-options]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
3answers
854 views

Save Plugin Version Number as Option?

I seem to recall seeing a tip somewhere saying that it was a best practice to save a plugin's version number as an option. I'm working through releasing a plugin, and I'm considering whether to do it, ...
3
votes
1answer
10k views

Save and retrieve custom plugin options value

I want to save the value of input data and retrieve it, I have gone through the tutorial of otto press. I'm new to creating WordPress plugin and what I can't understand is once I click the Save ...
2
votes
3answers
2k views

How to update selective options on plugin settings page

I write a wordpress plugin. My plugin has options. All options are in one group, 'pluginname-settings'. All option names are uniform and look like "pluginname-settings['option-name']". Some code to ...
2
votes
1answer
517 views

What is the correct form action URL for network options pages?

Referring to Settings API in Multisite - Missing update message It states that: For network option pages the correct form action URL is: wp-admin/network/edit.php?action=your_option_name ...
2
votes
2answers
393 views

Creating Admin Options Page where users can make changes to a theme

I need help to finish this last bit of php code. I'm trying to create an admin options page similar to in admin>settings>discussions like how a user can select an avatar, but instead of selecting an ...
2
votes
1answer
1k views

Using Checkboxes on Plugin Options Page for Custom Plugin

I am creating my first WordPress plugin. It is a simple plugin that extends Visual Composer allowing you to remove the element options in VC (shown in the screenshot). On the plugin "options" page I ...
1
vote
1answer
4k views

Serialize data for wp options

I am creating my first ever plugin, its purpose is to show a notice when some conditions are met, I created the function in jQuery and initially I had to manually edit the file everytime I wanted to ...
1
vote
2answers
96 views

Settings API - input always updates over validation

I am following a Wordpress book and am trying to create a plugin and have got an option page showing. In this page I have two text fields (which values are stored in one array). I am trying to add ...
1
vote
1answer
114 views

How to prevent options.php deleting valid existing data from the database

I am setting up a plugin and have used the setting API for the first time to create a form in settings. The data for the plugin is initially created by default when the plugin is activated and stored ...
1
vote
0answers
20 views

Addition of custom option panel crashes Media Library & Admin Area

So, I was carefully following the Wordpress Codex to create a Custom options panel for a custom post type.(https://codex.wordpress.org/Creating_Options_Pages) Specifically, Example 2. Everything was ...
1
vote
0answers
834 views

Create tabs in admin options page from custom post type loop

For a WordPress crm/password management plugin I am working on, I have created a custom post type called 'client'. I also have made a separate menu page for storing and showing the passwords of these ...
0
votes
1answer
89 views

Warn user that data may be lost for custom pages

When you edit a builtin field in Wordpress like the title and don't save the cahnges, and attempt to go to another link, a warning alert box comes up stating that "changes may be lost if you navigate ....
0
votes
1answer
54 views

CMB2 - array_search or in_array from repeat_group and comma separated values

I have this data coming from $myoptions = my_get_option('my_repeat_group'); $p = 'T1X 0L6'; // find me print_r($myoptions) = Array ( [0] => Array ( [region_name] => Alberta [postal_codes] =&...
0
votes
1answer
51 views

Create a select metabox that the user can pupolate?

I have been working on a plugin that uses text area metaboxes on an options page to populate drop downs in the CPT area. I was with the help of some others able to get the list to show in the select ...
0
votes
1answer
42 views

Theme options are they necessary

So I have decided to use wordpress for a site. But just as I begun I realized that I might need options. Things as simple as logo, favicon and possibly some parallax settings. Is it necessary to have ...
0
votes
1answer
990 views

How to retrieve the options from this options page?

I like to write a plugin with an options-page from the WordPress-Codex, but I cannot retrieve the options. get_option('your_option'); does not work. Here is the options page code: <?php class ...
0
votes
1answer
129 views

What could cause a WP Option to get truncated?

I have a WP plugin, where all admin setting field values were suddenly changed to the letter 'a'. All settings are stored in one 'big' option in the table. Seemed like the serialization gone wrong. I ...
0
votes
1answer
236 views

Is it possible to set a option, and then redirect to another page directly from a admin notice link?

I like to execute a update_options() and stuff and then redirect to another plugins page? Directly after the user clicks a link in a Admin notice. How would i do that? Ajax? Is that even possible?
0
votes
0answers
15 views

Dashboard Widget 0ptions with one too many options - how to unset/remove?

WP 5.1 Using code based on Codex Example Dashboard Widget I mistakenly renamed 'example_number' option as 'number'. I then renamed it as 'example_number'. I also have some other options as checkboxes ...
0
votes
1answer
54 views

Error: options page not found when I try to save the changes made in my settings page

I'm developing a plugin... everything was fine but suddenly when I try to save the plugin settings.. I found with the error that says the page options not found.. I was looking for some answer but ...
0
votes
0answers
27 views

How to add inputs dynamically in settings page (Plugin)

I have the following function in my plugin and want to add the Datepicker and Textarea dynamically, so that the User can add an row of the same Elements with an "Add" button. I have an array with ...
0
votes
2answers
974 views

How to get data from option page [closed]

https://codex.wordpress.org/index.php?title=Creating_Options_Pages&oldid=97268 This page shows how to create options pages. // theme-settings.php <?php add_action('...
0
votes
0answers
38 views

How to store multiple instances of the plugin's options for various shortcodes

I am so new in WordPress plugin development. I have a plugin options page that contains one text field and one button. So when a url is given to the text field and stored with the button, using a ...
0
votes
1answer
29 views

Populate Dropdwon with DIR files, save value and keep it “selected”

i have a dropdown list which gets populated by the content of a folder. When i save the page, the dropdown resets and does not show the selected image. Other options on the same page (color/text..) do ...
0
votes
1answer
55 views

Output checkbox per user and save in plugin options

I am looking for a way to save my list of checkboxes as an array within the settings_fields of the plugin. I currently have: <?php $WPusers = get_users( 'orderby=nicename&role=administrator'...
0
votes
1answer
25 views

Plugin options not appearing on options page using tabbed navigation

I've modified the plugin options page for my plugin to use tabs, using the existing WordPress system for this. However, The actual options are not appearing on the screen - just the tabs and the "Save ...
0
votes
1answer
713 views

Change custom post type slug from plugin options

I'd like to give users the option to change a custom post type slug in my plugin. Using this answer, I'm able to hardcode it into a function: Redeclare/Change Slug of a Plugin's Custom Post Type ...
0
votes
0answers
234 views

How To Add WordPress Style Toggle Boxes

How to add a WordPress style toggle box with custom text in a plugin. Here's a example of it from All in one SEO plugin:
0
votes
2answers
4k views

Export and import all Plugin options

Actually I am developing a new free plugin for Wordpress partially based on this plugin FrameWork: Sunrise framewok, each option's name will start like this: my_plugin_ So everytime i need to echo ...
0
votes
1answer
99 views

Include paths and functions for external scripts

I try load external script as plugin , the idea it´s use one easy plugin and call script and load this script into admin but i have problems with some configuration files and css files , in the case ...
-2
votes
1answer
379 views

When is it OK to create a custom table for a plugin? [duplicate]

A while ago I wrote a question asking about storing easily queryable data associated with a given attachment. The recommendation that I received at the time was that I should avoid using the WP ...