Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
0answers
10 views

Hide excerpt note [duplicate]

Under the WordPress excerpt meta box is a note: Excerpts are optional hand-crafted summaries of your content that can be used in your theme. Learn more about manual excerpts. Is it possible to ...
0
votes
0answers
9 views

How retrieve custom meta box user input value to another admin page

In my plugin I made a custom metabox, inside metabox have a input field(users can submit) , I think i need to use post id it's a custom post type called products. I did it many ways but it's not ...
0
votes
0answers
14 views

Starting with tabbed metabox

I need a tabbed metabox for my plugin. Actually they are 5 metaboxes each one in a tab. I found these scripts: https://speckyboy.com/10-simple-code-snippets-creating-beautiful-tabs/ Which one is ...
1
vote
1answer
14 views

How can I filter the contents of a metafield before it's displayed in the admin?

With the cmb2 plugin I created a metabox with a textarea metafield this way: function myprefix_register_metabox() { $prefix = 'myprefix_'; $cmb = new_cmb2_box( array( 'id' => $...
0
votes
1answer
31 views

Admin metabox with custom post type dropdown option not update choosed input after saving

I'm trying to build a little plugin for wp that add a button to custom post type page http://example.com/events that have a link to another custom post type page that I can choose from a dropdown menu ...
1
vote
2answers
23 views

Outputing a metabox textarea and avoid line breaks inside li tags

I have added a custom metabox that holds string from a textarea in database. Now if I just simply echo the meta box like this: $post_meta = get_post_meta($pid); $answer = $post_meta["answer"][0]; ...
0
votes
0answers
13 views

Issue on Creating Checkbox Field On Custom Post type

Can you please look at this demo let me know how I can create and save a checkbox as a custom field in Custom Post Type? function render_metas( $post ) { $we_productMetas = get_post_custom( $post-...
0
votes
0answers
6 views

SAVE RESULTS CHECKLIST IN METABOX ON PRODUCT ADMIN

I add a metabox in the admin on the product page to be able to link products to a page. For now everything works, I display all the sub-pages that interests me, my problem is to save the result when ...
0
votes
0answers
14 views

Custom taxonomy to display in dropdown in custom meta box

I have a custom taxonomy associated with a custom post type. I would like to be able to display it in a dropdown menu (so you can only select one taxonomy type) and also would like to have the ...
0
votes
0answers
16 views

Woocommerce add a text field if specific option is selected

I need to make active/visible a new filed before 'Add to cart' button, only if user select a specific option. The case is simple: I sell t-shirt with options: "Small", "Medium", "Large", "Size upon ...
0
votes
1answer
19 views

Custom meta box data array: foreach not working correctly?

I have written a plugin to create a new custom post type named gardener, and have added a custom taxonomy called region, in addition to a meta box with several fields called _gardener_address. The ...
1
vote
0answers
17 views

Remove anchor tag from meta box link

i've created my own metabx. You can select items (shortcodes) from my plugin und these shortcodes return html code. How can i remove the complete a-Tag from my own meta-box content? meta_box ...
0
votes
1answer
16 views

Woocommerce wp-admin search products through custom meta value too

Right now I can search only through title and content. How can I search also through a custom meta box value?
0
votes
0answers
12 views

metabox images outside post (wordpress)

i have a little problem while getting images from a post to an external page, ex: i want to use lastest post images inside a slider used as header placed to the homepage (i'm using metabox to insert ...
0
votes
0answers
81 views

Creating a “Related Meta” type field?

I need a unique meta box which can contain auto-updating elements similar to how a tag cloud would appear. Example. identifier id : animals identifier data : Dog, Cat, Horse, Pig I need to know ...
0
votes
1answer
24 views

How to Use Custom Meta Field Instead of CPT Title in Post URL

I have a custom Post Type which is not using any of WP builtin supports like( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ). Instead I am using my own metaboxes to publish the CPT. ...
0
votes
0answers
20 views

How to Upload CSV Data into Custom Post Type Data with Metabox programmatically

I have a Custom Post Type called movies which had only title enabled from post support and 3 custom field of metabax as box office, year, and director like now I have like 150 rows CSV formatted ...
0
votes
2answers
55 views

Scripts and tags will not save or output from my custom meta box

I am copying this tutorial to make my own custom meta box https://www.sitepoint.com/adding-meta-boxes-post-types-wordpress/ It works perfectly, however I need to be able to enter script tags into ...
0
votes
1answer
20 views

How to store multiple custom meta box

I am trying to store a multidimensional array of a Quiz where I dynamically add question box. But I am not able to figure out how to store dynamically added question box. The code is below function ...
1
vote
2answers
21 views

Undefined Variable - Custom Post Type Meta

I've read many related questions and have tried all that I could so make sure it's actually a duplicate before flagging please. I've been using WordPress for about 6 years so when I say I'm stuck, I ...
0
votes
0answers
23 views

Featured Gallery to custom post type

I want to show Featured Gallery metabox in my custom post type. I have it only in article page, and i want to add it to my custom post type. How i can do it ? I tried with this, but not work : ...
0
votes
1answer
23 views

Custom taxonomy with custom post type archive page

I created a sustom taxonomy and a custom post type via Metabox plugin. I am able to create custom post type posts and assign them to the custom taxonomies. But when I am trying to list them on an ...
0
votes
0answers
20 views

Input for Wordpress Meta Box not saving after publish/update

I have been working for this code to add Meta Box into Global Tab in Woocommerce Single Product. My new tab is "Table of Content", and I want to out Meta Box in that tab so I could update more ...
0
votes
2answers
28 views

Meta Box: display single image on an archive-template

I'm trying to get the url of an image from a MetaBox (plugin) filed on an archive-page. <?php if ( rwmb_meta( 'field-id' ) ) { // Get images $img_srcset_large = ...
1
vote
1answer
27 views

Having trouble getting my meta data to save

All I'm doing is creating a simple meta box for my posts that calls the existing tags, then displays them in a select drop down list for the editor to choose. I feel I'm so close in making this done.....
0
votes
2answers
23 views

How to set Post meta-box defaults based on the choices made by user in Customizer?

I have a radio control in the theme customizer. The code for that control is like below: $wp_customize->add_setting( 'post_layout', array( 'capability' => 'edit_theme_options', 'default' =&...
3
votes
1answer
26 views

Display Single Attachment Image file size, uploaded date, resolution, file-name etc in Sidebar

Sorry for any wrong details. I am totally new to WordPress development. I am running a photo site. On single attachment page, I want to show the details (i.e upload date, filename, size, resolution) ...
0
votes
1answer
17 views

How many meta-query fields support WordPress search at a time?

I am new developer. I want know How many meta-query fields support WordPress search at a time? I saw that its getting (500 time out) errors after nine fields.
0
votes
0answers
12 views

Styling the post author meta box without editing the wp core

I'm using Advanced custom fields so that I could place a checkbox 'Certified' in user panel. I look at the user profile and check the box if the user meets certain criteria. I would like to style the ...
2
votes
1answer
138 views

Gutenberg add a custom metabox to default blocks

Is it possible to add custom meta boxes to the default blocks in Gutenberg? I would need to add a user-defined data-attribute to each block. This data-attribute then would be printed on the frontend ...
1
vote
1answer
40 views

global $post; in WooCommerce

Is there a reason when using the add_meta_box() callback, that when I do global $post I can't seem to access anything, or get the ID. I'm in WooCommerce, do I need to use global $product instead... if ...
0
votes
1answer
22 views

Embedded Options in a Custom Metabox

I am successfully able to create a number of custom metaboxes. There are a number of tutorials online that help with that. My question is how to include embedded options in a custom metabox? So, ...
0
votes
0answers
24 views

Programmatically create new post from a metabox button

Given a classic course-lesson structure, created by custom post types, I want to add a new empty lesson for a course, by using a simple html form on a metabox, in the course edit screen. I think I ...
0
votes
1answer
13 views

How to add custom post widgets as tags into wordpress

I want to make same functionality as tags working into a post. I want to add some custom file to be add as downloads, where i can add images/files/pdf from a URL, and it will saved as tags, we can ...
0
votes
1answer
54 views

update_post_meta doesn't work

I've been drilling with codes for so long. I was trying to create a metabox with a simple textare on it. Been stuck for almost 10 hours tyring to solve this. Still up until right now my meta box ...
0
votes
0answers
12 views

Start Post Edit Page With All MetaBoxes Closed

Is there a way to have all the metaboxes start out collapsed (i.e., closed) when editing a page? Either a plugin, function, piece of javascript code?
0
votes
1answer
130 views

Show metabox only for homepage

I'll try to add metabox to homepage with setting fields, but something went wrong, help me please. The metabox don't appear in page editor, when i remove if statement it shows on all pages. ...
0
votes
0answers
16 views

Putting two metaboxes in each woocommerce product edit pages for minimum and maximum ordering number without plugin

How can put two fields in each product editing page for setting minimum and maximum ordering.and then display one field in checkout page and prevent by tooltip messages out of min and max range.
0
votes
0answers
17 views

Is it possible to save radio buttons appended by javascript?

I am trying to append some radio button fields in meta box content. However, when I try to save it into my database it does nothing. $("#result").append("<input style='display:inline-block !...
0
votes
0answers
10 views

How to update form fields in a WordPress Dashboard Wiget?

With normal custom meta boxes, this can be done with update_post_meta($post['ID']), but a WordPress Dashboard Widget isn't a post nor does it have an ID. I can't seem to find an equivalent function ...
1
vote
0answers
14 views

Grouping metadatas into one

I want to have some custom metadatas for my custom post type. I know how to add the metadatas one by one, but I need to some of them together, considered as a single metadata. For example lets assume ...
0
votes
0answers
31 views

How to override inc/meta-banner.php in wordpress child theme

In the WordPress Parent theme inside inc folder I have meta-banner.php, in this php file I have some meta boxes which is include via inc/meta-function.php in all posts and pages. add_meta_box('...
0
votes
0answers
15 views

How to produce functions dynamically

I'm trying to add some meta boxes in new post page but instead of doing copy paste and changing some values; echo '<a href="#">Add New</a>'; I want to add a link and add an onClick ...
0
votes
2answers
122 views

Updating post meta for checkbox

<div class="vp-field vp-checkbox vp-checked-field vp-meta-single" data-vp-type="vp-checkbox" id="_custom_meta[category][]"> <div class="label"> <label>Categories</label> &...
3
votes
1answer
65 views

How to limit the pages displayed for choosing parent page on page attribute's menu?

I have a site with a lot of pages. I would like to know if there is a method to display only the pages that I want to be displayed on the menu for choosing the parent page. A lot of them are child ...
0
votes
1answer
23 views

Wordpress admin area: select box with 12.000+ options

I have a custom post type that in admin area has a select custom meta box with 12.000+ options. So, in some cases, WordPress show an error message like memory exhausted. Which could be a good ...
0
votes
0answers
9 views

count meta field in taxonomy with custom post type

I am searching for that but i can't get it I have a post type called: lessons with it, I have a taxonomy called lessons_txt as custom taxonomy with custom post type. with every sub taxonomy in that ...
0
votes
1answer
19 views

Saving metabox content not working

I'm trying to save a metabox input but it doesn't seem to work. I'm working with arrays (as I need my metabox to have 60 rows), so I assume the problem lies within them. This is my metabox function ...
0
votes
0answers
27 views

Adding Editing (backend) metaboxes for a given post type to the frontend

Apologies that this question isn't coming with a pre-existing code attempt by yours truly; this need is a bit above my current skill level (but I'm working very hard to improve at it). I'd like to ...
0
votes
1answer
16 views

How to verify nonces in bulk?

Hey I'm relatively new to WP, and I'm trying to get a handle on nonces since they're a good security check. I'm having difficulty verifying my nonces in save_post however. The checks fail on the $...