I believe the issue is this line:
if( $post->post_type == 'startups' ) return;
Won’t your custom posts always have the type startups
? Basically you are telling your code that whenever I save my custom post type, ignore my custom fields. You probably meant to have one of the WP reserved types (e.g. revision
or attachment
) that would prevent your meta data from being overwritten in inconvenient ways.
I would change that line to
if( $post->post_type == 'revision' ) return;
Or you could remove that line entirely (for testing purposes).
Related Posts:
- What Can I Use To Add A Custom Button Between Publish button and Move To Trash?
- Using Custom Posts with Metaboxes and Drop-downs
- Adding custom fields to bbpress reply form
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- Simple Custom Metabox Not Saving
- Adding an option to post editor to show a site disclaimer or message
- Display metabox with date
- How to display by default only published posts/pages in the admin area?
- Post/Page Preview Template
- Using single.php from plugin folder instead of default template folder
- using wp_update_post on save_post
- WordPress plugin to publish to multiple remote WordPress blogs
- How to add metabox for post of specific category
- How to batch update post content with custom post meta value
- How to disable drafts?
- Custom Post Type Pagination Doesn’t Work in WordPress 3.4
- How to wrap every image in a post with a div?
- Post from front-end only by logged in users, form posts as “posted by:
- meta_box or custom_field as a second tinymce post-instance?
- Show One Category on Post
- Create A Metabox For A Custom Field
- WordPress Delete hook with wp_delete_post function?
- Order post by year DESC and month ASC
- Why does `url_to_postid` return 0 when testing `page_for_posts` Page?
- Do I use custom post type or something else?
- Delete Post From Front-End and attachment permanently
- Custom post type permalinks breaking due to 3.1 bug fix
- ‘Invalid post type’ error when importing from one site to another
- Blogroll – Different layout for first post
- How to delete old posts’ edits to save space?
- Automatic value for custom fields for posts
- Archive Page for Custom Post Type is not Working
- Filter Custom Post Type by Category with Ajax
- How to make number of blog posts a custom field?
- WordPress blog or WordPress website
- Hiding Draft Post In Admin
- Show posts by a custom post author
- Meta value does not save for scheduled posts
- Search results posts_orderby and ID
- Making a custom Pagination for multi page blog post
- Unable to restore from backup – how to obtain old blog posts?
- custom post template file not shown, instead all the time 404.php
- Custom Post Type Rewrite To Include Parent Page(s)
- Thumbnail & Category link aside post
- How to save meta checkbox WordPress
- Custom taxonomy archive page problem
- Custom Post Type archive
- WordPress custom post type with folder structure in slug
- Upload attachment from external site
- How to add automatically bootstrap 4 order-lg-1 and order-lg-2 classes for columns in foreach loop based on the count?
- How to add convenient buttons for new custom post statuses
- Show custom post with custom categories with specific slug
- Auto delete posts based on content text
- How to call posts under a specific category on static front page?
- Display value of custom field at the beginning of a post
- Optimize CPT-function with a loop
- Add post tags to previously created custom post type
- How to display only one category in a custom post type?
- Why my meta boxes won’t show in front post page?
- add_rewrite_rule and template redirect not working
- How to get value in radio input in post meta box?
- Changing permalink of WordPress
- Hook save_post_cpt not triggered when custom fields are modified
- Turn off display for custom sidebar post widget when on the post it’s displaying
- Display default matabox of posts(add category) wordpress
- How to bulk Update URLs to new values?
- Include Recent Post in Category
- Pagination Not Working With Custom Post Type Category
- WordPress Pods Custom Post Type – separate Media Upload folder for each custom Post Types
- Hide or remove custom post status
- Put page on Archived statut after end of publication date
- post and page and custom post type
- My posts page is missing the page title
- I need show posts by customer (Shortcode)
- Show custom post category for single post
- How can change header text in post careate/edit form
- How to get meta data from custom category name
- Add Categories To Custom Post
- How do I set content in my pages so that it remains permanent while blog posts are added below?
- how to redirect page after delete post inside a post page?
- Permalink base only for posts
- Difference between modified post and new post
- Creating widget – ask for selecting a post in the admin panel
- issue in wordpress auto delete post and redirect to another 1
- wp query custom orderby not custom field
- Customizing individual images on posts
- Remove All in One Seo from Posts for Contributors
- How to retrieve custom field values and save again as array
- Is there a Standard Format for Clean URLs for Archives of Custom Posts?
- How to modify specific parts of a post content in WordPress
- Include post on external custom site
- Run Jquery Script after delete post in front end
- Checking if some condition is matched before inserting post into database
- Successive creation of over 1000 posts causes 404?
- How can I allow users (subscribers) to download selected posts into a single PDF? (RESOLVED)
- How remove “recent comments” title without modifying code? [closed]
- Default post type doesn’t display in url
- Dynamic Menu Item
- Need to show birthday of custom post type(Famous people in this case) in elementor. Date of birth set in custom fields
- I have a website issue I am trying to resolve