Skip to main content

Questions tagged [save-post]

save_post is an action triggered whenever a post or page is created or updated, which could be from an import, post/page edit form, xmlrpc, or post by email. The data for the post is stored in $_POST, $_GET or the global $post_data, depending on how the post was edited.

0 votes
0 answers
30 views

I'm using an acf field to create a custom slug for a post type. Everything works and saves correct in the database. Only the shown value of the link field in the backend is not updated on publish. I ...
Lisa's user avatar
  • 13
0 votes
0 answers
49 views

I have this specific block than when I insert in the Editor, gives me this error: and the error states: Content generated by save function: <div class="data-props" style="display:...
neke90's user avatar
  • 1
1 vote
1 answer
352 views

When saving a post that is a custom post type (in the example, 'my_cpt'), I'm trying to check if a specific piece of metadata exists for that post. I'm using this exact same code on another site (...
Scott H's user avatar
  • 31
0 votes
1 answer
48 views

Who can help me a little. I try to get an admin error notice if a metabox field is empty during save post. Wordpress refresh the page after saving so the hook admin_notices does not work. Here is my ...
RickB's user avatar
  • 1
0 votes
1 answer
40 views

I have added some custom fields to the Gutenberg editor, the purpose is getting these custom fields loaded in the custom-post-type. Thats is all working, I was able to get the custom-fields in the ...
Brango's user avatar
  • 1
1 vote
2 answers
903 views

I have tried a few versions of the code to get this working and seem to come up with a couple of errors either way. I am using ACF for the fields and adding the below code to the themes functions.php ...
Craig Watson's user avatar
0 votes
2 answers
123 views

I want to use save_post on an update for an existing post and also for a new post, but I want 2 different "priority" on the save_post action. So, I can't check if it's an update into ...
John Pls's user avatar
1 vote
2 answers
254 views

So far this is what I have... I'm new to developing plugins so I'm not sure how to make a plugin run code on a post save. I know that this would likely work if it was added to the post.php page but I ...
Cody King's user avatar
0 votes
1 answer
91 views

I'm currently trying to work with webhooks without using any plugins, and I'd like to avoid them if possible. The webhook should be triggered when a change is made to the Custom Post Type "event.&...
Björn's user avatar
  • 1
0 votes
1 answer
1k views

I'm using ACF in my custom post type and I have 2 numeric fields: one for Birth year and another for Age. I want to update the age field automatically based on the birth year field value. I found out ...
Adriana Leites's user avatar
2 votes
1 answer
1k views

About a year ago the site was moved to another host (same domain name). Every time I attempt to save a post, page or upload media, I'm immediately sent a connection reset error (This webpage is not ...
Alex Gubin's user avatar
1 vote
0 answers
51 views

I changed markup in my custom static block and now I have to resave custom posts where I use them in order to update what is shown in the front. I tried to automatise procedure by using wp cli command ...
Lovor's user avatar
  • 1,003
0 votes
1 answer
117 views

I'm importing Events from a Salesforce Event Manager into WordPress, specifically into the The Events Calendar. The Events Calendar creates a CPT called Events. It also has its own Categories, which ...
Mikey B's user avatar
0 votes
1 answer
313 views

I have some custom meta values to a custom post type ('event'). The custom post type is displayed in the admin and the custom meta fields are appearing fine. I am using save_post_{$post->post_type} ...
sariDon's user avatar
  • 283
0 votes
1 answer
470 views

I have a Custom Post Type with the slug of "sightings". I do not need a post title, so I have removed the functionality - but now the posts are being saved as (no-title). I read about the ...
Nebin Esquire's user avatar

15 30 50 per page
1
2 3 4 5
26