Questions tagged [options]

In WP `options` is the term used for variables stored in the database. They are accessed through the options API.

Filter by
Sorted by
Tagged with
0
votes
1answer
39 views

What are Attributes used for in a Wordpress Multisite?

When you edit a Wordpress Multisite, there is this section of Attributes with multicheckboxes to select from, just curious what this actually does (if anything). I never needed to check "Public&...
0
votes
0answers
20 views

Creating an array from form inputs before it is posted to the options database

I am creating a plugin and I want to be able to have the user input a starting number and ending number from an options page. When they submit it I want to create an array of the numbers (example ...
0
votes
1answer
23 views

How do I make mysite.com/comingsoon WordPress to become my main website's WordPress?

I joined Bluehost and then I can create some WordPress, except if it is the button "Start Designing", I cannot make it the top level, root of the website. If I want to add to top level ...
0
votes
0answers
70 views

update_option() passing empty array() but still updating

I am reviewing some code in a custom plugin but I am not understanding how it could be working. All form fields are indexed by name="opm_settings[name]" At the top of the page inside the ...
0
votes
1answer
20 views

Which Hook can I use when creating unique post but not update/save/delete

I want to have a numerical counter for a CPT in a custom field a bit like a post ID but only for that custom post type, starting from 1. I've tried to start by setting a custom field value from an ...
0
votes
0answers
9 views

What hook do I need to save a setting?

I've added a new field onto the discussion's section on the /wp-admin/options-discussion.php page that outputs along with this: <?php do_settings_sections('discussion'); ?> How can I hook the ...
0
votes
1answer
20 views

Update a core option from plugin settings page

I'm trying to update a core WordPress option, image_default_link_type, from my plugin's settings page, but WordPress is refusing to update it. The options registered by the plugin itself are updated. ...
0
votes
1answer
47 views

Updating just one option with update_option

There are many options within an 'option' in the 'wp_options' table. This option, second_option, contains three parameters and consequently has three values. The values are, for example, as follows: {...
1
vote
1answer
25 views

Why slash is removed after domain?

I have installed different sites through my admin panel as below screenshot. But when I click any of the menus of My Sites it is redirected to the wrong URL like, https://www.example.comwp-admin/...
0
votes
0answers
7 views

Is it possible to have a global parameter page which allows to configure other plugins in the same place?

I have a wordpress mu installation which brings together several different sites for clients and I would like to provide them with a settings page to manage the settings of other plugins. In short, I ...
1
vote
0answers
15 views

Performance of several get_option() calls

I am currently working on my first WordPress plugin. To save and output certain settings I use the native Settings API. Now the question arises, how performant are several calls of the get_option() ...
0
votes
1answer
23 views

How to Change CSS Colors from Custom Plugin Settings Page

I have a custom WordPress plugin with a variety of settings that I use across multiple websites. I also use a few of the same 3rd party plugins across all of those pages. I would like to be able to ...
0
votes
1answer
13 views

Multiple checkbox doesn't work in wordpress settings api

I was creating a checkbox of roles n WordPress. I successfully generated them but the checked function doesn't seem to work. Also, it is throwing this warning. Warning: Illegal string offset '...
0
votes
0answers
184 views

Error: Options page not found in the allowed options list. After submission an OOP plugin

I am trying to develop an OOP base wordpress plugin. I am calling setting api from another class to menu class. while after submission showing "Error: Options page rashed_option_group not found ...
0
votes
1answer
35 views

Use alternative front page if cookie is set

By default, I present the user with the "Home" front page (set in "Settings / Reading / Homepage"). I have a duplicate page of this called "Alt Home", with some changed ...
0
votes
1answer
364 views

Wordpress error: Options page Setting_ not found in the allowed options list

I don't really know what to do now. :/ I tryed this: add_action( 'admin_init', 'Setting_' ); And this is my strings and form setup: function Setting_() { register_setting( 'options', '...
0
votes
0answers
116 views

How to make a pagination with dropdown selection?

This is the code for the dropdown pagination. It uses a js controller too, but it works fine, so, I’m not adding it. $total = $wp_query->max_num_pages; // only bother with the rest if we have more ...
0
votes
1answer
52 views

Update blog option during create new blog?

I have situation where I want to update blog blog options during creation of new blog. I want to update options like, home, default_comment_status, default_ping_status permalinks structure, etc ... So ...
0
votes
1answer
27 views

Checking if one of the post tags has options

I have some option in some of my wordpress tags and I'm trying to determine (in single.php) if one of those tags has options and if one of them (options) is equal to a specific value. This is what I ...
0
votes
1answer
20 views

Settings API: Setting default option via 'get_option' fails

All my options are stored in one array test_hs_options I have select list settings field ( test_hs_options['duration_months'] ) which stores the selected month (1-12). For this settings field, I would ...
0
votes
0answers
21 views

Retrieve repeater sub field (image) from an Options Page - ACF

I have a similar issue -- I made an ACF called Icon (post id is 348) and linked it to my Options Page called School Settings Inside of Icon, I have a field called School with a name (school_header) ...
0
votes
1answer
14 views

blog post not accesible on click [closed]

im just developing a web page with the gutenbiz theme and im changing a lot of the features through the elementor webpage builder, i have my blog page set as a blog but the post im editing them on the ...
0
votes
1answer
98 views

No more get_option('date_time') in Wordpress 5.5?

The template I'm using outputs the date of a post using: echo get_the_date( get_option( 'date_time' ) ); I was wondering why this output is now (after upgrade to WP 5.5) not working anymore? A fast ...
0
votes
1answer
95 views

In which format the data is stored in Wordpress Databases?

In lot of cases, I have seen the wordpress stores data in JSON like structure but not exactly JSON. For example, in usermeta table, this is the value (with meta key as wpkgbe_capabilities) a:1:{s:13:&...
-1
votes
2answers
19 views

selecting options from another form

Notice: wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version ...
0
votes
1answer
10 views

Is there a standard technique or API for getting the site header image?

There is this function: get_header_image() which can be called from within WordPress. Is there a way to access this externally, i.e. from the API? The use case might be a header for an external RSS ...
0
votes
1answer
29 views

Changing the CSS with a plugin

I'm trying to make a plugin that changes the CSS file. My client want to change the colors each season, and we want to make it foolproof so they won't break anything. I've managed to create the option ...
1
vote
2answers
46 views

Where does WordPress store plugin (enabled/disabled) status for multisite?

A recent update to one of the plugins I use broke my multisite blog and in the process of debugging it, all of the plugins got disabled. Now I have to try to figure out which plugins used to be ...
0
votes
0answers
12 views

custom options are saving values to settings page, but fields do not exist in options.php

I have added an option to a custom settings page with: add_settings_field( 'ev_mission_select', __( 'Mission:', 'wordpress' ), '...
0
votes
0answers
27 views

How to submit the settings api data by ajax on theme options page

Instead of reloading i need to submit the data by ajax. it is because theme options having customized tab sections and all the fields are in array in a single field of settings api. //Displaying and ...
0
votes
1answer
38 views

Upload file on pre_update_option_{option_name}

is there a way to upload a file while saving options in WP ? I have this option setting (save is binded to options.php) and need to upload and store a file on server and cannot find the file in ...
0
votes
2answers
135 views

How to save custom settings api fields with custom section fuction

I am creating wordpress theme on a single options page. I have customized the default do_settings_fields and do_settings_sections functions. my fields are displaying fine but when i am trying to save ...
1
vote
3answers
636 views

Huge wp_options table

I have a problem on a WP site. Website crashes because there is no more available disk space. Searching, i detect that wp_options table size is 12GB, but only have 1100 rows aprox: Any ideas? Thanks ...
2
votes
1answer
86 views

Setting 'autoload' to 'no' with Settings API

I've looked at the Settings API codex page, https://codex.wordpress.org/Settings_API, and I can't find anything related to setting autoload to no for any options using the Settings API. Is there any ...
0
votes
0answers
20 views

Help to create the best plugin settings!

Can you help me about how to create the best WordPress settings for plugins? I have a custom setting page and I need to create some field with WordPress API. Actually I use this solution: https://gist....
0
votes
1answer
14 views

Move website from root to sub

What am I trying to do exactly ? Move my WP website available at example.com to example.com/subdir but I don't want to make it available on example.com Why would I want to do such a thing ? I want an &...
2
votes
1answer
148 views

How to update_site_option for specific site within network?

I would like to add or update site options (like those shown in the screenshot) using update_site_option, but I have no idea (1) how to choose the correct site by its id? And where do I find the ...
1
vote
6answers
802 views

WordPress automatically created files like .theme-name / .plugin-name.php [closed]

I noticed that in every single folder of my wordpress there's a file called .theme-name.php. For example, in the theme folder twentynineteen.php there is this file called .twentynineteen.php This is ...
0
votes
0answers
41 views

WordPress Settings API Overrides My Previous Value

I have created the following custom menu page to save some data, I've included some repeatable fields inside the form. The problem that I have is that every time I click the submit button it overrides ...
0
votes
1answer
31 views

What structure and database storage method should I use for temporary storage that may be written concurrently?

In working with a third-party API, I need to store some state information to help track a process. I'm wondering where and how I should store it. Specifically, I have a multi-page Gravity Form, and ...
0
votes
2answers
33 views

Multiple Address In WP-Option Value

I've tried to setup my wordpress using 1 domain name and 1 ip address, after this, all the css is missing, but the site still can be accessible using both domain and ip address. Then I tried to ...
0
votes
0answers
18 views

Post settings meta widget in the frontend

I'm using Wordpress 5.4.1 with the MasterStudy LMS Theme/Plugin and the "Groups" plugin (https://wordpress.org/plugins/groups/) With the Masterstudy plugin I can create courses from a frontend page, ...
0
votes
0answers
36 views

Form input values are empty after submit

I'm trying to build a settings page for my WordPress theme. I have created the following form which includes repeatable input fields. Everything is working except when I submit the form and refresh ...
0
votes
0answers
14 views

Make regular pages appear like Homepage with “your latest posts”?

I want to have what would appear if I chose "homepage display to: Your latest posts" but on a page of my choosing. i.e. on my front page I have all recent posts. On a certain category page I will have ...
0
votes
0answers
20 views

Encoding matter - ? instead of € after settings field callback

In my plugin I have som classes to manage settings field. For some reason in one moment the setting field value with special characters like 30€ in textarea or input[type=text] change to be 30?. I got ...
0
votes
0answers
8 views

Unidentified plnTokenForOrder_nnnn option in wp_options

I have hundreds of plnTokenForOrder_[0-9](4) with autoload in my wp_options table and I really don't know where it comes from. Could it be linked to Stripe or Paypal gateway? How can I be sure it's ...
1
vote
1answer
86 views

Settings API get_option best practices

I have a lot of options in my custom theme and most of them are like: get_option('my_option')['depth']['more_depth'] as they are arrays. In order to write code in a "cleaner", more compact way I have ...
0
votes
0answers
20 views

Load google font script based on optgroup label selected

Ive searched and can't find an answer. I have two groups of fonts - one regular fonts and one google fonts. Im using a select dropdown list with two optgroups, one for each group of fonts. What Im ...
1
vote
1answer
71 views

get_option array value defaults and best practices

I have a custom options page. I have several sections of settings and some of them are even more closely related to each other so I decided to store them in arrays, seems more logical to me. It surely,...
2
votes
1answer
73 views

Custom theme options Radio inputs not saving

Why isn't the following option getting saved? Have been searching for quite some time and can't get it to work. Settings code: add_settings_section( 'aa_myoption_section', null, null, 'mypage-...

1
2 3 4 5
21