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

learn more… | top users | synonyms (2)

0
votes
0answers
46 views

Create new sidebars trough admin post/page metabox

I have this bit to register sidebars dynamically: function my_custom_sidebars() { $sidebars = get_option('my_theme_sidebars'); // get all the sidebars names if ( ! empty($sidebars) ) { // add a ...
0
votes
1answer
163 views

Display meta box on front end

I'm trying to add a meta box into a custom post type and display the text on the front end. I made a meta box as follows: array( 'name' => __( '<b>Schema</b>', ...
0
votes
1answer
102 views

How can I output WPAlchemy repeating fields meta values in my page template?

I have a custom post type, Downloads, which contains some custom metaboxes, including a repeating field. I'm able to output the values for all of them in my page template, but I'm not able to output ...
0
votes
0answers
62 views

MetaBox autocomplete field with another custom post type?

I am using the MetaBox.io plugin and creating a post type called "Book" which I am trying to relate to another custom post type called "author". How can I create a custom field for Books that would ...
0
votes
0answers
34 views

Query and compare multiple meta values

The problem: I have a custom post type of 'events' which has two metaboxes: cf_eventdate and cf_eventend. The first contains the event date, in the format: 2015-11-05. The second contains the end ...
1
vote
0answers
56 views

wp_editor in metabox not working

So, I've created a meta box within my page to allow my client to be able to add content into multiple different content blocks dynamically. I've done that using the wp_editor function like so. ...
0
votes
0answers
45 views

Custom drop down meta box not saving

I'm really struggling with my drop-down meta box. I created a custom post type, and am in the midst of creating shortcodes for recent posts, all posts and now featured posts. I created a custo ...
0
votes
2answers
76 views

Only allow one meta key value per post in a category

I have created a meta box for a theme I am working on, it is a simple meta box with a check box for featured post. The problem is user can tick that check box for multiple posts in the same category. ...
1
vote
0answers
27 views

Adding Page Templates to post but it ignored it

I follow the post to add the template metabox to a custom post type's editor, but it doesn't work. When I visit the post, it shows "NOT FOUND ANY POST" which looks like index.php or single.php ...
0
votes
0answers
18 views

create custom field dropdown

so far I'm using custom field on my theme to display dynamic content, for example: <?php echo get_post_meta( get_the_ID(), 'product', true ); ?> <?php echo get_post_meta( get_the_ID(), ...
0
votes
0answers
19 views

Meta Box not being added in plugin

I am attempting to create a simple oop plugin that registers a few custom post types and then adds meta boxes to that custom post type. It is currently adding the post type but it's not adding the ...
0
votes
0answers
22 views

Media uploader metebox

I have this code for adding your own metabox. It is to add custom metabox media uploader. I can not show in the template gallery. How to view the gallery in single.php? Thanks. ...
0
votes
0answers
58 views

How to export data from a custom Meta Box added into categories

I have a custom meta box (text input) in the categories to insert the 'Meta Description', and when I export the data by using Tools > Export, this meta box is not exported. Actually, the content of ...
0
votes
1answer
17 views

Alter add_meta_box

I am trying to create a custom post type (through a plugin). The post type must be pretty similar to a page, so I would like to load meta boxes from other plugins and theme in my custom post type. I ...
0
votes
0answers
44 views

How to call metabox value in custom post type query shortcode?

I am trying to make a testimonial shortcode. That is why I registered a custom post type and now trying to call it using shortcode. I also create a custom metabox for testimonial client country input. ...
1
vote
0answers
32 views

Is there a way to display metabox in frontend? How?

I was wondering if there is a way how to show the metabox in frontend. What i want to achieve: I want to be able to use the metabox to edit posts from frontend the same way i do it from backend. ...
0
votes
1answer
37 views

Metabox Keeps Stripping Parts of Shortcode

I am creating a custom metabox, and it will be filled with shortcode. The problem is, after I saved it, it keeps stripping / deleting the last part of the shortcode, like this: Suppose to be: ...
1
vote
3answers
1k views

How to add meta boxes to Pages

I'm almost complete whit my wp theme an I'm now translating it with the WPML plugin. This is working out great (even all my custom post types and meta boxes :) ), but of course there have to be a ...
2
votes
1answer
191 views

