Articles of metabox

Custom Post Type Metabox – Not Saving

I’ve added a custom post type, which is working great; I’ve also added two metaboxes, which appear to work well, but the content in them always disappears after a few minutes. If anyone could help out on this I would be eternally grateful, S. //meta box code// add_action( ‘admin_init’, ‘add_custom_metabox’ ); add_action( ‘save_post’, ‘save_custom_details’ ); […]

Add Meta Box not showing on New Post – Custom meta box not showing

This issue has plagued me over a couple projects. I used the default WordPress class-based template provided in the Codex to start, and built outward. The only issue I face is that my custom meta boxes will not show when creating a new post (add post). This is usually in conjunction with custom post types, […]

Dynamically add / duplicate custom meta in custom post types

I am using Custom post types in one of my themes I have one custom post type called “accommodation” with meta boxes to add details such as type of rooms (single, twin, double…); each room has a price according to different season (high season, low season, peak season – each could be ). However the […]

Is it possible to create a post using a metabox?

I am trying to create a post (well, in the end, multiple posts) from a metabox using the ‘save_post’ hook. I executed the script once, creating 3900 or so new posts before I crawled into posts.php and discovered that wp_insert_post() calls the ‘save_post’ hook. Does anyone have a creative solution around this to create the […]

Where did the Add New Custom Field go?

In the latest version of WP it’s gone. Why?

What are 'authors' in WordPress, and is there an author 'metabox class' available anywhere?

I am trying to outline a new project where I want to give my users the ability to customize their ‘profile’ pages in my website theme. Concepts like adding in their own background images, choosing templates etc. It seemed logical to me to store this information in the author meta, as that seems to be […]

How to add a select menu to this metabox code?

I’m using a metabox script that works great for having absolute control over the design and placement of the metabox fields. There is one problem: I can’t remember where I found the script and need to add a select box. This script does not use arrays as most metabox scripts do. What function can I […]

Display list of tags as drop down menu or radio buttons in a meta box?

I would like to group posts of a custom post type based on tags, but the default functionality does not do for the project I am working on. I want the user to be able to select only one tag, not multiple tags, from a list of all the tags entered for that custom post […]

How to add categories to page editor?

I’m trying to add the categories selector to the “page” editor workspace. The code below does the trick, however, none of the values are saved with the page. Any help much appreciated! add_action(‘admin_menu’, ‘my_post_categories_meta_box’); function my_post_categories_meta_box() { add_meta_box(‘categorydiv’, __(‘Categories’), ‘post_categories_meta_box’, ‘page’, ‘side’, ‘core’); }

Meta box dropdown of custom posts

I am trying to display a dropdown select metabox on the “add new” page of a custom post type which displays a drop down list of titles from a separate custom post type ( it’s an effort to relate the two CPT’s together – one being “clients” and the other being “projects” so that when […]