WP_Post
has a property post_parent
by default. Usually this is used for parent-child relationship on hierarchical post types, such as pages, but nothing actually prevents you from linking two different post type posts together with it.
You’ll just need a metabox on your travel report CPT, which allows you to select an author CPT post (id) as the parent. This select should have post_parent
as its name so that the value gets saved to the right property.
Related Posts:
- Allow member to have access to custom post type only. Permission to only edit their own posts
- add_rewrite_endpoint() not working for custom post type archives
- Pagination with custom post type not working
- WP_Query() show posts that end later than today
- How do i display the post type title?
- Sorting a query by custom field date
- custom post type archive page url to point to Page permalink
- How to hide CPT files from media library programmatically
- White screen error for a custom theme
- Custom post types – RSS lastBuildDate issue
- Determine which template-{slug}.php is being loaded
- How to remove/hide elements from the admin menu?
- disable /feed/ for custom post type
- Archive page for taxonomy of custom post type
- CPT tax slug conflict with post type slug
- $wpdb returns no results with SELECT query on custom post type, works on default post type
- Display Post Author for Custom Post Type in Edit-Post Screen
- Exclude current post when getting related post on custom post type and taxonomy
- Upload Image from Front End and Resize
- Multisite with a single, shared custom post type, while retaining site URL
- How can I display my custom metaboxes on a custom post template?
- “Allow Comments” box cannot be checked
- How to specify URLS for custom posts & taxonomies
- Allow Administrator role access to custom capabilities [duplicate]
- Second Custom Post Type Archive
- Delete link on single-custom.php with redirection
- Creating Multiple Loops in Genesis, One Post then 20, each with custom fields
- custom comments on specific post type
- Single Template for Custom Post Type stops working after WordPress 5.4 update
- wp_insert_post generates endless posts
- How can I make my custom posts appear in their assigned category url?
- WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term
- child of post type (custom)
- Rewrite rules for custom posts types
- Allow user to set custom order to a list of custom taxonomies?
- WordPress wrapped added a span tag to every single p tag
- Custom post type archive page blank
- Custom Widget WP_Query problem
- Dynamic Custom Fields
- Removed custom post type slug but not working for child pages
- Terms showing up in object cache on unrelated pages
- Show Custom Post Type meta boxes only on Page Edit
- using wp_update_post for updating custom post type
- How can meta boxes be added to “unknown” custom posts?
- Best way to specify “article type” in URL
- link to a random custom post while excluding current post
- Custon Content within WordPress Loop
- show all custom posts types in home page
- How to group navigation items in the admin panel
- Create Array from custom post type to display a slider
- Creating a website with EVENT post type and PAGES as subpages of those EVENTs
- Fix permission error for deleting custom post from front-end?
- Custom Category Walker with Image, Fallback to Most Recent Post in Category Image
- How to set the mainpage of a custom post type?
- How can I output WPAlchemy repeating fields meta values in my page template?
- Displaying a list of Contacts
- Custom Sidebar in Editor (not Widget) for Custom Post Type in Genesis
- Questions regarding add_meta_box()
- Loop Post Types with Name and Links
- How to Control CSS Class Visiblity From WordPress Admin Panel based on Tax Terms
- Problem retrieving informations and displaying desired structure with custom post type and taxonomy
- Best Way to Query Custom Taxonomies Used on Custom Post Type
- Galleries of images attached to posts
- Last post in loop – custom post types
- Adding Category Name in Slug in Custom Post Type
- Add Tags to a Custom Post Type from a FrontEnd Form
- Archive page of CPT’s custom Taxonomy
- Custom Post Type add_rewrite_rule
- Post type to appear on every page on site
- How to show related posts of category on post within custom posttype
- Saving custom JSON as custom post type
- Preview url not working outside wp-admin
- Get custome post type name
- Custom search for a custom post type in WordPress
- How can I group by Taxonomy on Custom Post Type while filtering out based on custom Meta
- Remove wp directory and slug for custom post type from the URLs
- Loop carousel slider in wordpress
- How can I add a “fake” parent into the permalink?
- Best way to structure article and issue relationship for CPT
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- Custom Post Type used for FAQs Accordion
- Custom Post Type vs Shortcode: Which one is more performant?
- Custom post types working in functions.php but not in plugin
- Change column of row action (Quick Edit) links in WP_List_Table
- Show list of categories in post editor only from current custom post type
- Custom Post Type Slug / Page Slug Conflict – Prevent use of reserved slug on page save?
- How do I add a checkbox option to this custom post type code?
- Comment moderation with disqus comments
- 404 on Pages for Custom Post Type & Query_Posts
- Classic Custom Post Types and WP-PageNavi
- Can I set a CPT title field to a dropdown with preset options if user is of a given type?
- List of filtered Events is breaking paging?
- Permalink of Custom Post Type
- Show one of the taxonomies always as default
- How can i manually relate pages?
- has_archive for default post type
- Pagination for Custom Post Type with Multiple Types
- Custom Post Type Archive Title Lowercase
- From form submission values – dynamically update CPT “has_archive” slug and custom taxonomy “rewrite” slug value
- Custom Post Type slug has the same Redirection entry