Articles of add settings field

General Settings: display custom plugin field after Site Address field

For my custom settings field, I am looking to insert it right after the Site Address (URL) field in the General settings page. I’m able to add the custom field sucessfully using the add_settings_field(). Be default, it add the custom field at the bottom. Using jQuery, I was able to display my custom field after […]

Theme Customize API Panel Concept

I am assuming while writing this post that I have a clear understanding of the theme customizer API: There are sections → Under which we have Panels → and under these panels we have Fields. I am unable to add Panel in the desired Location Suppose I have created a section Named: newsletter→ $wp_customize->add_section( ‘newsletter’, […]

How to save plugin custom settings page fields

I want to implement a plugin which gets 2 fields in admin area and saves those in options as array I read the page Custom Settings Page but seems it doesn’t describe how to save fields values in options How we can do it ? Thank you <?php /** * Class for registering persian font […]

site identity section name?

In the customizer, the site identity section is missing a logo upload field. Adding such field is not a big deal: A field can be added, but I don’t know the section name that is created in the core of the WordPress. Can someone help me in that? The field can be created like this: […]

Settings API and 'type' => 'font'

array( ‘name’ => ‘textarea’, ‘label’ => __( ‘Textarea Input’, ‘wedevs’ ), ‘desc’ => __( ‘Textarea description’, ‘wedevs’ ), ‘placeholder’ => __( ‘Textarea placeholder’, ‘wedevs’ ), ‘type’ => ‘textarea’ ), Just like in the above example the ‘type’ => ‘textarea’ what is its equivalent for a font? I tried → ‘type’ => ‘font’; but that didn’t […]

Can I use register_settings and unregister_setting once the settings page has loaded?

I want to add few settings fields dynamically on settings page depending on user action. I am planning to register these new fields dynamically once user asks for it and show the corresponding HTML using jQuery. Is it possible to register settings once you are already on settings page? Also, is there a better way […]

Section Name for Menu in Theme Customizer

I browsed many articles to know the section Name of the “Menu” in the theme customizer. Here are the few resources that proclaim and identifies that the default section name is “nav” → https://wptheming.com/2012/06/add-options-to-theme-customizer-default-sections/ http://natko.com/changing-default-wordpress-theme-customization-api-sections/ Currently, there are 5 fields that are resting in the → title_tagline – Site Title & Tagline but as soon […]

Single callback with multiple setting fields

Is there anyway you can use a single callback with multiple setting fields? Maybe there is a way to pass the setting field used through the callback?

Extend plugin options page

I had recently installed Post Views Counter plugin, which created an options page under the WordPress Settings menu. Now, I’d like to extend plugin functionalities by adding few more options. It will do by another plugin which has been created by me. The target is to add my own options directly into the page where […]

Settings API: Change position of custom setting field

I’ve searched high and low on Google and this site for an answer to this and am quite surprised to find nothing about it anywhere I’ve added a custom setting to the General settings tab using add_settings_field() but the field appears at the bottom of the page. I’d like the field to appear below the […]