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
18 views

Display metabox galleries on specific page template in admin editor

I'm building a Wordpress website with two metabox galleries displayed only on post type page in admin editor. What I'm trying to do is to display them only for a specific template page in the admin ...
0
votes
0answers
20 views

Add metabox to pages that use custom template in WordPress

I am trying to add custom metaboxes to only those pages that use a certain custom template that is applied to them. How can i do this? I based on this this guide: How to add add_meta_box to specific ...
1
vote
0answers
23 views

How to use custom form on add_meta_boxes callback

I am trying to trigger the echo when the form button will click. but not able to do this. if I don't use form and direct echo there. this is working. but when I use a form, it's not working. can ...
0
votes
1answer
12 views

How to 'clone' select metabox options with a callback function? [closed]

Here is my metabox array( 'id' => 'all_btns', 'name' => 'Button Select', 'type' => 'select', 'options' => array( 'button' =&...
1
vote
1answer
13 views

WP nonce field checkbox prints checked='checked' outside input field

I'm currently creating a custom post type in wich I want to add some custom meta boxes. All the fields just go as expected excepting a checkbox field wich prints on the html checked='checked' after ...
0
votes
0answers
20 views

Render metabox gallery in frontend

I'm building two metabox galleries on the same page with the help of a tutorial. The code works fine. However the galleries are automatically displayed after the content on the front end. What I would ...
0
votes
0answers
19 views

Making custom meta box required (with error message if not filled in) on Gutenberg

<input required name="myName" type="text" value="<?php echo $myValue; ?>" class="regular-text"> Does not produce an error message if the field is ...
1
vote
0answers
37 views

HTML for adding a meta box (basic text field) to page editor?

I am following this tutorial from to add a meta box to pages of a certain page template. Unfortunately the code omits the part on how to create the actual meta box on the page (the HTML). The code in ...
1
vote
0answers
17 views

Create custom Content Editor for CPT [closed]

Hi I'm new to Wordpress theme dev. I'm trying ro create a custom theme (child theme) in order to create a CPT for books. There I would like to have 3 separate WYSIWYG editors (english, french, german) ...
0
votes
0answers
19 views

how to only allow one selection to be made in meta box

Okay so I have one metabox for my CPT and it has multiple dropdowns in it. I need help in only allowing one selection to be made. if ( get_post_meta( $post->ID, 'item_type', true ) == 'page' ) { ...
0
votes
0answers
24 views

Remove Username and just show Name in Author Metabox in backend

In the Author Metaboxes for Posts / pages / custom types, it shows: Name (Username) Is there anyway to customize this to just show Name only? Or maybe Name and Role? I am pretty sure if it done with ...
0
votes
1answer
38 views

How to modify the output of wp_terms_checklist when used within the built-in category metabox on edit posts?

On the Edit Screen in the WP Admin there is a meta box for WP's built-in Category taxonomy. This meta box is built using post_categories_meta_box() (/wp-admin/includes/meta-boxes.php). This meta box ...
-1
votes
1answer
20 views

Remove action of an external plugin after checking if custom post meta is set

Edit:The problem were 2 folds - somehow the order list I found before indicated wp_head was before wp_enqueue_scripts but that is not the case. Found another more updated one and it is actually right ...
0
votes
1answer
22 views

How to hide metaboxes in WordPress Admin on WooCommerce “Add Product” page - Remove side sortables for a specific user role

How do I hide certain metaboxes in WordPress Admin screen options for specific user roles? For example, I allow the user role "Store Vendor" to access the WordPress admin to upload their ...
0
votes
0answers
8 views

How to add search to custom taxonomy boxes in non-gutenberg editor

I am using the latest version of WordPress (5.7) and have created a custom post type with custom taxonomies. I do not have the Gutenberg editor activated for the post type, so I do not have search for ...
0
votes
0answers
17 views

How to make a front end fields from metabox

I want to clarify that I am not a specialist, my query is how to insert a metabox in the front end, specifically I show you the image: I want to do this: But actually I have this: Those are the php ...
0
votes
0answers
44 views

Post and Pages section inside WordPress admin are completely blank

Meta Tags - Undefined array due to meta tags! I have created my own custom post meta tags but all works fine until I test my WordPress theme on the new WordPress Installation. What I came through ...
1
vote
0answers
16 views

Change the context of excerpt metabox for the 'New Post' page

With the Gutenberg layout, is it possible to adjust the context, or position, of the Excerpt metabox from the sidebar of the 'New Post' or 'Edit Post' admin page, to the main area, i.e. to a 'normal' ...
0
votes
0answers
9 views

Creation of a search page and event display with datepicker metaboxes

Being a beginner in the development of Wordpress theme, I'm currently trying to create a custom search filter on a dedicated event search page template. For this, I created custom fields of date ...
0
votes
0answers
39 views

remove metabox is not working for wp 5.7

Hi I am using wordpress 5.7 and Vidio theme, Here the theme have some plugins with it. Those plugins create a metabox with id haru_video_attached_directors. I want to remove this metabox from custom ...
0
votes
1answer
8 views

Unable to display selected post title in frontend from metabox wp_dropdown_pages()

I created a metabox in admin using wp_dropdown_pages() to display the list of posts from my custom post type workshop. The metabox dropdown works fine in admin, I can select the post title and save it....
0
votes
0answers
21 views

Load Dynamic Template Page by Metabox

Does anyone know how I can implement Wordpress as shown in the image below? I would like to have a unique url passing the company_name metabox as a parameter and from business_type create a function ...
1
vote
0answers
24 views

How to detect if metabox content was updated by the user

I am handling metaboxes and their updating process the standard way: // Attached to the save_post hook function the_save_stuff_handler($post_id, $post){ // Early return if(defined('...
0
votes
1answer
29 views

Show metabox value last post excerpt, title and link

I'm facing a problem I can't solve. I'd like to get the excerpt, title and link of the last post containing a particular meta-box button status. For example: I would like to retrieve the last post ...
0
votes
1answer
19 views

Move the metaboxes to the very top of post editor

I have this function that creates a custom metabox (with the metabox .io plugin), i would like the metabox to stay on top just below the title field this is the code i am using function generator_api()...
0
votes
0answers
20 views

Multisite Menu Metabox to list all sites in Network for Dynamic Network Site Menuitems

I don't understand why this functionality doesn't exist in Wordpress Multisite TBH. I have this working for Custom Menus and the List of Sites on the Nework is working in a Metabox also. However, I ...
1
vote
1answer
36 views

Using wp_editor tinyMCE in metabox cause form alert on leaving page

Using tinyMCE as wp_editor in a custom post type metabox create an alert when I try to submit or If I want to change location I don't have such behavior using Quicktags, but since TinyMCE is easier ...
1
vote
1answer
28 views

how to save and get selected item id list with add_meta_box

hi all i need create to metabox in page for the footer and header posttypes i created, in this code i tried for this but i cant save selected item and retrive id selected item in the frontend. ...
0
votes
0answers
15 views

Multiple header style under meta box

I am a wordpress developer. There is a problem I want add multiple headers through metabox in my theme but there is not working. Code: add_action("admin_init" , "multi_header_meta_box&...
0
votes
1answer
25 views

How to improve my non-unique metadata MySQL entries?

I'm working on a plugin for WooCommerce which uses a cpt called Restock. In a Restock post you can enter products ( id ) plus restock. The user can add as many product restock pairs as they want per ...
0
votes
0answers
7 views

display failed status on post edit

I created a meta box in the post edit interface that modifies a portion of a post on update (publish/pending/update/etc.) It's working great. I have tried a number of things to invoke a failed status ...
1
vote
1answer
24 views

how can i do metabox [closed]

how can I make a metabox like in the picture episode title : Episodes 1 Serie Name : The Seven Deadly Sins AirDate : gg.aa.yyyy
0
votes
0answers
15 views

how can I make this metabox area

how can I make this metabox area function bolumler_metabox() { $screens = ['post', 'page']; foreach ($screens as $screen) { add_meta_box( 'episodes', // Benzersiz ID ...
0
votes
1answer
12 views

Wordpress default post categories meta box widget

I have a plugin that automatically selects the categories in the wordpress post editor, sadly after installing the Rank Math - SEO plugin the default metabox of the post editor has changed and the ...
1
vote
0answers
10 views

Visual editor issue by having multiple tiny mce editors in a CPT

I have a custom post type in which I have added multiple wysiwyg editors, when I click on visual, the content of the editor (button, text, title) get inside of the wysiwyg editor.. it's odd. It looks ...
0
votes
0answers
17 views

How to show cmb_meta_boxes in a seperated page?

I am using cmb_meta_boxes v1 I need to know the best way to show $meta_boxes fields automatically in a separated page for every post if exists. For example : I am creating a new post The permalink of ...
0
votes
0answers
21 views

Taxonomy custom check box meta field not getting saved

I am trying to add a simple checkbox to the category page but it not getting saved for some reason. Please help to fix the code below. Basically, I registered a meta then created check box. CheckBox ...
0
votes
0answers
22 views

meta box image responsive srcset and sizes attributes value

I create meta box and and save it's value update_post_meta( $post_id, 'cover_image', sanitize_text_field( wp_unslash( $_POST['cover_image'] ) ) ); I use it in template - <?php global $wp_query; ...
1
vote
1answer
31 views

Custom Metabox data slow query on Admin init

recently my database got very large either in posts and postmeta, and when accessing the WP admin it loaded on init something like 700mb of data, and it was slowing down the entire backend. I found ...
0
votes
1answer
13 views

Show a custom post title in another custom post type in Meta box

I have created two custom post type. Suppose A and B. I would like to fetch A custom post title in B in meta box in a drop-down. I am not getting any solution. Is anybody help me to find the solution. ...
0
votes
1answer
14 views

Set class if a meta value is set within post archive

I'm attempting to add a class to posts when the meta key 'checkbox' is clicked. Here's what I have: <?PHP $checkbox = get_post_meta($post->ID, 'checkbox', true); if (!empty($checkbox)){ $...
0
votes
0answers
15 views

Adding text box with add_meta_box

This is my code: $configuracoes = register_post_type( 'configuracoes', $args ); $configuracoes->add_meta_box( 'dados', 'Personalize os dados de impressão', array( 'tabs', ...
0
votes
0answers
7 views

Activating metabox from admin not working

i was following a youtube tutorial of how to make wordpress admin option but stuck at a point i am trying to activate or show a metabox on all pages only when a contact form setting is activated from ...
1
vote
1answer
623 views

Found 2 elements with non-unique id (#_ajax_nonce) and (#_wpnonce)

I am developing custom theme from scratch and creates a custom post type and getting this warning while editing custom post type. I also design custom Meta box with two input fields and using nonce in ...
0
votes
1answer
32 views

get_post_meta giving errors while creating a metabox

i was following atutorial on how to make a custom metabox to wordpress post but its giving errors here is my full code //Add Metabox function diwp_custom_metabox(){ //add_meta_box(metabox_id,...
0
votes
0answers
9 views

Metaboxes in custom post type disappear on save/publish

I'm maintaining a friend's website, and after updgrading to WP 5.5 some custom metaboxes on custom post type edit pages stared disappearing on save, but not all. There's a custom post type - 'Releases'...
0
votes
0answers
40 views

Nested Repeaters In functions.php

I've a repeater and I want to put another repeater inside of it, but I don't know how! So I want to have a repeater that is inside of another repeater. I'm using it for a trailer I think. And I want ...
0
votes
0answers
19 views

Don't know why post meta doesn't work even no error is thrown

I am having a problem with post meta. I have a custom meta box for posts. But when I select the option it doesn't work. Neither does this code throw any error. One week ago it worked like charm. Here ...
0
votes
0answers
36 views

Add and create multiple meta boxes for a custom post type

I'm trying to save the input from the 3 meta boxes I created. Here is my code below. What am I missing since I am only saving the smashing-post-class 3 times. /* Fire our meta box setup function on ...
1
vote
1answer
117 views

Getting List of all registered Dashboard Widgets

I am trying to get a list of all registered meta boxes in the wordpress admin, specifically the Dashboard widgets. Now this is easily achieved with the global variable $wp_meta_boxes and does exactly ...

1
2 3 4 5
33