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
0answers
39 views

non-unique #_ajax_nonce id in browser console

I have added multiple custom fields through a meta-box, and i have used wp_nonce_field function that generates a nonce for each field and every thing is working for This meta box, but also WP renders ...
0
votes
1answer
26 views

Meta box html is not updating after saving

I have some meta boxes setup, some are my own, some are initialized in plugins. As the title indicates, these meta boxes are not updating graphically after the post has been submitted. Here's an ...
1
vote
1answer
538 views

How do you List all Sidebars in a Metabox

I know this question has been answered many times before, including here where i came from so it'll probably be real simple. I've registered my sidebars as normal function wmw_sidebars() { // ...
0
votes
1answer
570 views

Custom metabox does not store data

I'm troubled with a custom metabox, could someone give me a helping hand? I've got a custom post type which uses it, but unfortunately it's not storing the data into the database. Any clue? ...
1
vote
1answer
14 views

Custom Field created in add_meta_boxes reappearing itself again in the default Custom Metabox

I succeed in creating a metabox with custom field inside, and I restrict it to appear in a custom post type. //define metabox function product_info_en() { add_meta_box( 'english_info', 'English ...
1
vote
2answers
1k views

Visual/Text tabs in wp editor Not Showing

I have a wordpress website that i have added custom meta boxes to the post. Custom meta boxes have an editor using wp_editor(), but the editor is refusing to show the visual/text tabs on the editor ...
0
votes
1answer
520 views

Adding to an array & passing it through do_action/apply_filters

For exercise I am working through a PHP class to add meta boxes I found on GitHub. I just copied the code and now I am playing around with it to understand it. It works like this: The file ...
1
vote
1answer
15 views

Plugin - Combine Meta Box Input Fields into single saveble record

Im a complete novice when it comes to coding. I have managed to build a theme with some custom post types. Within the custom post type i have used a generator tool to create a custom meta box. It ...
0
votes
1answer
13 views

Metabox not saving values

I have a problem. My fields are showing in the meta box, but saving does not work: <?php // Create the metabox and fields function food_meta_box_markup($object) { wp_nonce_field(basename(...
3
votes
1answer
5k views

Why is my custom meta box input not saving

I've added the following function to functions.php to add a custom meta box enabling the end user to input a gallery shortcode. I then intend to use this to place a gallery in a specific place on the ...
0
votes
1answer
489 views

How can you include custom post meta in search without calling each key?

Looking at including the content from metaboxes in my search results but after researching I was only able to pick up two solutions: How can I include meta box content when searching? Suggests using ...
0
votes
1answer
586 views

saving dropdown menu data on custom post type

I'm following this tutorial on how to make a custom field. I already used it before and it worked, but I only did it for text inputs. Now I'd like to make a drop down menu and I'm unable. The thing ...
0
votes
1answer
628 views

save metabox with new values _wp_page_template

I created a metabox to display the page templates and select a different one with a radiobutton selection. This is a replacement for the current page attributes metabox. I'm missing something with ...
1
vote
1answer
22 views

How to convert the WordPress meta box Page Attributes->Page Template dropdown to radio buttons?

I would like to be able to change the Page Attribute "Templates" dropdown to radio buttons, to allow me to have corresponding thumbnails next to them. I have already removed and replaced the Page ...
0
votes
1answer
631 views

How to add a custom meta box below publish box in CPT that is like publish meta box and can contains html?

How can i add a custom meta box below publish box in CPT that will be like publish meta box and contain some html code? See the attached shot for more info.
2
votes
1answer
22 views

How to verify meta box is registered in Unit Testing?

I am currently doing TDD with WordPress, in the PHPUnit I need to test if the meta box is actually registered on a method call, I could not find any function in WordPress to do that, so I was trying ...
0
votes
1answer
22 views

How to position user meta data field

I have 1 additional field I want to display on the user profile page (mainly admin users will use this) I have done it but it is showing up at the very bottom of the page, I want it to sit in the ...
1
vote
1answer
27 views

Want to hide some categories from the categories meta box in the post editor for the two specific user roles

Recently, I am customizing the COLORMag theme in WordPress. I want to make my site as a multi-author website where random people will register and write. But as my theme's homepage shows all the posts ...
2
votes
1answer
4k views

add_meta_box does not go 'side'

I'm trying to add some metabox to my custom post type. So I add this: add_meta_box( 'my_custom_meta_box_id', 'My-meta-box-title', 'my_custom_meta_box_callback', 'my-custom-post-type'...
0
votes
1answer
693 views

Using WP Color Picker in Repeatable Fields

I wrote a repeater script that clones the last field group before it. My issue is that cloned WP Color Picker fields don't open the new color spectrum when clicked on but instead opens the color ...
0
votes
1answer
25 views

How to filter result set in custom metaboxes?

I am adding a plugin that adds a custom meta box on the admin woocommerce product detail page. What this does it lists the completed orders that contain the product. I was able to successfully add ...
1
vote
0answers
21 views

Add custom links like functionality

I want same functionality like WordPress provide for custom links but additionally I want to add some class to those links by default that is added by this feature (Other websites). I have tried to ...
1
vote
1answer
647 views

Custom Post Type with Templates using Meta Boxes?

I have this issue where I need a CPT to have several layout options and use templates. Originally, WP does not support templates for custom posts, however I know its possible to do it manually via ...
0
votes
1answer
21 views

Add a metabox when editing a media - but only for images

Is it possible to add a metabox for medias (attachments), but only if they are images ? I don't want this metabox on other file types. Thanks
0
votes
1answer
27 views

Creating custom meta box throws PHP warning error in WordPress

I am trying to create a meta box as a plugin in my WordPress test website. I am using an installed custom theme from a tutorial I am following from Udemy called, 'WordPress E-Commerce Development w/ ...
1
vote
1answer
454 views

Custom Meta Box (SELECT) Not Saving

I am trying to create a meta box with select options for each page with home-page-template.php assigned to it. I have got that functionality working correctly. I also want it above the editor, below ...
1
vote
2answers
807 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 metabox ...
0
votes
0answers
13 views

How to save a metabox which contains php code as a output

I want to show country flags on smart slider 3.The plugin doesnt work with php codes perfectly.So when I add my php code directly it doesnt work but it works variables like metabox values.So I want to ...
0
votes
0answers
14 views

Create Metaboxes dynamically in admin for Pages

I've created in the admin editor of my site homepage a Metabox with an input and a textarea fields. The code works great. However my goal is to allow the admin user to duplicate the Metabox with the ...
7
votes
1answer
638 views

'Preview Changes' for custom meta boxes?

How can I have the 'Preview Changes' working for custom meta boxes? For instance, I just want to test/ preview some text in a custom meta box but I don't want to save/ update because that post/ page ...
0
votes
1answer
778 views

Repeatable field within repeatable group of fields

Compounding on Saving metabox repeatable fields ... I've created a metabox with a series of fields that are repeatable. However, within those fields, I'd like to create another field named Choices ...
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
3answers
1k views

Include custom fields into the content of a regular page

Here's my setup: Parent "Gallery" page: _regular page, not custom type or anything _ Several "Project" child pages (could be as few as 1, unlimited number): also normal pages Child pages will either ...
3
votes
2answers
4k views

Displaying Meta Box Image

I have some problems displaying info from my custom meta box in my custom post type single. I'm using Reusable Custom Wordpress Meta Boxes by Tammy Hart. I'm able to display the textfields using this:...
0
votes
2answers
2k views

Custom meta box repeated field

I want to add a field in my custom meta box, same as below, but not for tags. How can I repeatedly take more inputs in the same field? Here is my code added to functions.php: function ...
0
votes
1answer
533 views

Create Meta boxes dynamically

I followed and created a meta box using all code from this question here: Create more Meta Boxes as needed Basically only two fields are created when you click on Add track button: Song title field ...
0
votes
2answers
22 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
14 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
19 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
43 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
1answer
1k views

WordPress AJAX load post metadata in modal

I have a custom page template (front-page.php) and I have a custom metabox which is assigned to this page template. Metabox have 7 sections, and each section have 2 inputs. It looks like: 1. Client ...
0
votes
0answers
12 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 ...
0
votes
2answers
2k views

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

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 button from the front end ...
0
votes
1answer
465 views

Display Data From This Custom Media Upload Meta Box?

This plugin is working without any issue on CMS. Now I need to know how to properly display them in my post. Custom Media Upload Meta Box Plugin. $meta_box_media_upload = new Meta_Box_Media_Upload();...
0
votes
1answer
501 views

ob_get_clean(); doesn't return $value in shortcode?

i using this code: <?php ob_start(); echo '<div class="judul"><h3 style="text-align: center;"><strong>Download <?php echo esc_html( $judul ); ?> Batch Kumpulan Subtitle ...
0
votes
1answer
422 views

Editor meta box Showing but not saving

I am trying to create an editor meta box and I have been following tips found in other similar questions without luck in getting the meta box to save and display its content. The meta box shows but ...
2
votes
1answer
829 views

Add custom buttons with custom actions in Edit Post screen in WordPress?

I am creating something for a client and I have a Class that I created with a Custom Post Type called 'PuSH Feeds' and when the user adds a new post and publishes it they can then click on one of two ...
0
votes
1answer
476 views

Adding metabox to wordpress plugins menu page

Now I am building a wordpress plugin. I need to add a metabox to the admin submenu page. I tried like this below, add_action( 'add_meta_boxes', 'add_meta_boxs'); function add_meta_boxs() { ...
0
votes
0answers
11 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
1answer
1k views

How can I create a custom meta box to add an mp4 video to a page?

I've cobbled together code (as I'm a php and jquery newbie) from a couple of different posts to try and get an mp4 video URL input field in the wordpress admin. I've been able to get a media uploader ...

1 2 3 4 5 31