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

Replace title column in post list with post meta value

You can use the_title filter.

add_filter('the_title', 'my_meta_on_title',10, 2);
function my_meta_on_title($title, $id) {
  if('booking' == get_post_type($id)) {
      return get_post_meta( $id, 'booking_first_name', true ).' '.get_post_meta( $id, 'booking_last_name', true );
   }
  else {
      return $title;
  }
}

Related Posts:

  1. Query all posts where a meta key does not exist
  2. what is the correct way to compare dates in a WP query_posts meta_query
  3. Admin Area Custom Type Search By Meta Fields Without Title & Content
  4. How can I filter posts by post_parent in the admin?
  5. How to create a mini directory in WordPress?
  6. Detect meta value changes when post is updated (post_updated)
  7. Search everything (posts, pages, tags, cpt, meta)
  8. Compare 3 custom fields and sort by oldest
  9. Reason action hook won’t work with update_post_meta from frontend form? Alternative?
  10. Can’t sort order of wp_query with 2 meta keys
  11. How to get source of custom meta image?
  12. update a post meta from a single table cell TablePress
  13. Custom Meta Boxes – Nonce Issue – Move to trash issue
  14. Displaying Meta Box Image
  15. ACF Upload Image in repeater from front-end with custom form? – add_post_meta()
  16. Displaying custom posts only if custom meta box’s date is not expired
  17. Displaying Metabox value (custom post type taxonomy)
  18. Meta Box Only in CPT Edit Page, Not in Add New
  19. get_post_meta is returning image id
  20. Custom Post Type, Saving Multiple Checkboxes
  21. get_template_part() – post-meta not working?
  22. Create a random unique 6 digit number as custom field for custom post type
  23. Export entries and multiple custom field meta to .csv?
  24. Metadata for a taxonomy – is there any WordPress way of doing this?
  25. Does WordPress limit the length of slug names for Post Meta or Terms?
  26. Populate Custom Fields in a Custom Post Type?
  27. Insert Multiple Post with Same Publish Button
  28. Update CPT post meta with update_post_meta and cron job
  29. Custom meta box data array: foreach not working correctly?
  30. Undefined Variable – Custom Post Type Meta
  31. How to check if user meta field is empty in conditional else statement
  32. Get posts between custom dates
  33. Getting meta in editor plugin, and event triggering issue
  34. A better way to add a meta box to custom post types
  35. Should wp_postmeta meta_key always be unique for a given post_id?
  36. How do I set all of a particular post meta to a value within the custom post type I’m in?
  37. Metabox not show in categories custom post type cmb2
  38. Storing a many to many post type relationship in post meta and keeping SQL ability for Joins
  39. Can’t publish custom post type – “You are not allowed to edit this post.”
  40. Filter date from post meta when date is in string format
  41. Get only used meta_values
  42. Is there a way to exclude posts based on meta_values?
  43. Submitting Custom Post Types with custom fields from Front-end form
  44. Get $post->ID from a URL
  45. Displaying a div from an assigned meta_value when on a page
  46. Setting Post Title via Meta Data returns Auto-draft
  47. How to Echo Metadata Value in Currency Format
  48. Filter posts by tax (dropdown) and meta value
  49. Publish and save specific postmeta to a filtered post_type
  50. Custom post type suddenly stoped working after WordPress 5 update
  51. Batch Extract Date from post title and put into ACF custom field
  52. How to show custom field on specific custom post type posts only when filled
  53. How to handle this specific case of custom post type?
  54. Save CTP post meta different values each day without overwriting previous values
  55. get_post_meta returns NULL in front-end, but correct result in back-end
  56. is_main_query() never called on WP 4.4
  57. Meta box data is saved but NOT displayed in the meta box text field. Why?
  58. Related posts meta_query CPT
  59. Meta box with front-end styling
  60. Sanitaizing Select Optin For Custom Post Type Metabox in WP
  61. Cannot Save MetaBox Data in Custom Post Type
  62. Getting WordPress to store 0 values for custom post type meta
  63. Say I have a tech blog, how best would I store technical specs for a phone, if i use custom post types
  64. Problem Saving Custom Post Type Meta Values
  65. Hide title field of selected post-types on edit pages
  66. Get_post_custom not fetching value from array wordpress
  67. Save data is post using php front end
  68. How to keep custom post type related information
  69. Can’t save meta box data in WordPress using custom post types
  70. Creating a custom post type upon registration for a specific user role
  71. How to sort by multiple values in a nested WP_Query
  72. Where is get_post_meta value located?
  73. How can I use a custom template to load custom post type posts based on a post_meta value
  74. How do I create a customised table list of a custom post type (in the admin area)?
  75. How to properly get the wp_postmeta.meta_value of a custom post type in specifics?
  76. How to save post_status using action save_post?
  77. Custom post meta box as a sub form
  78. Metaboxes in Loop
  79. Custom meta box data not saving
  80. Collect custom post in a calendar
  81. Storing data in a multidimensional array from dynamically generated foreach loop
  82. How can I get the $key / $value pairs of custom fields that were added via 3rd party plugins or themes?
  83. meta query always fails even if data is correct
  84. Values inside a custom field to determine which category posts to display
  85. Display a post count from a custom metabox selection
  86. How to rewrite CPT-Permalinks the correct way (incorporating meta-box-data)?
  87. Custom post type submenu sorted by specific meta_key & meta_value
  88. Advanced search form with filters for custom taxonomies and custom fields
  89. Top 30 Songs using Custom Post Type
  90. Advice Needed for Post Meta Database Efficiency
  91. Querying meta values within an array
  92. Post AND page parameter for WP function
  93. why get_post_meta is returning 0?
  94. Save post_parent in a custom post type
  95. How to display Author Profile based on Custom field value
  96. Automatically add custom taxonomy when meta value gets to a set number or beyond
  97. Display a list of posts whose meta field values are equal to the ID of the post being viewed?
  98. Update an existing post in a custom post type
  99. Check for custom field value in different post type than current one and do something
  100. I am having a problem with fetching product data in the Gutenberg block editor
Categories custom-post-types Tags custom-post-types, post-meta
limit characters when posting from form
WordPress (3.9.1) MultiSite Permissions. Is chown the answer?

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