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

Using publish_{custom-post-type} hook for custom post type to update meta doesn’t work

Using publish_{custom-post-type} hook for custom post type to update meta doesn’t work

Related Posts:

  1. Create action running on trashed_post hook to modify post_meta value
  2. How to enqueue scripts on custom post add/edit pages?
  3. Unregister post type from child theme
  4. flush_rewrite_rules on save_post Does Not Work on First Post Save
  5. With what hook can I address all posts from all custom post types when they are published?
  6. What hook should be used to programmatically create a post only when master post is updated?
  7. How to register custom post types in a plugin?
  8. Remove “Get Shortlink” button in admin of custom post type
  9. update_post_meta() whenever custom post type is updated
  10. Can’t unregister parent theme’s CPT from my child theme
  11. Insert Multiple Post with Same Publish Button
  12. How to: Display ACF [fields] on Custom Post Types Utilising WordPress ‘Hooks’? [closed]
  13. Filter Posts from the Main Query
  14. Using preg_replace to filter custom textarea
  15. Use remove_meta_box conditionally on custom post type
  16. wp_trash_post action hook with custom post type
  17. How do I amend form data before it is saved for a custom post type
  18. How can I get some of a posts meta data whilst it is still inserting?
  19. How to recover the post ID earlier in the WP admin hook action “firing” sequence?
  20. Using `set_transient()` when saving a custom post type
  21. How to store additional data that is related to core data
  22. do action inside a class is not working
  23. Add a post when another post type is inserting
  24. Update Post Meta for a logged in user
  25. Getting meta in editor plugin, and event triggering issue
  26. How to duplicate entire custom post type
  27. A better way to add a meta box to custom post types
  28. Restrict Access to Posts based on Custom User and Post Meta Data
  29. Two Custom Post Types Many to Many Relationship
  30. get_post_meta not working on publishing
  31. Should wp_postmeta meta_key always be unique for a given post_id?
  32. A method for ordering mixed dates in search result loop (theory only, no actual code)
  33. How do I add a custom screen for a custom post type to be called from custom post row action?
  34. Custom post type suppress transition from future to publish
  35. how can I register a post_meta field in an existing CPT and then call it again with get_post_custom()?
  36. get_post_meta returning no value in custom post type alert email
  37. post meta parameter in post custom-post-type endpoint with restapi
  38. How do I set all of a particular post meta to a value within the custom post type I’m in?
  39. Limit number of custom posts per taxonomy
  40. Update postmeta Parent when post_status child change
  41. Metabox not show in categories custom post type cmb2
  42. WordPress request fiter order by related post’s post_title
  43. Update database from Quick Edit according to Checkbox state of Custom Post Type
  44. Custom fields (wp_post_meta) vs Custom Table for large amount of data
  45. Storing a many to many post type relationship in post meta and keeping SQL ability for Joins
  46. Dynamic Custom Fields
  47. Show Custom Post Type meta boxes only on Page Edit
  48. Custom filter function not working with Custom post type
  49. Importing Data from a Non-WordPress database, into WP
  50. Getting thumbnails of a custom posts featured images in a page-templates metabox
  51. List Taxonomies: Don’t list taxonomy if it has no post – depending on custom post-meta?
  52. Remove Post Custom Meta Box
  53. Can’t publish custom post type – “You are not allowed to edit this post.”
  54. Custom fields for custom post type
  55. Show future events based on custom field AND order by date
  56. Categorise Custom Post Types
  57. Meta Data for Custom Post Type not saving
  58. How can I add a filter to a particular post format?
  59. Is there any way to get list of all possible filter hooks for all post types?
  60. Check if post with same meta value exists
  61. Filter date from post meta when date is in string format
  62. Create new custom post and post category of same name
  63. Add a custom text to admin footer in a Custom Post Type page
  64. Get only used meta_values
  65. If Post Meta Equals Current Title Conditional Advanced Custom Fields
  66. Is there a way to exclude posts based on meta_values?
  67. Get rid of “trash can” for custom post type
  68. Do posts, pages and / or custom post type objects have unique ID numbers or can there be multiple objects with the same IDs?
  69. Archieve.php not loading for custom post type
  70. Submitting Custom Post Types with custom fields from Front-end form
  71. create custom meta box with default value
  72. Get $post->ID from a URL
  73. Displaying a div from an assigned meta_value when on a page
  74. Meta data (Tags and Categories) for Custom Posts not showing.
  75. Custom Meta fields Update hook?
  76. Display different information of a custom post type
  77. Include php on a specific page template
  78. Create Array from custom post type to display a slider
  79. Setting Post Title via Meta Data returns Auto-draft
  80. How to Echo Metadata Value in Currency Format
  81. Issue on Working with Metabox – Checkbox to enable Sale Items
  82. Filter posts by tax (dropdown) and meta value
  83. delete_post_meta() for whole CPT / multiple posts?
  84. Add an Outside Wrapper to my Header and Make it Full Width
  85. How to get specific post meta by title or id
  86. Publish and save specific postmeta to a filtered post_type
  87. What do the numbers mean at the end of add_action(‘save_post’)…?
  88. Running a wordpress action when a custom post type term (taxonomy category) is changed
  89. How to move a post to different post type with all meta data?
  90. Why do I have to press the “Update” button twice to save my meta box values?
  91. How can I display a drop-down select of Post Names
  92. how to show records that don’t have custom meta value
  93. sortable columns for multiple custom post types not working
  94. How check if a post is saved from backend or frontend?
  95. WP API Response does not show my registered metadata
  96. How to detect that the save_post hook is calling the callback associated to the current edit post page only
  97. $post->post_meta not pulling any post in wordpress/php
  98. Values from meta-box not on $_POST
  99. How to build a WordPress post review system beside commenting
  100. WP_Query of custom post type sorted by meta_key has unexpected results
Categories custom-post-types Tags actions, custom-post-types, hooks, post-meta
Child theme’s style.css is loaded twice
Export WP Subsite DB Fully Ready for Import Elsewhere

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

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress