Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
2 answers
97 views

Ignore "empty" fields when saving

My WordPress and PHP knowledge is limited, but I am working on a plugin, and in the admin page I have three settings - two text inputs and one checkbox. On save, the values are stored in the ...
mjlu's user avatar
  • 3
0 votes
1 answer
88 views

Hide admin menu on update_option

I want to show custom sub menu page, if get_option is true else just hide sub page. My function must do, if input value posted as 1, show sub page else hide sub page. But problem is, when i post 1 ...
wpdev's user avatar
  • 549
0 votes
3 answers
303 views

How can I style my theme admin page?

I made a large-scale research. But there are no anything what I want. I want to style my options page in a static style file. How can I do that? Sources /* *Create A Simple Theme Options Panel *Exit ...
Onur's user avatar
  • 1
0 votes
1 answer
304 views

update_option does not work in this scenario - how do I fix?

I am attempting to use update_option to add or update an option. I have created a test below which creates a settings page and when loaded it runs my awd_do_sync function, but the option does not get ...
bigdaveygeorge's user avatar
0 votes
1 answer
46 views

How can I POST or GET to the same admin page from which I am POST-ing or GET-ing

I have made a admin page linked to a Settings -> submenu_item. This page looks like this: http://movahon.dev/wp-admin/options-general.php?page=miama-google-recaptcha%2Fmiama-google-recaptcha.php On ...
Vladimir Despotovic's user avatar
3 votes
2 answers
3k views

Reorder custom submenu item

In the Settings menu, I have the following menu items listed: Settings -- General -- Writing -- Reading -- Discussion -- Media -- Permalinks -- Blogging I'd like to the Blogging (options-general.php?...
Ethan Rævan's user avatar
  • 4,029
1 vote
1 answer
2k views

Admin page repeatable fields

I have a submenu page set up and I want to add repeatable fields to it. The submenu page is to add staff holidays (fields will be Start Date, End Date and a multi select to pick the staff members ...
sgspragg's user avatar
  • 157
0 votes
1 answer
191 views

Plugin option for input box validation

I'm crating a plugin option page from the code below. However, it does not explain how to get validation on the input fields. How do I get validation on id_number for NUMBER ONLY? https://codex....
Ohsik's user avatar
  • 407
2 votes
1 answer
2k views

add function to saving change on Options Pages

i make page like this link and it work fine but i need to run some script after it like editing a file i was add it to function my_function() { //do something } function register_mysettings() { ...
hooman's user avatar
  • 23
0 votes
1 answer
956 views

wp_login_url not working correctly

I'm working on a project where I need to add a custom link to admin menu, and I'm using the following code for it: $login_url = wp_login_url(); add_options_page('Login', 'Login Page', 'manage_options'...
Hardeep Asrani's user avatar
2 votes
3 answers
44k views

Why I can't change the permalink of this page?

I have the following problem with a permalink: if I open this page (it is implemented as a static page) on my local website: localhost/wordpressAsper/archivio it automatically change it into http://...
AndreaNobili's user avatar
0 votes
1 answer
111 views

Use options to control jQuery plugin

This may be a dumb question, but I've been teaching myself Wordpress and I've been struggling with this for a while. What I want to do is use a Wordpress control panel page to control a countdown ...
anguiac7's user avatar
  • 103
0 votes
1 answer
1k views

How Do I create multiple Top Level Admin Menu Pages To submit data to the options table?

I am trying to create more than one top level options page in my wordpress theme. But right now I can only save the data for one. How can I save the data for two without having to create tabbed panels?...
Amen Ra's user avatar
  • 121
4 votes
1 answer
4k views

How to add a new plugin page under desired Options page?

Using WordPress Settings API tutorial I created a new custom menu and corresponding sub menus. Each of my menus have a page of its own. I used add_menu_page() and add_submenu_page() for that. (Here is ...
Mayeenul Islam's user avatar
0 votes
1 answer
239 views

Settings API - Checkboxes validation in a menu with multiple subpages

I'm building a theme using the settings API. I have a top level menu with multiple subpages and everything is working fine, except checkboxes. I am saving the options to a single options array. This ...
BioXD's user avatar
  • 153
0 votes
1 answer
279 views

How do you add a settings page to another menu?

I created a settings page that's being displayed in the options menu like this: add_options_page( 'ATB Event Options', 'ATB Event Options', 'manage_options', 'atb-event-options', '...
dallen's user avatar
  • 163
0 votes
1 answer
713 views

Hiding an added admin page menu using css

I have added an admin page in wordpress but i needed it to be hidden.I added the page successfully like this function add_admin_page() { $themename = 'Cesaro'; $page_function = 'admin_page'; ...
Gandalf's user avatar
  • 352
0 votes
1 answer
1k views

Menu_slug used for creating options page

I am following this page on designing options menus: http://codex.wordpress.org/Administration_Menus What is the significance of the menu_slug ? I ask because when I change this value, the options ...
JohnnyBizzle's user avatar
0 votes
2 answers
711 views

Efficiency of wp_options vs a new table

I'm building a WordPress theme framework, that will likely have many options as development progresses. I found a related question: When is it appropriate to create a new table in the WordPress ...
Jeff Sebring's user avatar
6 votes
3 answers
658 views

What's the best method for emptying an option created with the Settings API?

I'm trying to empty an option created with the Settings API and failing. update_option ( 'my_option', '' ); appears to do nothing, whereas delete_option ( 'my_option' ); destroys the whole option ...
jnthnclrk's user avatar
  • 1,845
9 votes
2 answers
8k views

Add update notification bubble to admin menu item?

I have re-worded this to make more sense. Ok, I have a plugin that uses a remote service that check for updates, much like default WordPress plugins, in this case it just checks an XML file. I want ...
Wyck's user avatar
  • 18k
2 votes
2 answers
144 views

Unified Approach for Placing Option Pages

Currently, it is up to any plugin's author as to where to put a link to the plugin's option page. I have seen at least the following "solutions": Plugin list Dashboard menu Plugins menu Appearance ...
Raphael's user avatar
  • 514