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

learn more… | top users | synonyms (2)

0
votes
0answers
3 views

Custom meta box not saving values of radio buttons in Wordpress

I dont know where i am going wrong.I want to save the values of my radio buttons in custom meta box.Here is my code. <?php if (!function_exists('custom_meta_box')) { function ...
0
votes
0answers
9 views

Custom meta boxes adding prefix to first category but not others

I've created a custom post type and added some custom meta boxes using this great resource: https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress The problem, I've found, is that ...
0
votes
0answers
14 views

WP Meta Box Not Saving

I've been trying to get this custom meta box to save but it is not working. I've browsed around but still haven't found a solution that works. function add_link_box() { add_meta_box( ...
0
votes
0answers
6 views

Default metadata for Custom Taxonomy when using Add New Item on Post Edit

I have created a custom post type, that has a hierarchical custom taxonomy. This taxonomy has extra custom fields tied to it that save to a custom table in the DB. These fields have default values set ...
1
vote
1answer
28 views

update_post_meta and get_post_meta not working

I am trying to get the input from a textbox and display it upon update. I don't know if the update_post_meta or get_post_meta is causing the problem. Code //Metabox Hook ...
0
votes
0answers
12 views

Run php code when user clicks button in plugin's meta-box?

I added a meta box to the publish entry page. I want to add a button so that when the user clicks it the post is sent by email, for that I need to run a function that get's the $post object when the ...
0
votes
1answer
13 views

List custom post types in metabox

Is there a function to list all custom post types in a metabox? I have wp_list_pages( $args ); to list the pages in metabox but now I need also to list all custom post types. Thanks for advices
3
votes
1answer
62 views

How to make open/closed and hidden/shown metaboxes status saved on a per-post basis?

My real problem is a bit complex, so I'll try here to abstract it and keep it simple. I'm working on a custom app based on WordPress. I registered a custom post type, let's call it "people" where I ...
1
vote
0answers
14 views

cannot grab post meta from extended Walker_Category class properly

Trying to show some custom post meta inside an extended Walker_Category class. I am very inexperienced with Object Oriented Design so this issue is quite difficult for me to solve I am essentially ...
0
votes
0answers
16 views

Cannot add custom image uploader for custome post type in custom wordpress theme

I am trying to set image uploader for a custom post type on a Theme I am developing. The aim is to get it to insert the image URL into the textbox of id "meta-image" but instead it inserts the image ...
0
votes
1answer
19 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 ...
0
votes
0answers
13 views

Long-Running Meta Box Save (Performance)

I have a meta box that's designed to allow the user to check a few boxes to (basically) tie two posts together. The problem is that we have so many posts in the system that the request takes up to 10 ...
0
votes
1answer
32 views

Using WP_Query to grab custom meta values, foreach to json object

So I have 4 custom meta boxes for each post on a wordpress site relating to the product this client sells. I have 3 dropdown boxes, one for category, and two for two of the custom meta boxes. The ...
0
votes
0answers
37 views

Get Metabox taxonomy value and create metabox for termmeta

I got a big problem here. What I want to do is: Create Taxonomy meta box in the post edit screen, lets call it "text_from" Then Depending on the value of the "text_from" meta box display a field ...
0
votes
0answers
19 views

unwanted redirect on saving custom post type / custom post not saving

I've added (or at least attempted to add) a custom post type that has a custom meta box allowing a file to be attached to the post. This function has been spotty at best, allowing some files to be ...
1
vote
0answers
17 views

Page template no longer exists - metaboxes won't save

Ok, this is a weird one. I first experienced this on an older theme that I developed - I assumed I had some buggy code in there somewhere, but couldn't figure it out even with the help of another ...
0
votes
0answers
13 views

WordPress trims an encrypted field

Problem is that when I try to insert a new post into WordPress, the password (encrypted, see code below) is cut. For example: encrypted Ivt9=f:;itKun+TiIarze-GyX5Rt is only Ivt in WordPress. ...
0
votes
1answer
24 views

Error showing in current page id in wordpress admin

I am trying to remove a metabox ID from a page ID in the admin screen. So I have coded the following: function ag_remove_cmb_metaboxes() { global $post; $id = $post->ID; if ($id == ...
0
votes
1answer
25 views

Meta Box value not been pulled in

Here is the code that creates my metabox on my CPT named clients it displays fine and seems to keep the value input upon clicking update. The problem is with displaying the value saved within the ...
0
votes
1answer
47 views

Show value of select dropdown in meta box

I have created a meta box which has a select dropdown list and i want to show it in the post as a user selects a particular option from meta box.I cant figure it out how its done.Here is my meta box ...
0
votes
1answer
31 views

Repeatable WordPress custom fields in a metabox

I would like to create a meta box where the user can add or remove a simple input field that holds an image url on posts.
0
votes
2answers
134 views

How to add multiple images to custom post type?

I would like to create a simple plugin to add multiple images to a custom post type. I have created a plugin to add a single image to a custom post type, but I am unable to figure out how to add ...
0
votes
0answers
37 views

How to create custom Admin Pages for Custom Post types and add meta boxes

What I'm trying to do is : Create custom Admin Menus and Submenus add_menu_page Test add_submenu_page Add New no problem so far, both pages appear in the menu. Now I'm not sure how to add the ...
1
vote
0answers
24 views

How can I edit the 'Most Used' tab in the categories meta-box to show another custom taxonomy?

The 'Most Used' tab in the categories meta-box is the one that can be seen in the Edit Post section. I want to replace the Most Used tab, with a tab that lists another Custom Taxonomy, or edit the ...
0
votes
1answer
30 views

Can't save drop down select date in meta boxes

I want to update my select options(drop down) but i don't know where i made a mistake.Here is my code. <?php function display_post_options(){ wp_nonce_field( basename( __FILE__ ), ...
0
votes
0answers
30 views

Meta-Box to add multiple items one at a time and on publish save all

My example custom content type is for recipes. There will be a meta-box for ingredients. In this meta-box there will be three attributes and a "add" button. Name Measurements Notes Add Button My ...
0
votes
0answers
45 views

Add icon near meta box title in posts/pages

I'm trying to add some "help icon" that will be use to show "help text" with the help of the tooltip or pointers to admin section. Now I'm trying to understand how can I add in the posts/pages in ...
0
votes
0answers
24 views

Attaching meta box to specific category/taxonomy in custom post type

I have this case here and can't figure out how to do it. I have a custom post type with taxonomies and a meta boxes to that specific post type. The idea is some metaboxes to appear only when ...
0
votes
0answers
23 views

How to save meta box check box values and show them on a post?

I added this codes on my child theme functions.php add_action( 'add_meta_boxes', 'cd_meta_box_add' ); function cd_meta_box_add() { add_meta_box( 'my-meta-box-id', 'My First Meta Box', ...
0
votes
1answer
20 views

Adding Metabox Value Using the content filter

I am able to show repeater metabox on index and single post .Now I want to show this using add_filter( 'the_content', 'theme_slug_filter_the_content' ); My code to get meta value <?php $data = ...
0
votes
0answers
9 views

Search taxonomies while creating a post inside metabox

I have a question how to add a "search" buttom to your metabox with taxonomies. Currently I have got around 200 taxonomies and it is really a pain to check the taxonomies. Is there a way so user can ...
0
votes
0answers
20 views

Parent (ID from meta box) not showing in permalink, only Grandparent

I'm working on a site inherited from a previous developer and I've run into a issue that's really confusing. There's a custom post type for Locations. The hierarchy for Location posts would look ...
0
votes
1answer
26 views

update_post_meta does not work

I have meta box in my custom post type where I receive data from a front end form. The issue is that somewhere in this functions, something goes wrong and the data changed in admin edit panel does not ...
0
votes
1answer
31 views

How to get the meta box name and value

I have several meta field like Property Name----->bla bla, Property ID-------->1234, Property Address--->bla bla bla , and so on . I want to print all the meta box name and their value . How can ...
0
votes
0answers
67 views

add_post_meta not saved

EDIT I changed it to if(isset($_POST['Make'])) update_post_meta($pid,"Make", $_POST['Make']); if(isset($_POST['Year'])) update_post_meta($pid,"Year", $_POST['Year']); ...
0
votes
1answer
47 views

Custom Meta Boxes and Fields for WordPress: Change directory upload based on user-edit page

I have already published this on StackOverflow, but I realised it would be better to post it here instead. I am using the CMB script (Custom Meta Boxes and Fields for WordPress) for uploading files ...
0
votes
0answers
9 views

Incoming URL variables to custom metabox

Is it possible to take values from an incoming URL variable and write it to a custom meta box? My client has something like the following for a URL (marketing purposes): ...
0
votes
0answers
35 views

Displaying image from a repeatable group

I am having trouble displaying my image in a repeatable group. I am able to display all fields except the image. Here is the code to display a repeatable group $meta_boxes['project_metaboxpress'] ...
-1
votes
1answer
31 views

Issues on saving data from CPT select metabox

I can't save data from a select metabox. My code is http://pastebin.com/BMmKzti2 Where I'm going wrong? Edit: Here is my code function fichasvtmbasicas_meta_box_callback( $post ) { ...
1
vote
1answer
34 views

Can not pass the value of google pie chart from custom meta box

I am trying to build a google pie chart in my wordpress site based on user input . Hence I have created custom meta box , and use wp_localize_script . Here is what I have done to pass custom metabox ...
1
vote
1answer
22 views

Show meta box only when post is being published first time

I'm creating a WordPress plugin where it is required to show the meta box only when a post is being published for the first time. The only way I can think of is to show the metabox iff there is no ...
0
votes
1answer
76 views

How to add metabox for post of specific category

I want to add Metabox for the posts of category=18 and i am using the following code but unable to do so . So please help me out-> add_action('admin_init','my_meta_init'); function my_meta_init() { ...
0
votes
1answer
18 views

Unable to Call More than One Meta Box Output

I have a custom meta box with multiple text fields. I use this to call the information in the first box: <?php the_post(); echo get_post_meta( get_the_ID(), 'dbt_text', true ); ?> And this to ...
0
votes
1answer
135 views

Using radio button meta data from a custom meta box

Very new to attempting PHP and am hacking together my first plugin using tutorials.. I have a custom meta box with a Yes/No radio button on all WordPress pages (in the editor). EDIT- I removed the ...
0
votes
0answers
52 views

How to add jquery to my custom post type wp plugin

I want to include a jquery to my wordpress custom post type plugin which i have created. i have two doubt,,, the jquery script will work only on widget options (i.e) Sidebar. So when i use the ...
0
votes
0answers
15 views

Hooking into the Meta Boxes (Name/Web Address/Description) on the 'Add New Link' Page

Is there a way to modify/adjust the meta boxes (Name/Web Address/Description) on the 'Add New Link' page? I'm trying to add some jQuery functionality to them but am unsure how to 'hook' into them.
0
votes
0answers
47 views

WordPress check if value equals and echo “checked”

Having some trouble with checking a query against another and outputting a value of checked if it matches. Have tried placing the get_post_meta in a foreach loop and it didn't work, It needs to pull ...
0
votes
0answers
80 views

add_meta_box issues

I have the following code in functions.php: add_action( 'add_meta_boxes', 'create_meta' ); function create_meta(){ add_meta_box( 'Session details', 'Details', 'create_details', 'portfolio', ...
0
votes
1answer
32 views

save_post not called in plugin / custom field still saving overwriting metaboxes

I have a plugin that writes metaboxes to certain pages. It writes the metaboxes fine and everything works as should...until I save. The save_post is not getting called, and I can't figure out why. ...
0
votes
1answer
64 views

Adding a metabox shortcode “paypal accept payment” in my custom post type back-end

I have created a science journal with annotum theme, now I want users to pay when they publish an article, but I don't have programming skills to do this when they click publish to pay with paypal, so ...