Try changing update_post_meta(get_the_ID(), $address, 'test');
to update_post_meta(get_the_ID(), 'address', 'test');
Related Posts:
- Urgent – WordPress keeps creating posts
- How to use wp_set_object_terms depending on page ID?
- Title and URL Error in Breadcrumb Navigation for Custom Post Types
- Check that a slug is present in the get_terms request
- Is there a way to use ‘publicly_queryable’ => false only on specific taxonomy term?
- Different number posts per page based on custom post type term id
- Pagination not working in custom post type. Help
- How to add specific terms in a custom post type?
- Assigning categories to custom post types via a front-end form; only works for native post type
- how to display author name in custom post type
- Save post action is called twice
- Default excerpt for parent of a custom post type
- Custom attachment function not working in v5.4.2?
- Limit custom post type to the authors only on front-end!
- Cannot display the_content() after removed WordPress 5’s auto embed feature (iframe & blockquote)
- Update main post with same category when creating custom post to update the modified date
- CPT tags not showing when editing post
- How to check for duplicate record before saving a Custom Post Type
- Move to trash custom post type post after ACF Date Picker date is older than today
- Attend event form with ajax
- From CPT Custom Loop into Shortcode?
- Create posts inside CPT post
- Persist meta box choices throughout all posts of same post type
- ACF field check value of field on all other articles
- How to get current post type?
- How to convert Post Object Custom Field into Tags
- Custom post types saved as basic post
- Problem with multi checkboxes value in metabox?
- Save_post acf data not updating category of post type
- Post meta is not accessible within save_post hook
- Load custom post type with ID in a shortcode
- Why is wp_list_authors not picking up Authors from CPT’s?
- Change Search display for Custom Post Type
- Create dynamic logo carousel without using any plugin
- Send mail to author when custom post type is saved
- subtracting the current post form then whole loop, which is generating all CPT titles
- Custom Function to redirect singular post if specific meta field is empty
- Recovering data about custom post and taxonomy types
- How to assign post to category
- fusion builder missing from custom post editor
- Using get_post_type with a custom URL format?
- Stored meta from attachment, video length?
- Custom post type meta fields missing on save_post_type
- If thumbnail image else post title
- wordpress does not see the correct custom taxonomy hierarchy
- is using “require_once” in wordpress theme affect the speed ???
- How to save post_status using action save_post?
- How to stop post status from reverting to Published?
- $_SESSION Not working after X amount of page views
- Function for when new custom post type is created should do something
- save_post affect creation and deletion
- Link two different post using there post_id in post meta
- Duplicate posts in my custom loop
- When post is Published, insert into custom table a number – custom post type
- Different Configuration for the_excerpt()
- WordPress page not showing up – replaced with last 10 posts?
- Custom permalink rewrite rules – how do I fix this?
- Custom meta box data not saving
- Post that populates itself (almost) automatically using data from imported excel file
- How to mark posts as visited
- Populate custom post type/custom fields from an external database
- How to sort custom post’s category by id from the theme’s function.php?
- Work and Display a Custom Post Type as a normal Post
- Custom Field to post_title
- How to implement custom post type’s users
- How to hook save-post function to use taxonomy term in post-slug?
- Post Custom & Taxonomy 404 error
- Getting a 404 on single custom post type page when using rewrite on a custom taxonomy
- How To Display Category list from Portfolio post type plugin?
- Featured image in custom post is being disabled
- custom post type does not working when adding in child theme function
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- can’t see categories in appearance-menu-categories
- Metabox is not saving
- call_user_func_array() error after moving to another server
- Generate slug and meta data if meta field is empty
- WP_Query function for custom post type
- Problem with ‘save_post’ hook not running
- Modify shortcode to work with custom taxonomies and slugs
- Calling the first & last post by category in custom post type
- Pagination fault in custom post type archive page [duplicate]
- How can i call a custom method on submission of a custom plugin post type?
- Set the Title of a Custom Post Type by code as Author’s Username
- Query custom post type and showing its content
- Not Able to Display Metabox Saved Checkbox and Selected option After Save/ Update
- Function not pulling image or text from custom post type
- Function that get ACF fields value before saving
- send email to all registered users when post expires
- Rich Custom Field for Custom Post type not saving
- Updating User Meta from Custom Post Field Upon Publish Not Working
- I want to split this into two functions
- Can’t preview custom post – Redirected to home page
- Generate daily archive whenever any post type is added
- Custom Loop for custom post type. Compare by meta_value?
- Invalid Taxonomy in template
- Allow authors to create article image
- Post AND page parameter for WP function
- Code in custom widget queries all posts, when it should only query the current post
- Custom post type functions.php if statement on action
- Add HTML before a specific div?