Questions tagged [metabox]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
11 views

Create Post Types from a XML url (Real Estate website)

I have a URL provided by my Real Estate service that lists, in a XML file, every apartment and house that I have to sell. The XML url lists every detail of every apartment, things like images, year ...
0
votes
2answers
20 views

Find a way to retrive data updated through metabox plugin to web page

I developed a customer metabox plugin to save user details to db and retrieve them back to Contact Us Page in my website. But I searched a way to retrieve the data to contact us page and I couldn't ...
0
votes
0answers
13 views

Custom Meta Box (SELECT2) Giving Wrong Taxonomy Tag

I have update this code, Category taxonomy working fine, but tag taxonomy not working. /* * Add a metabox * I hope you're familiar with add_meta_box() function, so, nothing new for you here */ ...
0
votes
1answer
17 views

Values entered in a meta box aren't saved

I developed a custom metabox plugin and linked it to contact us page in order to save to DB the phone number, email and working hours as user input. The thing values I entered are not save into DB. ...
0
votes
2answers
38 views

Custom Meta Box (SELECT2) Not Saving Taxonomy Terms

I have the code, /* * Add a metabox * I hope you're familiar with add_meta_box() function, so, nothing new for you here */ add_action( 'admin_menu', 'rudr_metabox_for_select2_cat' ); function ...
0
votes
0answers
11 views

How can I 'check' the “custom fields” box from the Screen Options?

I am using the latest version of WordPress v5.3.2. I am trying to find out a way [through Code] to enable 'Custom Fields' by default, when on the Add/Edit Post/Page pages, at least for the one's ...
-1
votes
0answers
16 views

WordPress element to use for Theme Setup Checklist?

in my theme I want to create a notification/nag at the top of every page in the WordPress Backend. The notification will simply be a series of dot points saying: Favicon setup ~~SEO setup~~ DONE ....
0
votes
0answers
10 views

Change custom meta box label of field tab ID for custom post type

I have a meta box for a custom post type. Few tabs are available in that meta box; and all tabs have few custom fields. I need to change label of field of particular tab of custom meta box. Is there ...
0
votes
0answers
15 views

How to properly use wp_insert_post for one content type inside a running save_post hook for different content type?

this relates to my post here: Using wp_insert_post for one custom type inside another custom post types's save function - big problem One thing I realized in writing about my problem in that ...
1
vote
1answer
22 views

Cannot save Checkbox meta box value from a Custom Post Type

I have created a simple Custom Post Type which has a few textboxes and one checkbox. Textbox values are getting saved and updated perfectly in wp_postmeta table but I am not being able to save the ...
1
vote
0answers
22 views

Getting Custom Post Type Meta on Publish

