0
votes
1answer
10 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
0answers
22 views

Individual page data in one page template

So I am trying to create a one page template but still allow the user to add separate pages in the admin panel. What I did to output all the pages in one template file is as followed: <?php ...
0
votes
1answer
29 views

Display a post count from a custom metabox selection

I was wondering if this is possible. I have a custom post type call projects that displays a metabox with drop down menu. In that drop down menu I have a few choices listed, draft, open, pending, ...
0
votes
1answer
23 views

Meta Box Only in CPT Edit Page, Not in Add New

I have a CTP named leads and have 2 metaboxes added to the CPT new/edit screen. I need to have one of them only in edit screen, not in add new. Played with the codes provided in couple of answers, ...
0
votes
0answers
266 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
53 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 ...
0
votes
1answer
49 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
152 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
60 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
1answer
53 views

Meta box with front-end styling

I have a specific Gallery post of products that I release at the start of every Monday on my website, which differs from my other Gallery posts. These types of Gallery post don't require the Authors ...
0
votes
3answers
119 views

How to Echo Metadata Value in Currency Format

I have a Custom Post Type with a Metabox and an input Text field for adding "Price" to the posts. Now I would like to display the input value which can be like 49 or 59 like 49.00 or 59.00 so far I ...
0
votes
2answers
130 views

Sanitaizing Select Optin For Custom Post Type Metabox in WP

Using WordPress 3.8.1, I have a Custom post Type called "Map" and it contains a Metadata which is a Select options element as: <label for="my_meta_box_select">Countries</label> <select ...
0
votes
1answer
89 views

If custom field doesn't exist, or exists and it's true show title?

Im trying to add new feature to the theme and that's show/hide page title,but since i already have about 50 posts i can't go to all of them and save again just to save custom field values. So i tried ...
0
votes
2answers
120 views

Issue on Working with Metabox - Checkbox to enable Sale Items

Using WP 3.8.1, I have a Custom Post Type which is called "Sport" and it has a Metdabox - medata data as I do not need to set up online shopping but I world like to add Price of my products to any ...
0
votes
0answers
28 views

wp_postmeta are updated for only one page

Code below only updates wp_postmeta of one specific post, not all the posts. On other pages the meta_key is not even added to the table, so it is not the problem with saving but with something else, ...
0
votes
1answer
57 views

Meta box values are displayed on Custom Fields list. Is it possible to hide them?

I have multiple meta boxes for my Custom Post Type posts. I want my users to add new fields using Custom Fields. The problem is - Custom Fields display all the garbage from my metaboxes and it might ...
0
votes
3answers
374 views

shortcode in a custom metabox

I am trying to add a shortcode from a plugin to my custom metabox. I have read it isn't the done thing but in this case i do need it to work. The client might not add a video but might add an image ...
1
vote
2answers
390 views

How to keep a check box in custom meta box for custom post type checked by default for add new post?

In my custom plugin, I have a custom post type and have a custom meta box for it. I have few fields in it, one of it is a check box. I want this check box to be checked by default when I go for a add ...
0
votes
1answer
2k views

How to add multiple featured image in meta box in post editor?

I would like to add multiple featured image in meta box in post editor area apart from default available featured image. I have added the meta box but i have no idea on adding the featured image ...
0
votes
1answer
97 views

How to retrive Custom Post Type Meta Fields in Custom WP_Query

Can some one let me know How I can render the Custom Post Type Meta Fields (Meta-boxes). I have a Custom Post Type Called "News" and I successfully added a Metabox to my Custom Post Type called "News ...
1
vote
1answer
658 views

Get all posts from custom post type and insert in select input as metabox

I would like to know if its possible to do something like this. I have Slider custom post type and Services custom post type. For slider posts I have created a metabox for URL value to display next ...
0
votes
2answers
1k views

Check if meta key value already exists

Let's say that I have few posts with meta key "videoid". Value of that meta key is different for every post (and has to be different). When adding new post, how can I check if videoid with that exact ...
0
votes
1answer
201 views

Any way to update_post_meta with html content? It gets stripped and becomes empty

So I am cloning some divs created from an array using jQuery. Here is an example. I have a drop down list that contains items to add to the meta box. The add button clones a hidden div based on the ...
0
votes
2answers
593 views

Add a meta description to home page?

I have the theme Hatch and I can't figure out how to change the meta-description of the home-page. It is not an actual page, it is the default view for posts. Have searched everywhere for an answer ...
1
vote
1answer
522 views

Create Multiple File Upload Metabox in Wordpress

I am trying to create a metabox to upload multiple files (can be images or files). Currently I have the upload field and its working file till the time we press upload and saving the data. The only ...
0
votes
1answer
259 views

Cannot Save MetaBox Data in Custom Post Type

I've been working on this issue for quite a while and am truly stumped. Below is all of the code for my custom post type: /* Services Post Type */ function services_post_type() { $labels = array( ...
0
votes
1answer
495 views

delete post meta by AJAX

