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

learn more… | top users | synonyms (2)

0
votes
1answer
534 views

Save JSON object attributes to custom metabox

Case: I use a imagepicker.js script to create a image picker for my custom meta box. But this doesn't work for WP 3.6 anymore, So i'm trying to create a image picker metabox with the new media ...
0
votes
1answer
126 views

Let author add field to metabox by pressing a button

I have added a custom metabox for authors where they can fill in a url to a source, which I can then use in my template. In my functions.php <?php /* Add metaboxes (see below) */ function ...
0
votes
0answers
26 views

Post workflow with users and moderators

some of my users are allowed to write posts in my blog. I want to associate some "moderators" to their post, so i don't have to check them all myself. I can separate for which user which moderator is ...
0
votes
1answer
68 views

Specific Page that convert Hyperlink to anchor in nav menu

I extended my Walker_Nav_Menu that converting hyperlink to anchor as I'm making one page website. Here is the code: class description_walker extends Walker_Nav_Menu{ function start_el(&$output, ...
5
votes
3answers
2k views

How to add a class to meta box

When adding a metabox, i.e.: add_meta_box( 'metabox_id', 'Metabox Title', 'my_metabox_callback', 'page', 'normal', 'low', array( 'foo' => $var1, 'bar' => $var2) ); ...
1
vote
1answer
343 views

How do I get attachment_id?

This is trivial, but I can't really find an answer, I've seen some hints like search in database etc., but this is madness. Basically, I have a metabox with upload button that allows you to upload or ...
0
votes
0answers
20 views

Can I attach the data from one post to another?

I'm looking to create a "snippets" plugin of sorts that lets me create a library of snippets. I then want to be able to attach those snippets to a post but not within the post_content. I basically ...
0
votes
0answers
24 views

Category Template - to be editable from the backend?

I have different categories that includes posts of the category. I want to add text and images before or after the posts of the categories are displayed on the frontend. I want to solve this via ...
0
votes
1answer
53 views

Generating image sizes when uploading through wp.media

Finding documentation on wp.media is really tough, so bear with me. I'm creating a metabox to attach images to a custom post type. I'm able to get a media frame to open, have it accept uploads, and ...
9
votes
5answers
6k views

WordPress SEO by Yoast: Hide Meta boxes in posts for non-admins

I have multi-author website and I am not very comfortable for allowing all members to enter SEO details in the posts they are publishing. I would like this would be visible only to Administrator of ...
0
votes
0answers
44 views

Sort by a date field in a repeatable group

I'm using cmb2 WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress. I have a repeatable group for events with the meta_key 'date'. The repeatable group 'date' serialized array includes ...
0
votes
0answers
38 views

Custom Permalink Post with meta value

I would like to use two metabox values in order to build the permalinks for all posts (standard post type of wordpress). But after rewriting the permalink, it links to a page that contains a part of ...
0
votes
0answers
40 views

How To Show/Hide WordPress Meta Boxes Fields According to Option Select

I have a select list with values hosts and html5 and 3 custom fields. On select with value hosts 2 fields (Youtube and Vimeo) should appear, and if value is html5 the remain (Embed) should appear. ...
0
votes
1answer
56 views

How to insert data from metabox to custom table

I have created a custom table to save post data from custom meta box And I have a problem in saving data from custom meta box to custom table so this is my function save_meeting_meta_box() ...
0
votes
1answer
106 views

Save Metabox Custom Field Value

I am using this code to show post type dropdown to select available post types but when i submit the post it restores the value back to post, how can i make sure it saves it? <select ...
0
votes
1answer
52 views

problem with updating metabox of upload image

I created a custom post type and metabox for uploading another image. the problem is when i add the image its shown correctly in its place in backend and when i update its also the same i had the ...
0
votes
1answer
86 views

add_post_meta | update_post_meta | Via the frontend

I am having a difficult time trying to figure out how to save user meta data to a post. The goal that I am trying to accomplish is this, have a user make a selection from a drop down list, and save ...
0
votes
4answers
1k views

