Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [save]

The tag has no usage guidance.

0
votes
1answer
20 views

I am trying to make a field show and save from quickedit screen

I have a select box with some options. It appears in the normal product edit screen with the following code. function we_skroutzxml_custom_availability() { woocommerce_wp_select( array( ...
0
votes
0answers
20 views

How Can I Save This Re-order action?

I have a code that I'm working on to enable a user to manually order posts in a custom post type, a lot of the code I basically copy-pasted from an already-existing plugin that has this functionality, ...
0
votes
0answers
13 views

save meta data of custom post type: WP_Error has no effect, even if insufficient capabilities

The function should give the user a feedback, if the data changes of the meta box of a CPT couldn't be saved. In the following code the function returns a WP_Error if the current_user doesn't have ...
0
votes
0answers
18 views

Append custom fields to title and save in database

I am trying to achieve the following. We have the name of an artist in our title section of wordpress, let's say 'artist' war on drugs. With the ACF plugin we have created several custom fields, ...
1
vote
1answer
59 views

How to save widget fields generated from an array?

I created simple php abstract widget class that can generate form with fields from an array. When I try to save fields, all changes are removed. Abstract Widget Class: <?php /** * Abstract ...
0
votes
3answers
118 views

Wordpress 4.9.8 doesn't save if content has style="

Wordpress 4.9.8 when I save a draft/publish return me an error: Gone The requested resource /wp-admin/post.php is no longer available on this server and there is no forwarding address. Please ...
0
votes
1answer
374 views

How to Fix WordPress Not Saving Settings?

How Can I Manually Fix & What is The Root Cause? The Site Language setting in Settings > General for my site, will not update. It is stuck on English (United States). I have done all the ...
0
votes
0answers
893 views

Saving of Draft is failing

When using the classic editor, I am able to save drafts just fine. When using the normal editor, everything works except that I can't save drafts. I can publish just fine. But it otherwise gives me "...
0
votes
1answer
112 views

save_post affect creation and deletion

I wrote a little bit of code to update the post name and slug (of my cpt) when saving. This is working nice when I update a post. I just noticed theses few lines are affecting the creation and ...
-1
votes
1answer
239 views

Select area and checkbox data is not saving?

I am making my theme options so I am using the code from the WordPress Codex. I have taken this code below. Creating_Options_Pages $options = array( array("name" => "Header Customization",...
1
vote
1answer
80 views

How can i limit the number of posts created per category?

How can I limit the number of posts created per category? And then delete the oldest post and save that one? I would like to do something like this: add_action("load-post-new.php","...
1
vote
2answers
283 views

Remove “Save draft” button without using CSS

Is there a way to remove "Save draft" button without the use of CSS?
1
vote
1answer
2k views

How to unpublish a page and still keep a draft?

I have a holiday sale page that no longer applies as the holidays have past. I want to keep the page for future design reference. I do not want the page to be accessible from the Internet. I ...
0
votes
1answer
37 views

Show message from backend

I need to show messages on wordpress page editor, when a page is updated. I know there is a admin_notice hook to show messages. I have a save_post_page perfectly working on my code, but I need to know ...
0
votes
0answers
150 views

Save input form on custom field

I have an idea but I don't know if it's working on wordpress. I wanna save/stock input values on a custom field or metabox, is that something can work on wordpress? I couldn't find any way to develop ...
0
votes
1answer
92 views

MetaBox not saving after empty

So I created a few custom metaboxes like this, and they all operate this way. They work perfectly the first time I put anything into them, and any time I edit them after that, but if they are emptied, ...
0
votes
1answer
1k views

How can I create a custom meta box to add an mp4 video to a page?

I've cobbled together code (as I'm a php and jquery newbie) from a couple of different posts to try and get an mp4 video URL input field in the wordpress admin. I've been able to get a media uploader ...
0
votes
1answer
46 views

AJAX save options inside class

I am creating a theme options page but with object oriented approach. Every new instance of this object is a separate subpage. Rendering and all the options work fine (still in progress, but in a ...
0
votes
2answers
115 views

Save Textarea on Wordpress Frontend

So I have absolutely no idea where I should start on this, other than obviously creating a textarea. Basically I'm upgrading a platform and on the previous platform, everything ran through php frames....
3
votes
1answer
1k views

Add comments meta fields to comments metabox on post edit screen

I have few custom fields in comment form. How can I add these fields to comments metabox? I divide my question on 3 parts: 1) How to remove url field and add custom comment fields to comment quick ...
0
votes
1answer
720 views

Disable save as image on smartphones using all browsers ( chrome, firefox, ie, cm, opera )

i want to disable the option to save as images on smartphones (android and IOS) using mobile browsers like chrome, firefox, ie, cm, opera, ie. Could anyone have a solution to this? chi
1
vote
0answers
138 views

Attaching taxonomy data to taxonomy with wp_insert_post

By WP User Frontend I create a registeration form with some checkboxes, and use wp_insert_post and update_user_meta for create a new post (post type pavilion) on user registration.I want when checked ...
0
votes
1answer
2k views

Calling a save function from a “submit” button

I am trying to call a function to save changes from a submit button, but I am not accustomed to PHP programming, as I have just started. I tried Googling around a bit, but didn't find anything too ...
0
votes
1answer
4k views

How to undo the last changes to a custom menu?

I have a wordpress site with a custom menu. When I want to add a page or something to the menu, I click appearance, add the item, then drag it to the right location. This time when I did it the menu ...
0
votes
1answer
941 views

How to check which submission button was clicked?

So I added a new submission button to the edit page: Using the post_submitbox_misc_actions hook with the submit_button($text, $type, $name); function. I wanted to modify the data that's saved based ...
1
vote
1answer
311 views

Cannot save using register_setting

I am adding an option field to the 'general options' page in WordPress. I cannot get WordPress to save the field. Cannot figure out what I am doing wrong. function add_banner_options() { ...
0
votes
1answer
294 views

Custom meta box using OOP way doesn't save data

This is the first time I'm building meta box using OOP way, the problem is when I save the post (product) or update it the input text is not saved to the database. Here is my code: <?php /** * *...
0
votes
4answers
8k views

Add a wp editor to custom plugin and save data

I'm creating a custom plugin. One of the fields in the plugin let's the user add data. If I add a textarea the user has no control over the text. So I would like to add a editor. I know WordPress ...
0
votes
1answer
4k views

Save meta box values as an array to wp_postmeta

I have a custom metabox running that dynamically adds fields to the form I'm stuck on the saving part. This is how the fields are added: <tr> <td valign="top"> <label for="...
1
vote
3answers
4k views

$wpdb->replace / Replace or update primary key

I write code to save data in to the database table. I want Replace a row in a table if it exists or insert a new row in a table if the row did not already exist. http://codex.wordpress.org/...
0
votes
1answer
1k views

Saving an upload media meta box field

I'm using the answer for this previous question (link below) to generate a custom meta box with media upload functionality: Add "upload media" button in meta box field I've managed to get ...
0
votes
1answer
544 views

save metabox with new values _wp_page_template

I created a metabox to display the page templates and select a different one with a radiobutton selection. This is a replacement for the current page attributes metabox. I'm missing something with ...
1
vote
1answer
5k views

How to add wechat (weixin) link to navigation menu?

The profile link of WeChat (or Weixin) has the following format: weixin://contacts/profile/username As you can see, it doesn't use http:// and that seems to be the reason that it cannot be added to ...
0
votes
1answer
224 views

Problem in custom meta boxes

I am trying to create a custom meta box "Set your mood" which will display the mood of user but unfortunately meta box is not saving value. Please help This is my code <?php /** * Adds a box to ...
6
votes
5answers
2k views

Server side validation

I'm trying to do some server side validation of post fields (custom and/or non-custom fields). Validation works just fine, but I can't seem to stop the post from saving if validation fails. I tried ...
3
votes
1answer
1k views

How to update widget from widget() function?

I'm trying to create a simple linkroll widget for displaying recent https://pinboard.in links via their API. To maximize loading speed, I want to cache the linklist in a widget field, as well as the ...
0
votes
0answers
105 views

Users can only save their draft once before saving for revision

I use the Members Plugin and Custom Post Types. I created a role and want them to contribute posts (within this Custom Post Type musician) but don't publish them. Additionally I want to give the ...
0
votes
1answer
712 views

Save values from foreach loop in wp_editor

I have created a custom metabox that contains a wp_editor. The wp_editor shows content of a uploaded .csv file and constructs a table. I want to allow the users to edit the table after uploading the ....
0
votes
2answers
1k views

New User Save Filter

I'm using the new(ish) filter add_action( 'user_new_form', 'funcy', 9 ); to add custom fields to Create A New User page. I'm then using add_action( 'personal_options_update', 'save_user_meta' ); ...
0
votes
1answer
950 views

Update user meta array using foreach

I have two arrays consisting of keys and values: Array consisting meta keys: $user_meta_fields = array ( 'first_name', 'last_name', 'job_title', 'college', 'street_address','address_line2','city','...
0
votes
0answers
428 views

Custom metabox value not saving

I have a custom meta box on a custom post-type. I've followed this tutorial but can't get the value I enter to save, I'm guessing I've referenced to something incorrectly. I've looked at the other ...
0
votes
2answers
7k views

Warning: Illegal string offset on theme options page [closed]

Im creating custom theme options and Im getting this PHP error: Warning: Illegal string offset in ... on line 75 // adding the page to menu add_menu_page('Theme Options', 'Theme Options', '...
1
vote
1answer
45 views

How to disable saving/changing update date for certain admin users?

I have an admin user who is only for correcting the spelling errors and grammar stuff, however, when he corrects some post that is several hours or days old and just changes "People are gready" to "...
2
votes
1answer
72 views

Why won't my custom widget stay in the sidebar after a reload?

After I drag my custom widget into a widget area and reload the page it's gone. Any ideas? <?php add_action('widgets_init','register_postTypeWidget'); function register_postTypeWidget(){ ...
4
votes
2answers
6k views

How to force function to run as the last one when saving the post?

I don't know how to force this function to run as the last function after all other save things from WP are executed. This is my current code in my plugin: add_action( 'save_post', 'do_custom_save' )...
9
votes
1answer
4k views

Run function AFTER theme options are saved?

Weird question, how can I run a custom function AFTER my theme settings are saved? I see that the register_settings() function has a sanitize callback, but that runs before the settings are changed. I ...
0
votes
0answers
2k views

admin panel save option with ajax

I create custom options in the admin panel but I have some difficulties to save it with ajax. I can't get the php script with action variable in ajax script. Here all my scripts: in functions.php : ...
0
votes
1answer
179 views

Select Menu for Custom post Type does not save

I posted a discussion on CSS-Tricks the other day. Explaining that my Videos were not displaying on my Video page from my custom post type that I created using this tutorial. I thought I fixed the ...
0
votes
1answer
2k views

Theme Option's Save Button is not working

I'm currently working on making an options panel for a theme (theme-options.php) on my localhost. Every thing was going well until I tried testing the Save button. After clicking it, I got the ...
0
votes
1answer
305 views

Wordpress overwrites UNC

I am using wordpress multisite. When editing a post, adding a link to a file in UNC format, and clicking save, wordpress is stripping out the drive letter and colon before the data hits the database. ...