Tagged Questions

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

learn more… | top users | synonyms (2)

0
votes
0answers
941 views

Displaying Metabox value (custom post type taxonomy)

I have been stuck on this for days, reading articles and articles and nothing works. I am trying to display the value of my metabox on a template page. I successfully added the metabox, and I see ...
0
votes
1answer
92 views

get_post_meta is returning image id

I'm using this script to get image filename, stored in a custom meta called background: $background = get_post_meta( '22', 'background', true ); echo $background; But it is returning the id of the ...
0
votes
0answers
272 views

Inserting image into meta box row using jQuery - always adds to first row

I'm having a problem with inserting images into a custom post type meta box. I have a button that adds a row to the DIV and you click on the Select Image button to use the WordPress media selector. ...
0
votes
0answers
56 views

need help to Arabic text in WordPress in textarea

I am doing a worpdress theme which is in Arabic language. When I write anything in Arabic. It turn into u0646u0646u0646. This appear in custom meta box here my code :- function ...
0
votes
0answers
33 views

How to connect imported metabox content with media library id

i created metabox with media gallery id with it. i don't see any reverence on codex or anything that can point me how to connect my metabox content with media library id during import process. i try ...
1
vote
0answers
55 views

Resetting admin post form on JS validation fail

I've got a custom plugin with a metabox and dynamic form (the user can ask for more elements of the form), with jQuery Validation plugin working great. The problem is when the validation comes back ...
0
votes
1answer
65 views

Use Tag input metabox style for Categories

I am using Categories to create news timelines, For example http://newslines.org/misha-collins/ (check the cloud at the bottom of the page for more examples) The problem is in the Add Post screen. ...
1
vote
1answer
441 views

Save checkbox value in metabox

I created metabox for specific page template. Now I need to save checked or unchecked value of my checkbox. How can I do that? This is my code: add_action('add_meta_boxes', 'add_home_meta'); ...
-1
votes
1answer
35 views

Meta Tags by Meta Box

I have successfully added custom meta tags to metaboxes on my pages. The issue I am having is when the metabox has no data it is still showing in the html. This is the code I have got, does anyone ...
0
votes
0answers
194 views

How include the “text/visual” tabs in your own wp_editor instance?

I've made some meta boxes which use the wp_editor to create the textareas. When someone is on any page in the admin interface and moves from "visual" tab to "text" tab, all my wp_editor boxes show ...
0
votes
0answers
112 views

Custom metabox value not saving

I have a custom meta box on a custom post-type. I've followed this tutorial but can't get the value I enter to save, I'm guessing I've referenced to something incorrectly. I've looked at the other ...
0
votes
1answer
145 views

Custom post-type metabox position

I'm pretty new to Wordpress development, I'm learning about custom post types, custom taxonomies & meta boxes at the moment, following various tutorials online. So please forgive any mistakes! ...
0
votes
0answers
56 views

Posts 2 Posts Custom Admin Box Functionality

I’m using Posts 2 Posts plugin to connect 3 CPTs - Speaker, Session and Event. A user can create a new Session from the Event editor, but that only allows them to specify a title. I’d like them to ...
0
votes
1answer
195 views

Help with my first Metabox helper class

I'm working on a metabox helper class and everything works well, but the radio image field. The images show up, but they aren't clickable. // Print radio_image input. private function ...
0
votes
1answer
89 views

Related posts meta_query CPT

i have two post type "Artists" and "Songs", in "Songs" i have a meta box with checkbox list of "Artists" names. i want to show related posts if any post have same value of post meta with artist ...
2
votes
0answers
65 views

Check for and enforce unique value in user-entered custom meta field in WP Admin

I am trying to figure out how, on a new or edit post screen, to allow the user to enter a custom meta item, BUT force it to be unique. Ideally the process would work like so: Contributor logs into ...
0
votes
2answers
869 views

Add multiple custom meta boxes to different custom post types