Remove custom metaboxes from custom post type

Is there a away to create a custom post type in wordpress that will only include the default metaboxes and not any other metabox that was added by other plugins. The idea is to use the custom post ...
0
votes
1answer
73 views

Custom meta box repeated field

I want to add a field in my custom meta box, same as below, but not for tags. How can I repeatedly take more inputs in the same field? Here is my code added to functions.php: function ...
0
votes
0answers
80 views

Admin - Plugin: create custom page with ID

I want to create a plugin in order to generate shortcode settings. My aim is to create a plugin page with add menu action and in this page to have a button in order to create a new setting page with a ...
1
vote
2answers
1k views

Wordpress 4 and wp_editor() Not Showing Visual/Text tabs

I use wordpress a lot, i develop for it a lot too! I have a client website that i have added 10 custom meta boxes to the post edit screen in functions.php . All the meta boxes have an editor using ...
0
votes
0answers
72 views

Search form to find custom meta box generated data

I have developed an inner theme plugin, which is a custom meta box that inserts some typed in text to the database and then displays in the application. I followed the example found at this link. Now ...
5
votes
1answer
2k views

Can you make a custom metabox field be required to save a new post?

I am working on a custom post type, I have removed all the standard wordpress form items and started from scratch with custom meta boxes, except the title field. In my situation, it is really ...
0
votes
0answers
67 views

Problem with 'save_post' hook not running

I have a custom post type, with a custom meta box which contains a number of input fields. The meta box is displaying fine but when completing all the fields the data is not saving, in fact, the ...
0
votes
0answers
23 views

Fixed values for same post translations

I was recently implementing a custom post type in WordPress, and added WPML so I could translate it's title & content. This post type (city) also has some custom metaboxes (metabox.io) like: ...
0
votes
0answers
48 views

Post meta sanitization and escaping

I'm writing a plugin that adds a text meta box where user enters (supposedly) media URL, which then is displayed in posts with $featured_media = get_post_meta( $post_id, '_meta_key', true ); echo ...
0
votes
1answer
326 views

Insert media button will always add into the same tinyMCE editor

I have an issue with the insert-media button. I have 2 instances of tinyMCE with both Add Media button. When I add a media in one of the two tinyMCE, all my media will go in this after, whatever which ...
-2
votes
1answer
125 views

How to change data format in custom meta box field [closed]

I want to chage date format to d-m-y means day-month-year format . I have added 'date_format' => __( 'd-m-Y', 'cmb2' ) But not working. now it's month-day-year formated . Actually i want to ...
0
votes
1answer
32 views

How to make post page unique and show it on home page?

I don't know if the title is correct but I'll try to explain my question below. I have created a custom post type "Projects" and the trick is that one project have to be unique and displayed on ...
0
votes
1answer
49 views

How to add a text widget on the posts admin page?

I need to add a text widget on the posts admin page ie, the post editor page. so that I can add some code in the text widget for some purposes. Right now I have used text widget and this can only be ...
0
votes
1answer
32 views

Displaying a div from an assigned meta_value when on a page

On my website I created a custom metabox that is being displayed in the post type "page". The metabox will display a checkbox and 4 url fields. The checkbox will control the visibility of a div ...
0
votes
1answer
37 views

Why is the text displaying, but not the textarea field itself?

So, I have a textarea as a field in a meta box, if I do this it works OK: $meta = get_post_meta($post->ID, 'twitter_embed', true); echo '<table class="form-table">'; echo ...
0
votes
0answers
44 views

assign custom post type to another post type

My question is based on those answer: http://wordpress.stackexchange.com/a/85281/68506 and http://wordpress.stackexchange.com/a/5778/68506 What I need is 2 dropdown from a custom_post_type in ...
10
votes
2answers
9k views

Custom field/meta populated by dropdown of existing posts?