Can you please take a look at this code and let me know why I am not able to get the Custom Post Meta on publishing the post. I tried thses function get_cpt_meta($post_ID) { $post = get_post($...
1
vote
0answers
22 views

Adding meta box without add_meta_box - is this bad?

I noticed that a plugin I am using has this hook during its rendering of a meta box in one of its settings tabs: do_action( 'learndash_metabox_options_div_after', $metabox->settings_metabox_key ); ...
1
vote
0answers
23 views

Remove metabox from WordPress menu editor page?

I'm trying to remove meta boxes added to the WordPress menu editor page from a theme, but can't seem to figure out how to do it, I found this answer, but I must be doing something wrong as it isn't ...
1
vote
1answer
30 views

Adding dropdown select meta box to custom post type - seems restAPI is interfering

I have a custom post type, call it topic. It is from BBPress, but this isn't a BBPress question. I also have a post type lessontopic. I added a meta box to BBPress so that I can choose an associated ...
2
votes
1answer
24 views

Options to get my custom post type metadata via the WordPress API

I am using a plugin that adds multiple custom post types all of which have their own meta-data. I am able to expose the custom post type to WordPress's API but the metadata collected with those post ...
0
votes
0answers
20 views

How to determine wether a post gets just created

when showing a post of a custom posttype with my metabox, I would like to check, if this is the first,instantiating call for this post. Is there a WP-function or elegant way to do this?
0
votes
1answer
67 views

custom meta box data not saved

After two day of reasearch and questions without answer, today someone has suggested me a way to add a custom metabox field to the wordpress images. My scope is to add an url when the image are ...
0
votes
1answer
30 views

Add custom metabox to media library images

Is it possible to add a custom meta box for the images of the media library?How I achieve this using add_post_meta() function?
0
votes
0answers
19 views

I created a Custom Meta Box but it is not displaying the value on my post page

So i created a custom meta box, here is the code : add_action( 'add_meta_boxes', 'register_meta_box' ); function register_meta_box(){ add_meta_box( 'author_email', 'Author Email Id', '...
0
votes
0answers
15 views

Load meta box inside meta box.. is this possible?

Wondering if I might do this as I'm looking to create a To Do View like on github project view does. Any insight will be appreciated, I may just go for a completely custom solution but if someone ...
0
votes
0answers
14 views

Add Metabox based on select data in Custom Post Type

This will sound a bit strange at first, but it will make sense later on. So I have a metabox, and I am using Metabox.io to create Metaboxes. Now, I have a metabox which has a dropdown, and a ...
0
votes
0answers
10 views

Cannot clone group of Custom Fields in CPT

I have my CPT, and I am trying to clone the group of Custom Fields in my metabox named as Credits. I have these fields to be cloned each time, when the user hit on + Add Group button: Text ...
0
votes
1answer
26 views

WP_List_Table Inside Metabox Not Working on Clicking Search Button

I'm trying to display a WP_List_table inside a metabox. The metabox is for listing registered users to a course(LifterLMS Course Post Type). The table columns contain user_id, user_name, percentage &...
1
vote
1answer
22 views

How Meta Data is different from Custom Fields of POST/PAGE in WordPress

I am really looking forward to have a clear picture of Why Meta data is being used for the Posts/Pages? I have always been wondering on how Meta data is different from the Custom Fields of Posts. I ...
0
votes
2answers
28 views

Custom metabox with image gallery upload that won't attach images to post

I have created a custom metabox with an image uploader that will upload multiple images into a gallery that I can then query. It all works accept for the fact that the images don't show as attached to ...
0
votes
1answer
14 views

Modify Publish Metabox location on CPT

I've been struggling with how to do this properly and have yet to find a solution. I have a CPT with ACF fields. I can't use a front-end form because I'm synchronizing the CPT across several ...
0
votes
0answers
40 views

Adding a drop-down (select tag) option under Menu Settings in WordPress Admin

I looked (surfed) around a lot to get idea of how can I add custom field/drop-down under "Menu Settings" in WordPress Admin. I want a select tag with options from which I can get value based on the ...
0
votes
1answer
22 views

Custom Meta Box returns no HTML

I'm trying to write my first plugin and running into an issue with the callback in add_meta_box(). The meta box appears on the custom post type page however there is no content inside. Here is the ...
0
votes
1answer
15 views

Cannot add a class to metabox

I'm trying to add a class to the metabox, for doing so I have created the metabox element in this way: array( 'label' => esc_html__( 'Property Lot Size', 'zoacres' ), 'desc' => ...
0
votes
0answers
12 views

Metabox - update Post - save duplicated rows to database

I have created a custom_post_type with a Metabox where i can duplicate rows / items with jquery and i can sortable them. Now i want when i save the post, that the content (input fields) are saved. I ...
0
votes
0answers
17 views

Wordpress Plugin Development Code-Editor Codemirror include - Style-Error

I used the codemirror for my textarea. Strangely enough, the text starts behind the sidebar and you can't work with it. Is there a specific setting for this? In the CSS code I couldn't see anything ...
0
votes
0answers
17 views

Wordpress Filesystem create CSS-File - get Shortcode ID for Name

My Script creates an CSS File when i save the post with the shortcode ID at the end of the filename. e.g. (test-293.css) The Problem is, that i need to register this individual File in my frontend and ...
0
votes
0answers
28 views

wp_editor in custom post type is not saving formatted text like bold, italic etc

My custom post type has 5 custom meta boxes which use wp_editor. Visually I can format the content but when saved, all the formatting is gone. For example I made a portion of my content bold, but ...
0
votes
0answers
18 views

“Meta box” plugin does not save when using classic editor

I am building a plugin, which relies heavily on Meta Box -plugin. Everything works fine, except when using classic editor, ie. with Classic Editor or WP Bakery plugins. Then the changes to the fields ...
0
votes
0answers
10 views

How to create a custom metabox like the wordpress provided tag metabox?

I want to create a custom meta box like this: What's the code I should add and where file should i add it in? I'm using wordpress' 2017 theme
0
votes
0answers
44 views

update_post_meta() throws Uncaught error: Cannot create duplicate attribute

In my plugin I'm creating a post of a custom post type. Immediately after creation I'm trying to update some of the metadata that I've defined in metaboxes for this CPT. Upon execution of the code, ...
0
votes
1answer
32 views

Metabox multiple custom post select -> display selected items?

I'm building a theme that needs some cross-information(?) between custom post types. I have a metabox to select custom post types and display them inside the single page of another custom post type. ...
2
votes
4answers
156 views

Relate two custom post type using meta box

I've two custom post type: 1.products 2.seller Now I want to relate both the post types using the meta box. I want to display products in seller posts so that sellers can select the required ...
1
vote
1answer
22 views

MetaBox body is not showing (the callback function)

We're creating a plugin where, for example, it shows a metabox on all post types. To kick things off, I'm using the Starter Kit. <?php namespace PLUGIN_NAME; class Foo { public function ...
1
vote
1answer
55 views

Choosing a default page tempate (Classic => Gutenberg)

This code was working in the "Classic" era to set a default page template: /* Blank Page by default */ add_action('add_meta_boxes', 'blank_default_page_template', 1); function ...
0
votes
1answer
45 views

How to pass multiple custom fields as shortcode's parameters

I'm learning how to pass parameters in shorcode, I know the basic step after read through WP Codex. But for now, I have plugin come with custom fields and as the title, I want to know how to do it. ...
0
votes
1answer
60 views

How to save a Woocomerce metabox input as a metadata field

I have a plugin that adds videos in place of the featured image of Woocoemerce products. The plugin just adds the video URL and saves it within the product. I would like to provide the saved URL via ...
1
vote
1answer
153 views

WordPress nl2br is not converting newline to html line break when saving metabox value

I tried possible solutions to save \n as <br /> from my custom post type <textarea> metabox but it is not working. I am using a custom made theme and there is no additional plugin ...
0
votes
0answers
9 views

Posts not showing first to last selected on feature post meta box

i having a problem on my theme.i created a custom meta box to select the post to be featured with a checkbox. in the loop its show the first checked posts,but i want to display just posted and ...
0
votes
2answers
174 views

Update Post Meta in Front End with a form

How I can update Existing (Back-End) metabox variable from front-End, I tried many times but I don't know why doesn't this work? Showing only old value not update, what i did wrong? This is my Front-...
1
vote
1answer
43 views

Remove meta box for specific page

I'm trying to conditionally remove the 'Page Attributes' meta box for a specific page (or multiple specific pages). For example: function remove_meta_boxes() { if (is_page('contact')) { ...
0
votes
1answer
50 views

Update Post meta with custom variable

I Just want to update (edit existing) the custom meta box variable from front-end. I got a form Front end post editing using a form & process things but in this code post-title i can edit & ...
0
votes
0answers
61 views

How to Edit & Update meta_box values from Front-End user Form

I'm trying to Edit & Update meta_box values from front-End, Following codes are back-end. The problom is i'm fully confused with update post & update meta box. I hardly trying to get $package ...
0
votes
1answer
63 views

How To Tell If a Custom Field Was Made with ACF, Metabox.io, Carbon Fields, Custom Built, etc?

I am working on a plugin that will be using custom fields, but was curious if there was a way to tell which plugin/library created those custom fields. The reason I am trying to find this distinction ...
0
votes
0answers
18 views

How to update a custom post types meta box on publish

I'm trying update a meta field on a custom post when it's published, but it isn't working for some reason. My code is as follows: function add_rand($post_id){ $result = update_post_meta($post_id, ...