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

coauthors_plus_edit_authors to display metabox based on author caps

Need to display the coauthorplus metabox with author capabilities. On the documentation of the plugin they say its only with super admin and editor that the metabox is available. Any idea to add a ...
made leod's user avatar
0 votes
0 answers
17 views

Move metabox up on side WordPress Post admin

I have the following PHP code for WordPress. I'm placing it in my functions.php file. It adds the metabox on the bottom right side for my Post pages in the admin area. Is there a way for me to get it ...
devco2023's user avatar
0 votes
1 answer
17 views

doesn't save custom meta box data wordpress

My WP doesn't save my meta box data. I see the metabox and the field, but the data doesn't saving. Somebody could help me? Thank you. This is the code: <?php // Function to add a metabox function ...
Tivan Cell's user avatar
0 votes
0 answers
11 views

Filtering Tabs in a Custom Post Type's Edit Page

I am using LearnDash to create courses on WordPress. A key thing is that I have other non-admin instructors that will also help me create lessons. The thing is, the lesson edit page has a "...
The Feadow's user avatar
0 votes
0 answers
13 views

How to show metabox in custom php menu page

I've created a custom dashboard for wordpress and I want to show some custom metabox on it. Is there any way to achive this with a filter or function of wordpress? I've tried using the do_meta_boxes() ...
ICTDEV's user avatar
  • 113
0 votes
1 answer
30 views

Only display top level taxonomy on the edit post page with option to expand sub-categories

We have a custom taxonomy that is hierarchical. It has so many sub-categories that to scroll through them in the edit post page is proving problematic for editors. Is there a way to initially show ...
Ralpharama's user avatar
1 vote
1 answer
72 views

Using add_meta_box on a page with file upload and importing fields

This must be fairly simple :) I'm trying to import data into ACF repeater fields and am mostly following the answer to Add special meta box to custom post type But what I have below isn't saving the ...
BlueDogRanch's user avatar
0 votes
1 answer
14 views

Saving custom input from settings sidebar of pages in Wordpress

I created a meta-box with an input field in the settings sidebar of pages. Now I try to save the value, but it does not work. Maybe the problem is, that I try to do this with pages and not with posts. ...
Jessi's user avatar
  • 3
0 votes
1 answer
106 views

How to change the text of Publish Button

I am trying to change the text of the publish button to save. I could change the text. BUT, When I click Status Edit button and OK button, it change "Publish". How can I fix this? This is ...
amy's user avatar
  • 3
0 votes
1 answer
95 views

How can I put a checkbox in the post editor

Up to now I'v been able to insert text custom fields and number custome fields in my post editor page, now I need to insert a checkbox, as a new meta field. I write here the code I have for a number ...
Andrea Sacconi's user avatar
0 votes
0 answers
29 views

WordPress Admin panel: Custom submit button, need to suppress JS refresh dialog popup warning

Question: Is it possible to remove the WP admin dialog popup when using a custom "publish" button? Consider this workflow: Custom post type that a special editor role [approver] will simply &...
Christian Žagarskas's user avatar
0 votes
0 answers
119 views

How to consume external API from WordPress post editor and display the response data in the custom field?