I make meta box to delete a specific post meta key for the post by AJAX i make a button when click , delete the key from DB by AJAX add_meta_box('delete_test_key', 'delete test key', 'testdel', ...
0
votes
0answers
46 views

Displaying additional meta from a custom post type on the page?

I have added the custom field which displays in the custom post type "portfolio" just fine. // Add more custom field function woo_metaboxes_add($woo_metaboxes) { // Check for post type = ...
0
votes
0answers
75 views

when saveing $meta_box i get Undefined index error

I need help to fix these Notices: PHP Notice: Undefined index: person-name in testimonials.php on line 112 PHP Notice: Undefined index: position in testimonials.php on line 112 PHP Notice: Undefined ...
0
votes
1answer
158 views

Simple Custom Metabox Not Saving

I'm not quite sure why but I've been playing around with all kinds of different solutions but none seem to work. I've traded update_post_meta with add_post_meta and even broke it up into 3 ...
1
vote
1answer
673 views

Custom fields to save multiple values

I’m adding custom meta-box, by means of jquery I can create in it several custom fields with a key “test”. There can be one or several custom fields, but the key is only “test”. I can also delete key ...
0
votes
3answers
437 views

Can't publish custom post type - “You are not allowed to edit this post.”

Hey guys I've created this post type but when I click the publish button I receive the message: You are not allowed to edit this post. Have I done something wrong in my code to disallow anyone ...
0
votes
0answers
76 views

Unsetting/Removing custom meta data on a page

I've made a custom meta box where you can upload an image attached to the post. I've done this since the image isn't placed in the normal content area but separate. /*** Custom post upload ***/ ...
0
votes
0answers
423 views

How to upload images as custom field with meta box?

With this sample of code I want to demonstrate that, my meta boxes are working well, entering data into database (postmeta) with the post, except the image files. They are passing the filenames only ...
0
votes
1answer
331 views

Move Title and the Content WYSIWYG editor position

Right now, the Title is the first thing at the top of the page, then we have next the WYSIWYG Editor. I would like to add a Custom Meta Box and insert it before the title or WYSIWYG editor. How can ...
0
votes
1answer
55 views

remove a single post_meta

I created a plugin that has multiple meta boxes. One meta box saves a single record by using update_post_meta(). Another meta box saves multiple record by using add_post_meta(). I do not have ...
0
votes
1answer
400 views

Post meta select input, if statement

I have created a meta box with a select input (drop down menu). It has a few values and I want to display different content depends on which value the user selects. I am just unsure how to display ...
0
votes
1answer
113 views

How to validate select field in post meta?

I want to display a select dropdown field in the post meta. How can I validate the input before saving it? Currently, I am simply saving without validating like this: if ( isset( ...
2
votes
1answer
198 views

unable to save post meta on single field with multiple selects

I set up two select boxes in one meta field by putting two arrays inside the 'options' array of my callback. The HTML is outputting fine, but the meta is not being saved to the database... Here is a ...
1
vote
1answer
892 views

Displaying Meta Box Image

I have some problems displaying info from my custom meta box in my custom post type single. I'm using Reusable Custom Wordpress Meta Boxes by Tammy Hart. I'm able to display the textfields using ...
0
votes
1answer
85 views

Add a class to post_class if more than one post shares same meta_value_num

I would like to be able to add a class such as .samedate to posts that share the same meta_value_num from a custom meta box. So for example: Say two posts share the same custom meta box value for a ...
1
vote
1answer
136 views

Multiplicate entry on update_post_meta

I have a metabox with an array of input: <input type="text" name="activite_dates[]" size="30" /><br /> <input type="text" name="activite_dates[]" size="30" /><br /> <input ...
0
votes
1answer
89 views

When editing a post with a custom meta box the values aren't displaying correctly

I followed this tutorial to create a custom meta box with a simple two option drop down. My code is below. The custom fields are saved when creating a post, and edit when I change the value and ...
1
vote
1answer
223 views

get_posts in meta box dropdown not showing latest posts

I’ve got a metabox I set up using WPAlchemy that allows authors to add a link to an associated post. It’s been working fine for months but now for some reason the dropdown with the appropriate posts ...
1
vote
2answers
2k views

Repeatable custom meta fields

I am working on creating custom meta boxes for the back-end of WordPress. I would like to add a metabox with several fields, in my case an image upload and a text input, but with a button that can ...
0
votes
1answer
137 views

Function to return values from metabox

I have created two custom metaboxes using the Meta Box plugin for my cpt called books, and I am confused how to output the values. The values need to be used in sperate places in one of my templates. ...
3
votes
1answer
168 views

Adding an assisting editor box to Post page

I run a multiple author platform and to improve the moderation, I want to add a couple of assisting editors. I want to add a custom box to the Post page where the assisting editor can confirm which ...
0
votes
1answer
47 views

Add a meta field to the list of results for a custom post type

I've created a Custom Post Type for "Books" ... I've also added several meta fields (custom fields) to each book, and I'd like to be able to display some of those fields in the table of results. Is ...
2
votes
2answers
4k views

Properly add an upload media button in a meta box field

i have a custom post which has a meta tag that needs to be using a file upload (for video files). I am wondering, what is the correct way of adding an Upload button that points to the wordpress media ...
0
votes
1answer
348 views

Empty meta-box returns publishdate if no value is set?

I have no idea why this would/could happen. I have a custom metabox for an "event_end_date" set for a custom-post-type. If I leave this field blank it always puts out the publish-date of the post ...