Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • Programming
    • C
    • C++
    • Java
  • Web Development
    • Java Script
    • jQuery
    • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • Programming
    • C
    • C++
    • Java
  • Web Development
    • Java Script
    • jQuery
    • PHP

Unable to save or update postmeta for custom post type via action using save_post hook

Try changing update_post_meta(get_the_ID(), $address, 'test'); to update_post_meta(get_the_ID(), 'address', 'test');

Categories custom-post-types Tags custom-post-types, functions, save-post
Post navigation
How can I set custom order use this function
Single Post Pages for Custom Post Types

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Can I add a default Block to my custom theme?
  • Block Editor: Reset Reusable Blocks to last saved record
  • WordPress Loop inside Loop?
  • Add custom taxonomy to post content body?
  • ACF: replace comma with another sign [closed]
  • do_blocks does not include its CSS
  • Use custom image size in admin panel
  • How to disable inline css styles generated by Gutenberg editor?
  • Is there builtin way to use protected AJAX endpoint?
  • How to get specific setting by settings_fields()?
© 2022 Read For Learn
  • Programming
    • C
    • C++
    • Java
    • javascript
    • Python
    • R
  • Web Development
    • Java Script
    • jQuery
    • PHP
    • WordPress
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Microsoft Office
  • modx
  • root
  • Tips & Trick
  • Tools
  • windows