I want to add one custom meta box to a specific custom meta type "chifres" and two custom meta boxes to a specific custom meta type "presse". This is how far I've gotten: Here is my code: //Add ...
1
vote
2answers
170 views

Post.php - Conditional statements for new post and edit post

This question came up when creating a custom meta box for the edit.php page. Is there a conditional statement to target posts that are already exist vs posts that are not created yet? The idea: If ...
0
votes
0answers
26 views

Image X or Image Y Based on Meta-Box Input Value

I have a meta box for a film review test site I'm trying to build. I have 3 fields in my meta box, they are $director, $starring and $rating. I want to take the rating, and put it into a page ...
1
vote
1answer
29 views

The Best Way to always load the newest version of 3rd party code

There is a class for plugins and themes that makes custom meta boxes easier to develop called cmb_Meta_Box from Custom-Metaboxes-and-Fields-for-WordPress at ...
1
vote
1answer
87 views

meta box on custom post type

Okay I have look on the site and need more help! I am adding Learndash to my site and need a meta box to show on their custom post type pages. Here is the meta box code I have which works fine for ...
0
votes
0answers
51 views

Support Multiple featured images

I've created a WordPress theme where in one of my pages I need to use two feature images, I know already how to add support for the featured image and I'm using it. My need is how to add a second ...
0
votes
2answers
77 views

add_post_meta Adds post meta but the value is blank