I am developing a custom post type called "Team," where I will add some profiles of team members. I am using ACF for the custom field to add personal details of the members (I can also ...
Rousnay's user avatar
0 votes
1 answer
124 views

how making a selection from a taxonomy selector fixed definitively

I have created a taxonomy “Ospiti” (guests) and set a selector in order to write the number of guests. If I select the number “7” and then edit the post , I see in the posts admin colum the n “7” ...
Andrea Sacconi's user avatar
0 votes
0 answers
61 views

Unable to remove panels

I'd like to remove the panels that appear on the right of the post/page e.g. categories, featured image and others. I have the function below to register the script. function remove_block_style() { ...
Ryan's user avatar
  • 53
0 votes
1 answer
68 views

Is there a way to remove the Add boxes from the Screen Options menu metabox?

I'm removing the default metaboxes like so: function rh_remove_dashboard_widgets(){ remove_meta_box('dashboard_activity', 'dashboard', 'normal'); remove_meta_box('dashboard_right_now', '...
Ryan's user avatar
  • 53
1 vote
0 answers
35 views

Post meta box data not saving

The meta box, fields, etc. are all displaying correctly but when I go to update the page it seems the data in those boxes has not saved. Any ideas? Using a custom post type called 'question'. Would be ...
Tom Foster's user avatar
0 votes
1 answer
43 views

Saving metabox updates causing fatal error

I'm teaching myself from a plugin tutorial dvd, everything was going fine. I've setup custom_post_types and the metaboxes with no issues. The issue i have is a fatal error when i update/publish the ...
fuzzy2023's user avatar
0 votes
1 answer
61 views

Modify Term List in Custom Taxonomy Meta Box

For the life of me, I can't find the hook for altering the list of terms in a custom taxonomy metabox. On the post-edit screen, instead of list of custom taxonomy terms like this... [ ] Bob Dylan [ ] ...
Michael Rexman's user avatar
0 votes
1 answer
188 views

I want to Display custom woocomerce meta box in orders list

I run a WooCommerce store and work with lots of delivery companies. To keep things organized, I added a custom post type where I can add new delivery companies. The meta box in the order details shows ...
Shady M Rasmy's user avatar
1 vote
0 answers
96 views

Saving multiple custom meta box fields

So, I have a custom metabox, with multiple fields on it, and the amount of boxes is variable (could be 3, could be a lot more, depending on order quantity number) I'm trying to write a save function ...
Mark Tabner's user avatar
0 votes
0 answers
78 views

How to add new Metadata options (Date, Author, etc.) for Posts?

I would like to know if it's possible and how to create new Metadata options (like Date, Author, etc.) to show about a Post. I tried using Advanced Custom Fields, but I can't seem to use the custom ...
Giacomo Simonin's user avatar
0 votes
0 answers
64 views

REST API custom endpoints for metaboxes

I have a three metaboxes connected to my custom post type "cpt-project". I would like to fetch the data to show it in the JSON using the REST API. I understand that I have to create custom ...
Mathieu Préaud's user avatar
0 votes
0 answers
29 views

Save Edit button then disabled readonly metabox

Hello I am just starting out with php and I have managed to get a repeatable metabox and managed to add a 'Save' button which saves the input meta data to the database which works, how can I change ...
jamesnelson82's user avatar
1 vote
0 answers
104 views

How to get meta box labels?

I know how to add a meta box, and I know how to retrieve meta box values. That's not what I need; I just want to clarify that first. What I need is to get meta box labels by id. I am adding links to ...
Aristocles's user avatar
0 votes
0 answers
50 views

Meta box not displaying on the plugin page

I am working on a plugin and I am creating a meta box on my page using the below code but it's not displaying anything. Any idea where is the issue with my code? class bt_dashboard { function ...
Naren Verma's user avatar
0 votes
1 answer
96 views

Wp doesn't save meta box data

My WP doesn't save my meta box data. I see the metabox and the field, but the data doesn't saving. Somebody could help me? Thank you. This is the code: // 1. Metabox létrehozása function my_meta_box(){...
Eszter's user avatar
  • 1
0 votes
1 answer
164 views

Store custom meta box data as serialized array

I have been trying to find out if it is better to store custom meta box fields for a custom post type individually or as a serialised array. On the web I have seen different approaches but which one ...
user8463989's user avatar
0 votes
2 answers
275 views

Usage of call back function of add_meta_box()

I am learning WordPress Plugin Development. My Code is like below. class Admin { public function __construct() { add_action( 'admin_menu', [$this,'news_meta_boxes'] ); ...
Foysal's user avatar
  • 417
0 votes
1 answer
431 views

add_post_meta() & update_post_meta()

I am learning WordPress Plugin Development. I need to store Metabox values which are related to Custom Post. In this regard where should I use add_post_meta() & where should I use update_post_meta(...
Foysal's user avatar
  • 417
0 votes
1 answer
216 views

Display stored value in Meta Box

How to display stored value in Meta Box ? I added Meta Box with below code. add_meta_box('wp_news_settings', 'News Settings', 'news_settings_html', 'news', 'normal', 'default'); My call back function ...
Foysal's user avatar
  • 417
0 votes
1 answer
119 views

Save Multiple Metabox values

How to Save Multiple Metabox values ? I have 3 fields like below image. Should I use below code ? if (isset($_POST['name'])) { update_post_meta($post_id, 'name', sanitize_text_field($_POST['name']...
Foysal's user avatar
  • 417
0 votes
0 answers
22 views

Publish box in CPT remove 'edit' link

Hello I have a custom post and in the Publish Box I would like to remove the timestamp edit link.
jamesnelson82's user avatar
0 votes
2 answers
52 views

Have mu-plugin remove meta box ONLY if it isn't already removed in functions.php

I have a mu-plugin that removes a branded "Welcome to X" dashboard meta box placed there by the hosting company I work for. It works fine mostly. However, some of our agency clients are ...
Nox's user avatar
  • 1
1 vote
1 answer
41 views

Changing custom type name hides the posts [closed]

I created a custom post type. Plugin used is Custom Post Types & Custom Taxonomies plugin which does the job very good. And added some posts to it. But when I modify the name of the newly created ...
compliance's user avatar
0 votes
1 answer
60 views

How using the Meta Box plugin, to filter posts by the value of a post type field?

I'm using the Meta Box plugin to create custom post types and fields. There is a record type teachers, and I'm trying to display the lessons associated with him on the page of a certain teacher. The ...
Alexey's user avatar
  • 1
0 votes
0 answers
49 views

Metaboxes inside Tab

I am learning WordPress Plugin development. In this regard I have to save some settings along with Custom Post in Admin Panel under a Menu. Can I place metaboxes inside tab for this issue like the ...
Foysal's user avatar
  • 417
0 votes
0 answers
69 views

Why is $_POST empty when saving custom Meta Box?

I'm creating a Meta Box in my custom Plugin where the Administrator can select which users can view a certain post based on their roles. When I select the role and save the meta box content by ...
user3716433's user avatar
0 votes
1 answer
446 views

Finding the screen id of a page generated with add_menu_page

I'm at a basic level of WordPress + PHP and I'm trying to build a pretty simple plugin. I've set up the plugin correctly, and the plugin page is generated with function wpplugin_settings_page() { ...
Sigurd Mazanti's user avatar
0 votes
1 answer
287 views

Meta Box WP_Query array for showing items with a certain relationship

in oxygen I am using a repeater to show posts that have a certain relationship. The advanced query in the relationship is post_type = "custom post type1" and then I add another parameter ...
Joshua Miller's user avatar
1 vote
1 answer
414 views

Send email button in custom post type backend

I've added a button in the backend of my custom post type editor. I want to send an email using wp_mail() when admin user click a button. I've added this custom form and button to a meta box. See ...
Ben de Meillon's user avatar
1 vote
1 answer
255 views

Save / Show multi line text in metabox

In a plugin I have made (Snup Widget) I have made a metabox. In the sample here I have made two line with text. When I want to show the text in output in the widget it shows in one line, without break....
bjovaar's user avatar
  • 21
0 votes
1 answer
216 views

Custom Meta box change size

I a plugin that I have made (SNUP Widget) there is a strange error. When I use widescreen monitor this custom meta box I made looks ok. But with I open browser on my PC with split screen that is not ...
bjovaar's user avatar
  • 21
0 votes
1 answer
39 views

Custom Post Meta from custom metaboxes is randomly being deleted

For a while now I've been applying and updating some custom metaboxes that my company re-uses on different sites. (Not the same metaboxes, but the same methodology.) Essentially it allows for the '...
Tony Djukic's user avatar
  • 1,958
0 votes
0 answers
142 views

WP_List_Table Inside Metabox With Bulk Actions Not Working on Submit

I'm trying to display a WP_List_table inside a metabox. The metabox is for questions which are from assessment_question custom post type.The metabox is being displayed on an other custom post type '...
Muhammad Faizan Haidar's user avatar
0 votes
1 answer
22 views

How to insert data into meta box from another plugin?

I have two different plugins. My custom-post-type is on the first plugin and it has some meta boxes. Now in the second plugin, I extracted the email using IMAP and stored it in the post type of the ...
Rohit kc's user avatar
1 vote
0 answers
83 views

Save Meta when custom Taxonomy Saves

I am in need of some advice, we are setting up a custom tag for Movies. We want to have it pull from the OMDB Api when it is saved. We have the function setup, but it is not firing, and I am stumped. ...
Bfrye26's user avatar
  • 11
0 votes
1 answer
61 views

how to prevent added meta box from being injected with style="position: fixed; top: 56px;" at scroll down

This is my first attempt to customize WordPress. I added a meta box like this function settings_metabox() { //register custom meta box add_meta_box("mybox-id", "Settings", &...
MeSo2's user avatar
  • 111
1 vote
1 answer
30 views

can i fetch a custom metabox data in another page or post type?

I need to fitch a metabox field data in another page , $headabouttitle1 = get_post_meta(get_the_id(), 'head_title1', true); this is how i fetch it in the same page , I need to fitch it in another ...
Yusuf ElNo'man's user avatar
0 votes
1 answer
303 views

Saving a Custom Post Type with a Meta Box results in a "Updating Failed" error

I have a Custom Post Type (Favourites) which I plan on using to talk about my favourite craft products. The meta box field I want to have is a link to an online store listing, so users can buy the ...
Anna Lam's user avatar
0 votes
0 answers
21 views

how to update post content field in wordpress

i have used add meta boxes to customize page content and use wp_update_post to save it. when im creating new page in wordpress it inserts two new record in wp_posts table. one of them has published ...
irectonic.com's user avatar

1
2 3 4 5
33