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

Change post format using custom field

If the plugin works the way I think it does, you could try changing the priority of your gateway_set_post_format function being added to the save_post action.

Your plugin may have a larger priority number which would make it fire later than yours.

If the plugin does not change the custom field value until after your function is run, then that could explain the current behavior.

add_action('save_post', 'gateway_set_post_format',999, 1);

I hope you get it sorted out.

Related Posts:

  1. Update all posts automatically when using post_meta
  2. Better post meta efficiency?
  3. Sanitizing `wp_editor();` Values for Database, Edit, and Display
  4. What Is meta_id In wp_postmeta?
  5. Add custom field automatically (add_post_meta) with value based on number of words of article
  6. How can I sort posts by the date and a custom meta field?
  7. Cannot retrieve a custom RSS field from posts
  8. Customize rel=canonical tag for single blog post
  9. How to I retrieve the ID from the Posts page?
  10. if in category but only with post meta
  11. Saving Post Data in Another Database
  12. Add multiple meta keys to a post at once
  13. saving/reading custom field value does not work – no value gets POSTed
  14. Post meta not working
  15. How do you update post date (year only) in a separate custom field?
  16. WP_Query sort by meta_value_num or date
  17. Creating Ordered Query using Meta_key
  18. How enter custom post meta or custom field on box post list archive page?
  19. How to update custom fields using the wp_insert_post() function?
  20. How to check if post meta key exists or not in wordpress database
  21. How to add category to: ‘wp-admin/post-new.php’?
  22. How to protect pages with double authentication: password + email (in custom field)
  23. How set featured posts using checkbox in post edit screen?
  24. How to validate XML-RPC post creation and cancel when needed?
  25. How can I retrieve multiple get_post_meta values efficiently?
  26. Code to make a post sticky
  27. How to allow hidden custom fields to be added from wp-admin/post.php?
  28. Add a checkbox to post screen that adds a class to the title
  29. Custom Field in Featured image for A particular post
  30. Export WordPress Posts and Meta Information in CSV format
  31. Delete duplicated wp_postmeta record
  32. Convert custom fields to post categories
  33. Will a large postmeta table slow a site down?
  34. Most efficient way to insert a post outside WordPress?
  35. Post Format Archive template name for theme folder?
  36. Display posts for a single post format
  37. How to batch update post content with custom post meta value
  38. Get post only from ‘standard’ post format
  39. Change slug with custom field
  40. I am trying to create a simple frontend form for posting
  41. Prevent duplicate posts in wp_insert_post using custom fields
  42. HTML code in Custom field
  43. How to show posts rank based on custom field value
  44. Setting post meta data to random value during post status transition / on publish
  45. Add custom field to all posts in specific category
  46. Adding a Nav menu to post admin
  47. meta_box or custom_field as a second tinymce post-instance?
  48. Edit meta data does’t work with custom sql
  49. Guest Author – How to modify my custom function code if the guest author URL will follow a particular pattern/format?
  50. How to edit layout of a particular post format?
  51. Create A Metabox For A Custom Field
  52. Paragraphs removed when using get_post_custom()?
  53. Human Time Diff, change mins to minutes
  54. get_post_custom stripping styling issue
  55. How to enqueue scripts depending on post formats?
  56. Does WP get all post_meta on POST page?
  57. Populating a page with content from post custom fields
  58. How to change what the post creation page looks like?
  59. How can I make existing custom fields easier to edit/add in my theme?
  60. Exporting Data from WordPress into a flat table
  61. Adding Multiple Values to a Post Meta Key
  62. Add custom fields to post programmatically
  63. How to get Advanced Custom Field Value According using POST ID? [closed]
  64. Using radio button meta data from a custom meta box
  65. Autoremove empty custom fields
  66. How to add a custom field after wp post
  67. Custom fields on a virtual page
  68. PHP Notice error (when on 404 page)
  69. How to load a different header based on post format?
  70. Get a custom field of all posts on current blog page
  71. Tumblr-like Post Types for WordPress
  72. Only display posts after current date
  73. Checking if a post with certain meta value exists
  74. How to permanently delete a post meta entry?
  75. Global $post not working in OOP function WordPress
  76. How can I get a post field value using javascript?
  77. Automatic value for custom fields for posts
  78. How to generate numbers indistinguishable for the IDs of the posts
  79. Modify WP_Post before processing
  80. Understanding and using metaboxes in posts
  81. Save re-arranged draggable post items to wordpress database
  82. XML-RPC and post_date
  83. I would like to give special promotion for the first 100 posts in my blog? Can anyone tell me how to do that?
  84. Change post_date to post_modified date on post template?
  85. Duplicating Table of Contents for Paginated Post
  86. Remove certain post-formats from showing in blog?
  87. Converting a dynamic piece of code using WordPress Loop into a static one using Post ID
  88. Guest Author – How to display posts on /author/ archive page
  89. WP_Query orderby not working with meta_value_num and menu_order
  90. is there a way to show the the post title after the image?
  91. Get Meta Key Value While Saving Post
  92. How to Link to all posts that have the Standard Post Format
  93. How do I correctly set up a WP-Query to only show upcoming event-posts?
  94. How to display Common posts from specific Tag & Category with Shortcode
  95. Update Post Meta for a logged in user
  96. Two Custom Post Types Many to Many Relationship
  97. Force the “Choose from the most used tags” meta box section to always be expanded
  98. Automatically add custom fields value to wordpress post
  99. How to use format post in a pertinent way
  100. Meta value does not save for scheduled posts
Categories posts Tags custom-field, post-formats, post-meta, posts, xml-rpc
How to reply to Buddypress notifications? [closed]
Show All Posts Insert Edit Link

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