(My first WP question ever asked! Be gentle!) I'm building a site that is mostly pages (i.e., static), using WP as CMS. At the bottom of several of the pages, there will appear 1, 2, or 3 "promo ...
0
votes
1answer
27 views

Metabox of one post influence setting on other

This great answer by David Gard allowed me to have a metabox sticky (checkbox) for posts that could only be set (checked) on one posts in the loop at a time. If post A has that meta box checked, then ...
0
votes
0answers
102 views

add_meta_box() and post formats

function myplugin_add_meta_box() { add_meta_box( 'myplugin_sectionid', __( 'My Post Section Title', 'myplugin_textdomain' ), 'myplugin_meta_box_callback', 'post' ); } add_action( ...
0
votes
0answers
12 views

Category metabox with floating categories

I was wondering if is possible to have floating categories in categories metabox. If you have many categories is very complicated find a categories with the whole tree opened. A (+/-) button would be ...
0
votes
0answers
16 views

Displaying randomly created meta values in wysiwig editor

I have already asked this question on stack overflow but I'm asking it once again here because i haven't found a solution to it yet. I am creating custom meta info for a post that will have null ...
0
votes
0answers
16 views

Populate field on submission via edit page

I've got a events listing plugin which I need to modify slightly. When adding an event via the edit / new page in admin the event date is split into 3 parts, like so: ente$meta_box_events = array( ...
0
votes
0answers
13 views

2 instances of same widget on the admin dashboard

I find the "Google Analytics Dashboard for WP" plugin very good and I especially like the admin dashboard widget/metabox (not sure about the right name). Problem is, it show only one stat at the time ...
0
votes
1answer
32 views

custom field not saved

help me please: my custom metabox not save !! #add a metabox add_action( 'add_meta_boxes', 'adding_meta_box' ); function adding_meta_box() { add_meta_box( 'meta_box_id', 'اطلاعات پست', ...
0
votes
0answers
34 views

filters to pass html correctly from tinyMCE meta box

I have a meta box that uses tinyMCE but all html tags I use are simply being passed as text instead of correctly encoded on the page. Seems to be a filters issue, but I have no idea where to apply ...
1
vote
0answers
82 views

Add custom buttons with custom actions in Edit Post screen in WordPress?

I am creating something for a client and I have a Class that I created with a Custom Post Type called 'PuSH Feeds' and when the user adds a new post and publishes it they can then click on one of two ...
0
votes
1answer
51 views

Automating the process of shortcode generation in a plugin - how is it done?

Automatic short code generation is a technique that I see many plugin authors use but unfortunately, I have yet to come across a tutorial that details this subject so I am hoping that someone in this ...
10
votes
4answers
7k views

Passing error/warning messages from a meta box to “admin_notices”

I have a simple meta box that updates the post custom fields (using update_post_meta()). How can I send a error or warning message to the next page after the user publishes/updates the post and ...
1
vote
1answer
28 views

Understanding and using metaboxes in posts

I am developing my first theme that is not dependent on a parent theme but I am running into some back-end problems. I'm trying to add a metabox to all posts that are being written. This question is ...
0
votes
1answer
62 views

add_meta_box creating default form field types

I'm using add_meta_box as per the Codex entry. My question is about the 'callback' to print the form fields on the admin page. In the Codex, the form fields are echoed as written out HTML elements, ...
0
votes
0answers
50 views

how to get post by metabox in wp_query

I want to WP_query by tag_id but i need to insert tag_id by metabox i cant do it and give wrong any one help me? $value = get_post_meta( $post->ID, '_my_meta_value_key', true ); <?php ...
0
votes
0answers
193 views

WP media manager in metabox to choose all media types

I'm trying to make a metabox for featured media on my posts, and would like to use the Media Manager like it is used in the editor, which is with all the options. I've tried this and similar things ...
7
votes
5answers
2k views

Does Wordpress have a “Form API”

I do most of my development in Drupal, however I am working on a Wordpress site and I need to make a form. Which got me thinking, is there a Form API for wordpress like there is Drupal? Is there a way ...