Because the third parameter/argument in the add_meta_box
function expects a callback function name, which in your case as you have supplied is homepage_meta_box_display
. However you still haven’t defined that function yet.
The callback function is basically used to output the meta box content, anything that you would like to show up in the metabox you are creating. So you should supposedly be defining the function in a manner shown below:
function homepage_meta_box_display( $post, $metabox ) {
echo 'Whatever goes here shows up in the metabox';
}
You can change it to whatever you want the metabox to display. Additional reference: https://developer.wordpress.org/reference/functions/add_meta_box/. And there is an example on that page too: https://developer.wordpress.org/reference/functions/add_meta_box/#div-comment-342.
Related Posts:
- Lost in creating multiple meta boxes
- Using OOP in themes
- How can I allow the Editor Role to change Theme Settings?
- Best way to include Bootstrap in WordPress
- Undefined offset: 0 in > […] /wp-includes/capabilities.php on line 1067
- Editing Links in the Footer of WordPress Themes with Base64 Encrypted Code?
- How to set two different themes on one WordPress? (Desktop vs. Mobile)
- How can I add a set featured image function to a theme that doesn’t already have it built in?
- Display custom_background outside wp_head()
- register_theme_directory and broken deploys
- switch a theme different per user role
- How to make alert for new version on theme options?
- Can we create a child theme for a premium child theme built on Genesis framework?
- WordPress ignoring specified template for front page. Why?
- Migrating October CMS to WordPress
- Delete database tables on theme uninstall?
- Why are my sidebars not registering in unit tests
- get_template_directory has an odd functionality
- Theme editor not showing correct index.php
- How to start learning CSS and theme development?
- How do I make the category template display full posts instead of partial posts?
- Does uninstalling a WordPress theme delete its database values?
- How to set different settings for a mobile theme?
- How to set a single theme directory on a multisite blog?
- PHP Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) on line 230 [closed]
- Child theme not using parent theme css/styles/formatting?
- What’s the proper way to include inlined javascript-source?
- Create register form without a plugin
- Retina JS not working
- Get WordPress to use another custom “author.php” file (“custom-author-file.php”)
- wp_add_inline_style() not working?
- X-Axis of Site is Messed Up Because it is in Hebrew
- How to create my own sidebar in Twenty Eleven child theme?
- JavaScript Files Registered in Parent Theme Won’t Load When Calling wp_enqueue_script() in Child Theme?
- WP can’t create new directory
- style.css not reflecting changes. I have no cache installed
- Is it possible to create child themes using the WordPress Dashboard?
- Can I use wordpress themes without wordpress?
- Need help with making a website where user can add products
- Determing number the query ran by core wordpress
- Preserve theme settings when migrating from local to live
- Unable to access wordpress login.php [closed]
- Permissions for installing themes and files in general?
- Can I change the WordPress default color?
- Enqueue custom css file on specific page
- Translate a site based on different themes
- Any Good WordPress Themes Compatible With The BBPress Plugin? [closed]
- Template messed up on viewing posts
- Newbie wordpress question re banner height
- How to add custom JS file in WordPress Child theme with get_theme_file_uri
- Adding the jQuery to my theme that already exists in WordPress?
- Interpretation and explanation of register sidebar
- Removing the references to the wp-content folder
- Show hyperlinks only when user is loggedin
- What data does WordPress theme update pull If there is an update?
- Cannot update a file for my theme
- remove theme’s name from dashboard .. How?
- how to stop a gallery slideshow
- How can i set default pages to a word press theme? it shouldn’t be changed even if i install the theme in different host
- WordPress 2022 template, how to see the blocks added in post template on post edit?
- Two themes using a Multiple Themes plugin
- Broken theme, stylesheet is missing after uploading the right theme via FTP
- I cannot get an Advanced Custom Field code snippet to work – and ACF support say it should work
- Theme seems to be preventing me from adding a new page to my site
- WordPress margin issues
- 12 column grid layout
- Remove style id inline CSS in WordPress
- How to find file that placed a line in my header
- Where to find child themes?
- how to create a section inside a section with theme options customizer
- WordPress thinks my custom theme is a theme in the public theme repository
- Warning: call_user_func() expects parameter 1 to be a valid callback
- Phone numbers showing same color as header [closed]
- Changing themes on locally hosted webpages
- Changing admin Textarea to integrated WP editor
- Line break no working on theme
- What is the template file for topic layouts in bbPress?
- Style of a theme
- Orion theme (from theme forest) [closed]
- QA/Staging envirnoment for wordpress sites
- Showing wordpress theme demo at front end
- Diagnosing a connection reset problem
- Create /archive page in WordPress Theme
- Customising a theme
- Blog shows up without Theme/CSS styles
- Boldy theme – Regarding the images above the boxes
- Symbolic Links for themes – linking one theme to many wordpress installs
- Fatal error: Call to undefined function get_header() and BuddyPress [closed]
- hardened wordpress linux install
- which theme is this? [closed]
- JQuery Error in theme for .live is not a function [closed]
- How can I either move the nav bar down or create more space for the header? Theme – Ajaira
- To create a theme or use an existing one? [closed]
- Overwrite functions.php of a theme – What if the theme is updated?
- How to add/edit content Custom Content item in theme
- Is there a WordPress theme for twittstrap? [closed]
- Using AJAX to Update WordPress Theme
- Wrong theme being activated
- I am unable to remove “© 2022 My Blog | PopularFX Theme ” from footer [closed]
- Workaround AJAX calling without directly calling WordPress backend (Admin dashboard) because it is restricted to the end user (the public)