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

Custom Fields Not Working In Footer

Ok, since we’re going the post meta route (as opposed to options), there’s a much cleaner and efficient way to grab a post by it’s title:

if ( $info = get_page_by_title( 'Business Info', OBJECT, 'post' ) ) {
    // do stuff
}

Don’t let the page in the function name throw you off – the third argument is the post type (in this case post).

Secondly, let’s find out what’s actually going on:

if ( $info = get_page_by_title( 'Business Info', OBJECT, 'post' ) ) {
    echo '<pre>';
    echo esc_html( print_r( get_post_meta( $info->ID ), true ) );
    echo '</pre>';
} else {
    echo 'Oh no!';
}

Report back with you what you get from the above debugging snippet.

Related Posts:

  1. How to get custom post meta using REST API
  2. What is “meta_input” parameter in wp_insert_post() used for?
  3. The “_encloseme” Meta-Key Conundrum
  4. Using get_post_meta with new_to_publish
  5. So much data in postmeta
  6. Can I count the number of users matching a value in a multiple value key?
  7. Auto sort the wp-admin post list by a meta key
  8. Allow user to create instances of custom field
  9. Is there a hook / action that is triggered when adding or removing a post thumbnail?
  10. Get updated meta data after save_post hook
  11. Save HTML formatted data to post meta using add_post_meta()
  12. Ordering posts by anniversary using only day and month
  13. How to break meta values into different items and avoid duplicates?
  14. ajax delete value from custom field array
  15. Save attachment custom fields on front end
  16. How to use pagination with get_post_meta
  17. Custom fields: In what order are they saved into the DB?
  18. Transition from (classical) serialized custom meta field to (gutenberg) rest enabled meta
  19. Unable to show ACF’s Image Custom Field properly in Genesis Framework [closed]
  20. Custom field value based on other custom field values
  21. Author Page Custom Query WHERE author OR [post meta value] OR [post meta value]
  22. How to display Meta Field Value?
  23. MySQL query to set wp_postmeta using term_taxonomy_id value
  24. How to Validate Post Meta type/extension (Video File Image File etc)
  25. Custom Meta Box not Saving in Posts with Gutenberg Editor
  26. Combine multiple custom field values into single value
  27. How do I use wp_query for WordPress search?
  28. Nav Menu – Add class based on meta keys
  29. How to wrap meta values seperated by comma in ? [closed]
  30. Bulk remove post meta
  31. How to create html block to display extra information on woocommerce single product page
  32. Can’t get post ID using wp_insert_post_data
  33. Unique Post Meta Values
  34. Run a check for multiple meta key values
  35. WordPress Rest API to call page data associate with custom meta
  36. Store array as single, serialized post meta field or many post meta fields?
  37. Hide custom meta data if empty
  38. How to create a shortcode to print specific values stored in a post meta array?
  39. Add custom field to all posts in specific post_type
  40. Button inside Custom Meta Box triggering the Update Button
  41. How to load an assets based on custom field value?
  42. get_posts in meta box dropdown not showing latest posts
  43. Limits, not all post are showen when querying for posts by view count
  44. Display Custom Meta Box Field Only If Value is Present
  45. Ordering posts by custom field named “date” in backend
  46. Stop sending email everytime I updates my post
  47. Best way to store everyday post views?
  48. Unable to get specific value from post meta
  49. Custom meta is not being saved
  50. IF Custom field value equals ZERO
  51. How to use media upload on metabox post page without breaking TinyMCE?
  52. Let’s Create Custom Field Template Documentation
  53. Branch made by several custom values
  54. Looping inside block return
  55. WordPress creates new lines in postmeta table on post update
  56. change order of images attached to post
  57. User customising position of WordPress Featured Image
  58. how can I show name and value of Custom Fields together?
  59. Can I save post meta programatically without setting metaboxes?
  60. Insert image into sub-field with update_post_meta
  61. How to use conditional statement with custom field
  62. Meta box values are displayed on Custom Fields list. Is it possible to hide them?
  63. Gravity Forms Update post meta from template [closed]
  64. Best way to achieve multiple links in a post title
  65. How can I add/update post meta in a admin menu page?
  66. Get author total post votes from post meta
  67. custom filed from post in the side bar
  68. wordpress multi user question
  69. How to display custom fields in hestia theme
  70. Adding Custom Metadata to my Archive/Posts page
  71. How to improve my non-unique metadata MySQL entries?
  72. How to speed up post list slowed by update_meta_cache()?
  73. WordPress Blocks, setAttributes not saving
  74. Custom Fields Not Showing (ACF not installed)
  75. SQL query to change the value of a Custom Field
  76. Custom meta POST request fired twice when updating a post in Gutenberg
  77. Add custom field information to source meta data
  78. How do I update custom field post meta in frontend post template?
  79. Update custom field on page specific to logged in user
  80. How to Find List of Available Custom Fields for Theme?
  81. Create Meta boxes dynamically
  82. Saved Post Meta Array Returns as String
  83. Delete custom meta
  84. Problem saving meta data
  85. Check if value exists before saving
  86. Get meta value when the page is a blog archive
  87. change attachment custom field onChange event
  88. wordpress simple post multi rating with post_meta and user_meta
  89. wp_postmeta are updated for only one page
  90. Custom fields / meta box output
  91. Use custom field value as href
  92. Make Custom Fields Public in JSON – API
  93. Colecting values from custom field checkboxes and displaying them in the post
  94. Build Array from Input Fields question
  95. Order by a meta field in query loop
  96. How can i put a custom field inside this php
  97. How to add new Metadata options (Date, Author, etc.) for Posts?
  98. Saving multiple custom meta box fields
  99. Search for meta_query does not return any result if combined with title
  100. What is the best way to get a different post’s custom field/postmeta with js?
Categories custom-field Tags custom-field, footer, post-meta
class-oembed Error
.htaccess redirects for posts in new directory and new domain

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