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

saving custom meta fields multidimensional array

I have dynamic meta fields with multi select option each field contains select menu with multiple select feature user can add as much options as they can so i want to save it in the db but not sure ...
0
votes
0answers
8 views

Metabox for searching/selecting arbitrary pages?

I'd like to create a meta box for my pages that allows me to declare arbitrary links to one or more related pages, with the idea being that I could then render these after the page content. E.g. "If ...
0
votes
2answers
27 views

Orderby my needs in foreach loop like by title or something?

in a cpt i can check some values (checkboxes) in a metabox. i can access this values by $meta = get_post_meta(get_the_ID(), '_custom-meta-box', true ); after that, i do a foreach loop: foreach ($...
0
votes
0answers
11 views

How to store and retrieve custom metabox data as json in wordpress api

I am trying to store metabox data as json in wordpress and then get it using wp-json api. What i tried $current = array( 'id' => "in json object", 'name' => 'name in json object' ); $...
0
votes
1answer
18 views

Save meta box data from selected dropdown list in bbpress reply form

I hope to customize bbpress reply form area with dropdown selection list. I could not find any previous post reporting similar case in bbpress. Referring to post "Save meta box data from selected ...
0
votes
0answers
17 views

Custom Metabox Info Not Saving

I have a custom metabox on a custom post type, and the input data disappears after I save/update the post. I've read through a bunch of similar questions but can't find an answer that fixes it for me. ...
1
vote
1answer
13 views

Adding custom fields to bbpress reply form

Referring to post "adding-custom-fields-bbpress-topic-form" with link https://wp-dreams.com/articles/2013/06/adding-custom-fields-bbpress-topic-form/, I want to add custom fields to bbpress reply form ...
0
votes
0answers
15 views

Check if any meta on the post has value then display content

I know how to use the conventional get_post_meta, and I usually call it with each field separately. Is there a way to use them all at once? For example, use an if statement to display content if any ...
-1
votes
0answers
18 views

Advanced Search Metabox Problem

There is no special metabox in the https://github.com/ivandoric/wp-advanced-search demo examples in this framework. Is there anyone who can help?
0
votes
0answers
13 views

create a “add icon” field in taxonomies page

Similar to this post but not quite, I have a Wordpress theme with free Fontawesome already installed and I wish to add a field in the "create Categories" box where I could type in and choose an icon ...
0
votes
1answer
31 views

save_post_{$post->post_type} action firing on second save

I have custom metabox checkbox on CPT in my plugin. I want to fire an action and save new option when I save this post. But no matter how many times I tried it's saving option value only on second ...
0
votes
0answers
15 views

Metabox collapsed by default

I need to make a metabox of a WordPress Plugin called "post expirator" collapsed by default. Right now it is open. actually when i open a page : My need : That is the part of the code adding ...
0
votes
0answers
7 views

custom metabox content not saved into database

I have added some metaboxes to my wordpress theme. I'm facing the issue that the data will not be saved inside the database and I get only empty field in the backend. I've inspected the ajax response, ...
0
votes
0answers
9 views

How to save custom metabox tinymce content and preserve gallery attached to it

I have a class that will register some metaboxes in my custom theme and i need to fix some small problems with it. I have added a tinymce instance inside some metaboxes. I want to add also a text ...
1
vote
0answers
29 views

what is the difference between these phares?

I have mutli input fields in custom metabox.However, only 2-3 array items show on page, others doesnt seem.For example, "text-ruby" shows but "textname" doesnt show.Why? What is the difference between ...
0
votes
1answer
18 views

Metabox types list

For example, in below code snippet, there are some types for custom metabox input fields such as text and textarea.So, I want to learn other types.I searched it on google also w.se.com but I couldnt....
0
votes
0answers
11 views

Not able to show entered value for a text input in a meta box

So I've searched for weeks and I know there are a lot of questions about this topic but I cannot figure out how to show the value that a user inputs into a text field in a custom meta box. I get the ...
0
votes
0answers
14 views

Wordpress action not working inside another action

I am developing a plugin where I want to add some script only when the metabox will add . So I tried following code add_meta_box( $args['id'], $args['...
0
votes
0answers
20 views

How to add html to the meta box display area?

I am a blogger, don't know much about code. I have created a meta box follow the instruction Article source link for posts. However, it cannot insert a href link and , . Code: /* Define the ...
0
votes
0answers
12 views

How to save and retrieve the metabox select options values

I am facing a problem with my metabox dropdown list populated with custom post types, i am unable to save and display the selected option and when i checked by enabling custom fields from the screen ...
0
votes
0answers
13 views

How to make footer with custom post type?

I have a question in mind that How to make footer/header with custom post type using wpbaker? I mean can we make a layout with custom post type and assign separate layout to the separate pages. Do you ...
0
votes
0answers
15 views

How to get custom post type with dynamic ID

I want to show a custom post type chosen from the meta box dropdown list but i am getting this error Notice: Trying to get property of non-object in C:\xampp\htdocs\wordpress\wp-content\themes\...
1
vote
1answer
18 views

PHP basics help in WP context - remove a class/function?

(Disclaimer: I am a designer by choice and a programmer only by necessity. Meaning I can somewhat read PHP code, but I have a harder time writing it myself. I wish I could be better though, and this ...
1
vote
0answers
13 views

Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?

I'm currently working on a website that has a custom post type ("schedules") that requires custom hierarchal taxonomies (named "location" and "servicetype" in this case) to be displayed as radio ...
0
votes
0answers
9 views

Author, Contributor Notes / Requirements Metabox, Specific To Selected Author, Contributor

Client's online publication has a lot of contributors with specific guidelines, some contractual. Posts are not always created or edited by the contributor, so we need a way to populate these ...
1
vote
1answer
19 views

Need Help Fixing My Iframes [closed]

i have this code that shows different servers to watch a videos on the code: <div class="container-disable"> <ul class="tabs-ul nav-justified clearfix"> <?php $repeatable_fields = ...
0
votes
0answers
19 views

change the dropdown content of author post meta in edit post - admin

I am trying to customize the author meta box in the post edit page, as you all know this dropdown is using to assign a post to a corresponding author. I would like to change the dropdown content. ...
0
votes
0answers
24 views

how to Add Meta Box with featured image settings and To Edit Post Screen For Inline Styles (css box)?

How can i make this meta box please help? function add_custom_meta_box1() { add_meta_box( 'meta-box1', 'Featured Image Settings ', '...
0
votes
0answers
29 views

Wordpress Blocks, setAttributes not saving

My block seems to work correctly, unfortunately none of my metadata gets saved after saving the article. You can find source code for my block in this repository. It simply adds a toggle to set a ...
0
votes
0answers
18 views

I have added title and a wpeditor in metabox in page below the default editor and main title. But i want custom metabox title to be secondary title?

function custom_meta_box_markup2($post) { global $post; wp_nonce_field( basename(__FILE__ ), 'custom_meta2_nonce'); $custom_stored_meta2 = get_post_meta( $post->ID, 'sec_title', true ); ...
0
votes
3answers
84 views

How to get checkbox by default true in metabox?

Can't get my checkbox for metafield set true by default. Everything is working fine, except default value. I know there is a lot of questions and answers for it, But I tried everything and still ...
0
votes
1answer
56 views

PHP Notice: Undefined index: mytheme_meta_box_nonce

There is a bug about my metaboxes in debug.log: [12-Mar-2020 13:00:05 UTC] PHP Notice: Undefined index: mytheme_meta_box_nonce in /home/deniztas/migrate666.deniz-tasarim.site/wp-content/themes/...
0
votes
1answer
34 views

I have added a metabox and inside it i added a secondary title and a text editor but if i write anything it does not save it or show it on my page

functions.php file: function add_custom_meta_box2() { add_meta_box( 'meta-box2', 'SD Extra Page/Post Options ', 'custom_meta_box_markup2', ...
0
votes
0answers
24 views

Order custom metabox in diferent page templates

I have multiple pages created with a linked custom template. I have installed the toolset plugin that allows creating custom fields and linking them to page templates. Each page has different groups ...
0
votes
2answers
25 views

Using Customizer API vs Custom Meta Box for custom content

I just started diving into the wordpress world and i'm trying to add custom content to a website, i looked at the Customizer API and Meta box and they seem to be both able to add what i want which is ...
0
votes
1answer
54 views

Get or set values in post meta

I've built this theme option, based on the following tutorial https://rudrastyh.com/gutenberg/plugin-sidebars.html#registerPlugin but now I'm having trouble figuring out how to send the post/page ...
0
votes
0answers
71 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
36 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
18 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
1answer
22 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
16 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(...
1
vote
1answer
27 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
50 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 ...
2
votes
1answer
37 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 ...
1
vote
1answer
117 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 ...
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 ...
0
votes
1answer
32 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 ...
0
votes
1answer
37 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/ ...
0
votes
1answer
22 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
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 ...

1
2 3 4 5
32