Refers to a box-like reusable user-interface component common in the WordPress backend.

learn more… | top users | synonyms (2)

1
vote
1answer
157 views

Why do I lose the content of meta boxes when I leave the page?

So I've been coding a theme and I'm working on a custom post type. When I edit a custom post and save the changes (click Update) everything is ok. But - I noticed that when I leave the Edit page open ...
1
vote
2answers
840 views

wp_editor and WPAlchemy messes up tags when updating

when using wp_editor, I paste my text in the visual editor. If I switch to HTML editor, all of my tags are there. So far, no problem. When I update the thing, all of my tags appear in my visual editor ...
1
vote
2answers
1k views

Advanced Custom Fields

I am using the Advanced custom fields plugin to add a upload image option to a page, but I am wondering if there is a way so that, when I output it to a theme with <img src="<?php ...
1
vote
1answer
637 views

Show add_meta_box by selecting a specific category

In my plugin I want to display an add_meta_box under the WYSISWYG in the new post page, which is no problem and works fine. But the box should only appear when a specific category (example: category ...
1
vote
3answers
571 views

Change the post date from a meta box

I'm having a problem with updating the post_date in a custom function I've written. I'm trying to change the "post_date" to my custom "meta_date" value. Here is the function: function ...
1
vote
3answers
307 views

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 ...
1
vote
1answer
324 views

Change headline text for post thumbnail meta box

How can I change the headline text for the post thumbnail meta box in the edit post screen?
1
vote
4answers
1k views

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 ...
1
vote
2answers
1k views

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 ...
1
vote
2answers
3k views

How do I stop HTML entities in a custom meta box from being un-htmlentitied?

I have a custom meta box that is supposed to accept HTML, but the text I'm trying to input contains both double and single quotes (and ampersands), and it's messing up the saved data - each time I ...
1
vote
2answers
344 views

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 ...
1
vote
3answers
3k views

How to modify Publish metabox?

I'm trying to remove "Pending Review" (Status) and "Password protected" (Visibility) options from Publish metabox. Any ideas how can I do it?
1
vote
2answers
932 views

Change Metabox Title

Anyone know of a way to change the title of the core Wordpress metaboxes on a post edit screen? I'm trying to alter the title of the "Featured Image" metabox and have found a way to edit the contents ...
1
vote
1answer
74 views

Where did the Add New Custom Field go?

In the latest version of WP it's gone. Why?
1
vote
3answers
2k views

Conflicting save_post functions when passing the post id and saving custom meta boxes for different post types

Post save functions are conflicting with each other when adding them to the save_post action hook. 2 different custom post types with 2 different (one for each post type) custom meta boxes. I'm ...
1
vote
2answers
5k views

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 ...
1
vote
1answer
3k views

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 ...
1
vote
2answers
767 views

How to Move the Author Metabox into the “Publish” metabox?

About a year ago I remember seeing a plugin or some code which allowed you to add an author dropdown menu to the post "publishing" metabox instead of it being on its own. I can't seem to find this ...
1
vote
1answer
79 views

update_post_meta and get_post_meta not working

I am trying to get the input from a textbox and display it upon update. I don't know if the update_post_meta or get_post_meta is causing the problem. Code //Metabox Hook ...
1
vote
1answer
1k views

Custom Taxonomy as checkbox or dropdown

I have registered a custom tax to my CPT. On the edit screen the tax meta box appears with an autocomplete field. Is it possible to display it as checkboxes or dropdown instead?
1
vote
1answer
63 views

Customize Plugin

I am trying to create custom welcome panel in dashboard for WP and can't see where I went wrong. It's not allowing me to add html.
1
vote
1answer
402 views

How to remove a metabox from menu editor page?

I am not sure if it is much different for any page but I am wondering how to remove a metabox from the appearance>menu page without having to go into the wordpress core files and remove it. Is there ...
1
vote
2answers
856 views

Create custom PAGE with register_post_type

The following code in functions.php outputs a post when I publish, not a Page: // custom post_type for agenda add_action( 'init', 'create_my_post_types' ); function create_my_post_types() { ...
1
vote
2answers
402 views

List of Posts in a Custom Field

I have a question. I have a custom post type called Place. I have a situation that there can be place in place. I want to have a custom field parent_place where I could choose a parent of place. The ...
1
vote
2answers
821 views

Undefined index: at_nonce in custom post metabox

I'm getting this error with my custom post metabox. The custom post and metabox works fine, but if i have debug on and when i try to save any other page or post, i will get an error: Notice: ...
1
vote
1answer
287 views

Show how many images are attached to a post/page on compose page

On the front-end, I'm using a query to show all attachments attached to the current post. However, on the compose page, there's no way for a user to see how many images are attached without opening up ...
1
vote
2answers
570 views

Saving metabox repeatable fields

This is a code that I'm adapting from https://gist.github.com/2057532. The problem is that I'm not being able to save the content from the new fields that I created. I had checked the other questions ...
1
vote
1answer
45 views

Trying to limit access to custom meta box without success

I have this meta box that I have added to my site: // Assistant Editor Box add_action( 'add_meta_boxes', 'assistant_editor_box' ); function assistant_editor_box() { add_meta_box( ...
1
vote
1answer
440 views

Get Order of Meta Box in a Page/Post

I'm using the Posts 2 Posts plugin specifically, but I think this applies to any meta box. I have three Posts 2 Posts metaboxes on the side: "Related Case Studies", "Related White Papers" and ...
1
vote
2answers
415 views

special characters after saving draft interpreted as �

I am trying to create posts in hindi language. These characters UÉeÉMÑüqÉÉU after saving/publishing are interpreted as U�e�M��q��U. Though, the special characters are stored with no change in the ...
1
vote
1answer
972 views

How to create a metabox that will list all my pages in a dropdown selector?

I would like to have a metabox for the user to be able to select from a dropdown list one page from the website. I need to save the user choice, so I can use it later. So, my question is how can I ...
1
vote
2answers
1k views

Creating Custom Meta Boxes on Plugin Option Page

Right in my main plugin file, wp-email-capture.php I am calling this:- add_action( 'admin_init', 'wp_email_capture_add_custom_boxes'); This calls this function:- function ...
1
vote
3answers
945 views

Alternative to esc_textarea

I need an alternative function to use with textareas in meta boxes instead of esc_textarea. The problem is that when I use this function with textarea's it removes line breaks and paragraphs. Is ...
1
vote
2answers
396 views

Using My-Meta-Box-Class plugin, how is 'Date' value stored?

I've created some custom fields in a custom post type using the my-meta-box-class plugin which comes with a built in 'date' type of meta box input. I'm having a hard time ordering my custom posts by ...
1
vote
1answer
463 views

1 column admin screen options - move submitdiv to bottom

I'm using this code. add_filter('meta-box-order_post','one_column_for_all'); function one_column_for_all($result, $option, $user){ $result['normal'] = ...
1
vote
1answer
554 views

Changing the priority of a custom taxonomy's metabox

I'm creating a new custom taxonomy (not a custom post type). On the edit post page, this custom taxonomy is showing up above all of my other meta boxes. I'd like it to sink down lower in the group. ...
1
vote
2answers
287 views

Unbind postbox click handler

I'm trying to unbind the click handler on post metaboxes so they no longer hide when the handle is clicked. I need to do this because I use the handle to contain <select> elements & when ...
1
vote
1answer
1k views

How to display a custom post type's media library inline on meta box

I am trying to create a post type which only displays the Media Library Inline. I have got the example from this : https://gist.github.com/897503 However, nothing happens when I click "Insert ...
1
vote
1answer
85 views

dynamically generating plugin syntax

I have downloaded an audio player plugin for WP. the syntax is very simple. You just add the line [audio:my_file.mp3] to your post editor/excerpt, and call it in the loop with the_content() or ...
1
vote
2answers
448 views

Modules with meta box implementations

I am looking for some modules that implement add meta box as shown here perhaps with some ajax magic. If you have any modules I could check out would be welcome.
1
vote
1answer
351 views

Pull a post based on a meta value in a custom post type

I'm trying to display a post, from a custom post type based on a meta value in that post type, in this case a checkbox that says "if this is checked show it on the front page. Usually I write a ...
1
vote
1answer
401 views

Is there a need for nonce with Post Metabox?

I looking at the docs for add_meta_box. They used a nonce. wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' ); I am wondering, probably the save post form itself should already ...
1
vote
1answer
332 views

Populate Custom Fields in a Custom Post Type?

I want to set up a basic 'post rating' system for my site - I don't want to use a plugin - so I want to add the custom field 'rating' to each new custom post and populate this field with the number 1. ...
1
vote
1answer
191 views

Multiple Meta Boxes in separate files

So here's the problem, I want to have a few different meta boxes on my sites, but I'd like to be able to store each of them in separate files and included them into functions, so I can just copy ...
1
vote
1answer
958 views

post-excerpt not one of the options under screen options

I want to turn the post-excerpt function on but it doesn't even show as an option under 'screen options' for posts. How do I get it to display as a check box under screen options? I have tried ...
1
vote
2answers
741 views

Metabox saves on Update or Publish, but not on Saving Draft

I have created custom post types that also have custom meta_boxes I've created. Currently, they save when I publish or update a post, but they don't save when I'm in draft mode making changes. ...
1
vote
1answer
376 views

Change meta box when the page's template is changed

For my WordPress theme I have a custom portfolio post type and a portfolio page template to display them. What I want to do is add a meta box to the edit page area, but only when the page has the ...
1
vote
1answer
449 views

metabox with custom post type values

I need to re-write a current WP website and I think Custom post types are required, combined with Meta Box. The basic layout is Author (custom) Books (custom) Photos (custom) All 3 custom post are ...
1
vote
1answer
19 views

Display custom post on home page based on a metabox selection

I am trying to display an post to my home page based on a selection. What I mean is in the backend I have a custom post that has a metabox labeled Assign to Home with a drop down that has a selection ...
1
vote
1answer
319 views

How to add metabox for post of specific category

I want to add Metabox for the posts of category=18 and i am using the following code but unable to do so . So please help me out-> add_action('admin_init','my_meta_init'); function my_meta_init() { ...