The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
21 views

Wordpress get_option and update_option returned entered on the textbox field

I do have a problem regarding the plug-in settings that I've made. I've created a simple textbox and a submit button and run it on the admin page setting. The name of the textbox and submit button is ...
0
votes
1answer
19 views

Custom setting field value not working inside add_action init hook

I have added custom setting options page under WordPress settings and those are working perfectly. I have tested their values also. But when I am using those values inside function file within ...
0
votes
0answers
48 views

Dynamic value for get_option linked to taxonomy term_id?

I'm saving info into "get_option" and it's working great. But the info I'm saving is the slug of a custom taxonomy. The problem is that if I change the slug of the custom taxonomy later, it doesn't ...
2
votes
1answer
29 views

How can I get all user options?

The codex has a function called get_user_option() but it requires me to pass the name of the option. Is there a wp function to retrieve all user options? I just need to see a list of all options set ...
-1
votes
1answer
37 views

get_option return incorrect values

I'm making a Wordpress Plugin, and I'm starting with the Admin Settings page, I have the page setup and in the menu bar, i have also added sections and fields in to the page and they all work fine, ...
0
votes
1answer
13 views

Including a custom options page causes “Pages” to disappear from dashboard menu

I've created a custom options page and referenced it through my functions.php file. When i do this, the Pages option is removed from the WP dashboard, almost as if overwritten by the new options page. ...
1
vote
1answer
84 views

get_option() is not working even db contains the corresponding option_name and option_value

First of all, this is not a plugin specific problem. I wonder why this might happen? I am using @bainternet's Tax Meta Class for saving Taxonomy Meta using the options table. I uploaded my contents ...
0
votes
0answers
44 views

get_option returning old value for non-admin users

I am working on multisite with sub-folders. I am trying to create a plugin that will simply reduce the click counts and those counts will be visible to all users. For admin user all is working fine. ...
2
votes
1answer
89 views

get_option function

I'm currently trying to make my own theme, but i'm not quite sure how the get_option() function works, because how come this.. echo get_option('show_header', 'sultenhest_theme_display_options'); echo ...
0
votes
0answers
60 views

Custom Taxonomy Update Option not working

I'm working on a custom taxonomy I have created. The fields appear ok in both add and edit views and the save method is being called. I'm able to use deferred admin messages and ob_start to capture ...
0
votes
1answer
72 views

Wordpress get_option() on AJAX issue

I am having some issues with the get_option method in Wordpress. I'm running a WooCommerce website and for the currency symbol position is set to "Right with space". In the wp_options table the ...
0
votes
0answers
135 views

Display backend function to frontend?

Hello senior developers i have a problem to display to fontend.. //register settings function theme_settings_init(){ register_setting( 'theme_settings', 'theme_settings' ); } //add ...
0
votes
1answer
162 views

Get plugin option in another PHP file

I making a plugin, and I registered several options in the plugin PHP file. So let's consider : my-plugin/ - my-plugin.php (options are registered here) - admin.php (the admin page of the ...
0
votes
0answers
66 views

Using get_option on radio buttons

I'm really stuck with this one! I have an options page where I presently take some data from input fields. E.g: <input type="email" name="mail" value="<?php echo get_option('email'); ...
0
votes
1answer
827 views

get_option() will not work without access to wp-config.php

I've created a plugin. In the initialisation file of my plugin I created an options page with some options to be stored by the admin. <form method="post" action="options.php"> <?php ...
0
votes
2answers
41 views

get_option and list of options

I'm trying to retrieve some values stored in the option panel of WordPress, however the list of the options I found on the site seems not complete. Perhaps it's me looking in the wrong place. What ...
1
vote
1answer
443 views

differences between behavior get_option vs get_site_option in multisite

I am converting a bunch of sites to multisite and I am confused about the behavior differences between get_option and get_site_option. It appears that get_site_option actually means ...
7
votes
4answers
3k views

get_option() vs get_theme_mod(): Why is one slower?

I've been using get_theme_mod() for some time in various projects of mine. I decided to take advantage of the Theme Customization API in WordPress v3.4 once it was available as I felt it was an ...
0
votes
1answer
285 views

Using update_option() and get_option() is echoing escaped strings

I'm using the Option API for my theme settings page. I use the $_POST data to update the options when the changes are saved. My issue is that the strings I send get escaped and when I use this code: ...
0
votes
1answer
263 views

get_post_meta fields don't show up on posts page

I'm new here, and to coding! I've been working hard (so, so hard...so hard) to create my website and with occasional help I've created a look and feel I like using some custom get_post_meta fields for ...
0
votes
1answer
66 views

Echo option page form field value

Here is my option page code containing a no of fields like logo, slider after filling all the information in option page form. I need two things After submitting all the form details save ...
0
votes
1answer
765 views

Ajax - Call to undefined function get_option()

So I've been working in Wordpress lately with Ajax and I managed to get some stock data into my site from my database. However, I am now trying to use Ajax to load Wordpress posts into my left ...
0
votes
1answer
55 views

How to perform a frontend HTTP call with AJAX when plugin save the new settings?