My plugin uses a metabox to save post meta. I have three option in the metabox. Everything is saving/updating/deleting correctly except for this: add_post_meta( $post_id, $meta_key_duration, ...
0
votes
1answer
930 views

Dynamic page.php template for custom post types

I have a couple of custom post types registered. I would like to display all "posts" from each custom post type on its own page, and these pages must be visible in the nav menu. It would be great to ...
0
votes
0answers
99 views

URL field in metabox with page links select

I am building my first metabox and I need to add special field when user can write your own link (URL) to outside page (with http://) or select existing page/post. If user selected that he want to add ...
0
votes
1answer
102 views

Hide custom metabox value from custom fields

Before I ask the question, I tried to added _ to the custom field, but it's not working, at least with my code. I just want to hide the value of my meta box from appearing in the custom fields. When ...
0
votes
1answer
63 views

Adding a meta box to determine the sidebar [closed]

I was trying to customize my WordPress, and I have added some custom meta boxes (it adds custom field) to add values in it, but I don't know how to do this one... I want to a Meta Box, which will be ...
-1
votes
2answers
385 views

Calling Data from Custom Meta Box

I have created a custom meta box which I have pasted in functions.php (minus the <?php call of course) I have two fields in this meta box, one is labeled 'Primary Title' and the other is labeled ...
0
votes
0answers
36 views

Serialization problem after auto-update

I am having a problem with WP serialization. To cut a long story short: the problem appeared two months after the site launch. All the strings of text that were stored as a theme_option or as a meta ...
1
vote
1answer
3k views

Add metabox with media uploader in a custom post type [duplicate]

I need to create a "media uploader metabox" and add it to my custom post type. I've already create normal metaboxes, the function to add to the custom post type and the function to save them, I only ...
0
votes
1answer
107 views

Selecting a dynamic sidebar via metabox in wordpress

I am developing a wordpress theme where are 3 sideboxes. I want to select a sidebox through metabox in my admin page so that particular sidebar shows up in front-end. My codes are:- In function ...
1
vote
0answers
51 views

Retrieving Meta from Image Attachment

I currently have added a meta box to the media library popup using the following: // ADD CUSTOM INFO INSIDE THE MEDIA LIBRARY function AddLibraryFields( $form_fields, $post ) { ...
0
votes
0answers
91 views

New WP_Query loop in admin causes problems

I am working on a project where I have a custom post type 'companies' and on this edit page in the Wordpress admin I have some custom made meta boxes, for saving company information, opening hours, ...
0
votes
0answers
44 views

Add custom metabox in posts

I tried to add a custom meta box following some tutorials like this one but I don't why it doesn't saves any value in the box. There is my code: ...
0
votes
0answers
12 views

Hook on Add new category from post editor [duplicate]

How can I "hook" on Add new category metabox from post editor page? I need to add some default values to DB when adding new category
2
votes
1answer
342 views

WP_List_Table inside metabox not working on submit

I'm trying to display a WP_List_table inside a metabox. The metabox is for a custom taxonomy called 'service' which is registered to a custom post type called 'office'. The table columns contain input ...
0
votes
2answers
458 views

Plugin “Meta Box”: Implementing meta boxes in custom post type

I am a WP beginner and see the potential of the "Meta Box" plugin (http://wordpress.org/plugins/meta-box/). I have already activated the plugin. So far I managed to upload the demo.php and to display ...
0
votes
0answers
28 views

Wordpress - How to make cloning: description and picture

I use the plugin Meta Box Please, help me. I can not make cloning text with a picture when pressing the plus. Here is my code, only the text is cloned: $prefix = 'stepping_'; global $meta_boxes; ...
0
votes
0answers
74 views

Humanmade CMB | How to use checkboxes and radio buttons

I would like some help or advise for using checkbox and radio fields in HM CMB class. Where I am so far I've been using the class to add all types of fields to my projects, with repeatable groups ...
0
votes
1answer
241 views

Metabox Populated with a Custom Post Type - How to Output CPT based on Select?

I have a dropdown metabox populated with a custom post type, now in my template, I can get the value of the metabox output but what I really need is all the information stored from that selected CPT ...
0
votes
1answer
57 views

Display metabox conditionally

I have searched left, right and center and believe that this does not exist as a built in option in WordPress; is there any way to, problematically, display (or not) a metabox in a custom post type ...
1
vote
1answer
77 views

Remove a plugin meta box from the dashboard

I'm trying to remove the meta box that the Download Manager plugin creates, as it uses a hardcoded http iframe, caused a mixed content error in ssl. Here is the code that generates the meta box: ...
0
votes
1answer
21 views

show title if one of post meta exist

I have 4 metabox facebook, twitter, instagram, youtube with title "Follow Us". I am using this code to show facebook logo and link. So if there are a value in facebook metabox I got the logo and the ...
0
votes
0answers
71 views

display specific term based on custom post type in custom taxonomy metabox

I am using a custom taxonomy 'Categories' for more than one custom post types. While adding/editing a post in one of the custom post type, I want to show only specific TERMS under custom taxonomy ...
0
votes
0answers
56 views

How to make duplicatable custom metabox fields for image slider in wp?

I want make duplicatable custom metabox fields for an image slider. For example: Image title field image upload filed add button for add another image. Remove button for remove this individual image ...
0
votes
1answer
127 views

Query a Custom Post Type to another CPT via Metabox

I apologize in advance, I searched for an answer before posting this question but didn't see it, I saw some variations but couldn't quite figure it out. I have 2 custom post types: Buildings and ...
0
votes
0answers
314 views

Humanmade | Custom meta box class: How to display a repeatable meta box group?

I'm using the Humanmade | Custom meta box class to add meta boxes to my themes admin pages. I have integrated the class and have been enjoying the use of adding meta box's to my current projects ...
0
votes
0answers
297 views

Custom post type Featured Image popup not working

I added a custom post type with thumbnail support. When I navigate to the custom post type in the admin backend and add a new one, I can add a featured image. The problem is, when I click the link ...
0
votes
0answers
143 views

How to output data from meta box with cloned fields?

Just to let you know, i am at a beginner level with PHP, so please bear with me : ) Also, I looked at this post and I did not find it helpful in my case, so I am making a stab at it here. (Meta Box ...
0
votes
0answers
111 views

add_post_meta to repeatable metabox from frontend

I'm creating new post from wordpress frontnend. I have managed to create post using wp_insert_post & added single metabox values using add_post_meta successfully. but I'm unable to set values of ...