Adding Metaboxes - so much code is there a shorter DRY way?

I added the following two metaboxes to my functions.php file and it works, but it's a lot of code. Question: Is there a shorter or simple way to do this without a plugin? /** * Add custom fields ...
0
votes
0answers
16 views

Change the priority of multiple custom taxonomy metaboxes

This question has been answered here... Changing the priority of a custom taxonomy's metabox But I need more clarification... How does this work for multiple custom metaboxes? Let's say the ...
0
votes
2answers
50 views

Remove All in One Seo from Posts for Contributors

I am using latest version of All In One Seo Package. How can I remove metaboxes from posts for User Role: "Contributors"?
0
votes
4answers
877 views

How to Echo Metadata Value in Currency Format

I have a Custom Post Type with a Metabox and an input Text field for adding "Price" to the posts. Now I would like to display the input value which can be like 49 or 59 like 49.00 or 59.00 so far I ...
0
votes
1answer
65 views

Wordpress from url get external source title

Hi I am building a news website. I am trying to automate it. News url (metabox) Title Content area Image (featured image option on wordpress) When paste the site url I would like the other ...
0
votes
0answers
36 views

Checklist of all posts from a custom post type in a metabox

Suppose i have a custom post type named "product". i want a metabox where all the post title of product custom post type that is already published is shown with a checkbox. how can i make this and ...
0
votes
0answers
36 views

Meta values not returning in Meta Box

One of the custom meta boxes I added to a custom post type portfolio isn't displaying the values in the corresponding fields in the metabox. However, they are being saved and can be retrieved using ...
0
votes
2answers
14 views

Adding metaboxes to attachment pages

My script cannot save the value of the dropdown box. I could not find any helpful documentation on this topic, so I have decided to ask the StackExchange community about it. function ...
1
vote
1answer
3k views

Multiple Checkboxes Metabox

My goal is this: I've added an additional metabox to my post page. Within this metabox there are multiple checkboxes. Each checkbox is associated with a person's name. The idea is that, if a person ...
1
vote
1answer
23 views

Decide Metabox Configurations for All Users

How can I decide the metabox configurations for all the users on my website? Specifically the Dashboard metaboxes I want to make a default configuration for. Is this possible?
0
votes
0answers
45 views

Wordpress create simple input meta box

Hi i have a code that adds radio buttons on the post editor page i need to create simple text or textarea meta boxes. I am sure a little editing will do from the code below. Thanks in advance. ...
0
votes
0answers
101 views

Dynamically add text-field to a custom post

I have created a custom post called 'schedule'. In that I want a button, when user clicks on that new text-field should get added with name and all text field should have a same name.Also help me how ...
0
votes
1answer
64 views

How to rename “Publish” metabox title in post screen

I've looked everywhere trying to find how to rename the "Publish" metabox title in the WordPress backend post screen. There's help for every other metabox for changing titles and there's help for ...
0
votes
1answer
22 views

CPT posts in drop downed in meta box on page doesn't return post ID