I use a function to "pass" the data with get_num_queries from the front to the back end (to a plugin options page). function get_queries_wpse_143544() { $dbq = get_num_queries(); ...
0
votes
1answer
1k views

Fatal error: Call to undefined function get_option()

When I try to send mail... it showing - Fatal error: Call to undefined function get_option() in /home/junkie/public_html/sub_demo/wp-content/themes/scroller/includes/contact-form.php on line ...
0
votes
1answer
105 views

Saving an array to get_options

I'm trying to save an array to get_options in wordpress, I'm aware that I don't have to serialize the array due to get_options doing that. At the moment I don't get any success of failed message upon ...
0
votes
1answer
43 views

Thumbnail of the latest posts page

I have a page "Blog" and it's set to display latest posts. This page itself has a thumbnail, and I want it to be displayed in header. Every other page/post has same layout and thumbnail shows in ...
3
votes
2answers
3k views

WordPress Settings API, Implementing Tabs On Custom Menu Page

I've been following the WordPress Settings API tutorial series of this guy: http://wp.tutsplus.com/tutorials/theme-development/the-complete-guide-to-the-wordpress-settings-api-part-1/ So far, I've ...
0
votes
1answer
293 views

get unserialized array without using get_option()

I'm working on a WPMU plugin that cycles through tables in each blog on the network. I can't use get_option to pull the settings array out of the wp_n_options tables, so I'm trying to do it by ...
1
vote
1answer
748 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
644 views

Multiple entries in get_option results? or why is _multiwidget set to 1?

I am developing a wordpress widget, and need to store some user configuration values, that is why I am using wordpress update_option and get_option. I am new to widget development. I have some ...
0
votes
2answers
132 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 ...
0
votes
1answer
26 views

How do I display a WP Option from an array?

I have a problem displaying the data that I am successfully saving to my database. function create_input_twitter_option() { $options = get_option('global_options_arraykey'); ?><input ...
0
votes
1answer
38 views

the correct way to use options from settings page [closed]

I'm creating a plugin in Wordpress and am a little confused how I should use settings I set in my settings page. I used: http://codex.wordpress.org/Creating_Options_Pages to create my settings page. ...
4
votes
3answers
253 views

bloginfo() vs get_option?

What's the difference between: bloginfo('name'); vs get_option('blogname'); The parameter is just an example, but I see no differences in terms displaying what I want. Are there any particular ...
0
votes
3answers
3k views

add action wp_head not working

I am trying to add some code to the head (namely a block of tracking script) via a plugin I am making. The plugin has an interface where the user enters some details which are then added to the ...
0
votes
1answer
693 views

why does get_option( 'home' ) not work while using in plugin [closed]

I'm working on a wordpress plugin and am running into an inssue with get_option( 'home' ). What I'm trying to do: if the user (or admin) is not logged in then a login form will appear on a custom ...
0
votes
0answers
608 views

Echo the key from a select-box in Array with get_option (Settings API)

I'm trying to print a key from one select box. I'm using the WordPress Settings API. This is the array: $options = array ( array( "name" => "Styles & Fonts", "type" => "title"), ...
-1
votes
1answer
2k views

How to fetch serialized data from wordpress options

I have the following serialized data in a wp option a:2:{s:5:"Title";s:11:"your title";s:7:"Message";s:20:"Hola testing testing";} I would like to return it to be used in a form, and show it also in ...
0
votes
1answer
2k 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
1answer
4k views

Getting wordpress admin email

I'm building a contactform that needs to send all queries to the admin mail adress. The php file which processes the entered data and sends the email has only contains this code: <?php ...
0
votes
2answers
532 views

Minimal wordpress load for only `get_option` to work (because ajax…)

In a plugin I use ajax to get_option() which takes much longer than it has to because entire wp gets loaded. How do I set things up so that it (my ajax) loads only what is needed? (get_option())
3
votes
2answers
2k views

Is get_option function cached?

In my plugin, I use the following code to retrieve an option from the database: $options = get_option('my_plugin_options'); If I use this 10 times in various functions of my plugin, does WordPress ...
0
votes
1answer
293 views

How do I safely force get_theme_mod() to use a defined get_option(“stylesheet”) value?

In our development process we have several branches of the same theme for each developer. Theme branches live in different directory names, so when doing get_theme_mod(), get_option("stylesheet") can ...
1
vote
2answers
208 views

Can I force get_option to go back to the DB instead of cache?

Is there any way to guarantee that when I call get_option I will definitely get the value from the database and not from cache?
0
votes
2answers
453 views

Pull GetOption() variable into jQuery dynamically created html

I have a page with the following markup in the site theme footer: <div id="modalpopup"><div id="inside"></div></div> I have a variable in the WP db I can retrieve via ...
1
vote
2answers
229 views

How to find what index page a post is on?

Here is a simple example of what I am wanting to figure out. Say I have WordPress set to show 5 posts per page. And say I there is a post 17 posts back chronologically. The formula would be 17 / 5 ...
3
votes
2answers
499 views

Using get_option() in JavaScript

Previously, I used the get_option() function to get an option in PHP, like this: $width = get_option('my_width'); This is inside a shortcode function. Now, I want to have an option in JavaScript. ...
3
votes
1answer
2k 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 ...
0
votes
1answer
354 views

How to access a variable on all page?

I added a variable to my functions.php file: $options = get_option( 'simple_options' ); I can access to this variable on every page, but If I call it in the footer.php it's not working. How to fix ...
0
votes
3answers
168 views

get_option error plugin development

Im creating a plugin with the following structure: plugins (folder) - myplugin (folder) - myplugin_index.php (adminpanel file) - myplugin_ajax.php (loading data when user enters a form on the ...