I have an issue with displaying ID of selected post. Could you guys help? thanks Function below add_action( 'add_meta_boxes', 'cd_meta_box_add' ); function cd_meta_box_add() { add_meta_box( ...
0
votes
0answers
32 views

Ridiculous problem with CDATA [duplicate]

I'm using this great metabox plugin: https://github.com/WebDevStudios/CMB2 I created a repeatable field (with only one textarea that you can duplicate) It's working great. Now, I want to export some ...
1
vote
1answer
329 views

Display oembed in repeatable metaboxs using CMB2

I'm using CMB2 to set up a repeating field of meta boxes but I can't find any documentation on how to get a repeating oEmbed field to display on the front end. With the code below I have the metabox ...
0
votes
0answers
62 views

Correct way to create a select list in one metabox of custom-post-type

I'm trying to make a custom one from dropbox type within another custom type with popular and use the information but after that the post that estpu working to change the type of this type in the ...
0
votes
0answers
109 views

Meta box field in wp_query

I am working with a recipe site. I need to filter some meta box field in my wp_query. But I can't. I have searched in google 2/3 hours. No solution. Here is my code: // Meta Box Field array( ...
0
votes
1answer
114 views

How to check if meta box value is false for all posts then do something based on that

I have the following code in template-home page which queries for a custom post type, called reviews. I have a Meta Box for the Custom Post Type where I can write the Author, Article Link, an excerpt ...
1
vote
2answers
3k views

How to batch update post content with custom post meta value

I have a custom meta box, using WPAlchemy, in which I am looking to get rid of. However, I would like to get all posts that have a specific custom meta value set, and insert it into the begininning of ...
0
votes
0answers
119 views

Image URL not added to Input Box from Media Library

I hope this posts correctly. This is my first time submitting a question here. I am uploading an image to a Custom Post Type - Meta Box. However when I upload the image to the media library the URL ...
0
votes
1answer
52 views

How do I save Multiple fields in a meta box?

Currently I am doing public function prfx_meta_save ($post_id){ if (isset( $_POST[ 'firstname'])){ update_post_meta($post_id, 'firstname', $_POST[ 'firstname']); } if (isset( ...
0
votes
0answers
18 views

meta boxes and about relationships

i see in this link http://jancbeck.com/articles/relationships-between-wordpress-post-types i can't find meta-boxes in last version of wordpress and heres the code i can't make it work ...
0
votes
0answers
48 views

How to edit taxonomy terms fields directly from post editor?

When adding a custom taxonomy to a custom post type, a taxonomy meta box appears in the CPT editor where author can add terms to that CPT within the taxonomy. But the question is: Is it possible to ...
6
votes
2answers
300 views

How do the 'tag' and 'category' (default) taxonomies do 'save_post' action?

I am trying to replace the categories metabox with what looks and works like the tags metabox because there's too much hierarchy and scrolling to check the appropriate categories and sub-categories ...
2
votes
1answer
158 views

How to hide meta box values from custom fields list?

I have created a metabox : function drama_description_metabox_markup() { global $post; $drama_description_metabox_markup = get_post_meta( $post->ID, 'drama_description', true ); ?> ...
0
votes
0answers
26 views

Image didn't load from taxonomy's custom meta field

adding some custom fields (image field) to custom taxonomy (issue) basing on code from (https://github.com/bainternet/Tax-Meta-Class), trying to out put the image attached to each taxonomy term by ...
1
vote
0answers
68 views

How to create a repeatable / reusable divs in the metabox?

I have a meta box: <?php function custom_meta_box_markup() { global $post; $meta_box_text = get_post_meta( $post->ID, 'meta-box-text', true ); $meta_box_text_day = get_post_meta( ...
1
vote
1answer
48 views

What Can I Use To Add A Custom Button Between Publish button and Move To Trash?

I want to insert a custom button between "Publish" button and "Move To Trash" link. What can I use to make this? Here is a screenshot to make this clearer: I know I can use jQuery, but I want to ...
0
votes
1answer
349 views

Front end post and upload file, image for users without plugin

I have the condition as below :- There are multiple users who have to post their own post on respective post types(like news, reports etc) with feature image upload, extra file(pdf,txt,excel) upload ...
0
votes
1answer
25 views

Append custom field items to content from plugin

I know you can use add_filter( 'single_template', 'modify_page_template' ); function modify_page_template($single_template) { global $post; if ($post->post_type == 'post' || ...
0
votes
1answer
125 views

Meta box data is saved but NOT displayed in the meta box text field. Why?

I have a custom post type and I created it using the following code. /* DRAMAS */ register_post_type('dramas', array( 'label' => 'Dramas', 'show_ui' => true, 'supports' => ...