Questions tagged [cmb2]

CMB2 is a Wordpress library to facilitate creation of custom meta-values and meta-boxes.

CMB2 is a WP library/toolkit to ease the repetitive task of meta-boxes and meta-values definition (that will blow your mind).

47 questions
0
votes
1 answer

Wordpress hide post from custom post-type on a single page

Initial situation custom post-type (projects)[projects.php] _x( 'Projects', 'Post Type General Name', 'main_theme'…
hendrik-eg
  • 7
  • 1
  • 9
0
votes
0 answers

How can I put alt attribute in img cmb2 inside a loop?

this is my first question in stackoverflow. I tried many ways of put the alt attribute but I can't did it. This is my code of customs fields (CMB2) add_action( 'cmb2_admin_init', 'edc_campos_homepage' ); function edc_campos_homepage() { $prefix…
0
votes
1 answer

Display the Metadata is not showing anything in the front-end in cmb2

I am building a website using Wordpress in where I want to show the Metadata from the custom fields. I have setup the cmb2 in my function.php as like below the codes.. add_action( 'cmb2_admin_init', 'cmb2_sample_metaboxes' ); function…
wecade7130
  • 13
  • 3
0
votes
1 answer

CMB2 How do I get my custom fields to show in my template?

$grouped_result ): ?>
0
votes
1 answer

Losing line breaks in Wordpress + q-translate + CMB2 + repeatable group

I'll try to be short: Multilingual Wordpress site with custom post type registered in functions.php and CMB2 for creating custom forms. The plugin for multilingual is q-translate-x and also using CMB2-qTranslate. My problem is that I'm losing all…
user740155
  • 19
  • 1
  • 3
0
votes
1 answer

CMB2 Photo gallery

When creating a CMB2 file_list for images upload to populate a gallery CMB2 online example is laking to show options such as the img alt tag and adding a classes to the images. I do not know how to access the images but only via the supplied code…
Refael
  • 145
  • 2
  • 12
0
votes
1 answer

Implementing cmb_field_map for cmb2

I'm trying to use the cmb_field_map extension by julykaz for cmb2 in a wordpress plugin to display a google map location. https://packagist.org/packages/julykaz/cmb_field_map Have successfully installed it into composer and action hook for…
jerf
  • 1
  • 1
0
votes
1 answer

WordPress with CMB2 and WPML Media: file_list, how to get correct id in translations?

In WordPress I'm using the CMB2 plugins (framework for creating metabox and metafield) and WPML Media (WPML add-on avoids saving the same attachment for each language, creating translations of: title, alt, description and caption, to that only…
benny-ben
  • 422
  • 5
  • 15
0
votes
1 answer

Wordpress / CMB2 Framework / Display data from repeatable fields in frontend

I have a own option-page in the backend-sidebar with this repeatable fields in it. (not a metabox) I cant figure out, how to display the data from the group field in the frontend. function ww_register_theme_options() { $ww_prefix =…
Bavaria
  • 7
  • 4
0
votes
1 answer

cmb2 meta data in save_post filter

I want to access metabox data in save_post filter of wordpress . but I cant access to these meta data because the metabox data writed in post_meta table after post publish... I also use metabox.io plugin and I can access to data in save_post…
0
votes
1 answer

Wp query by postmeta in array field [0]

I'm trying to query a post type by meta value, but the value is [0] field in array. $args = array('post_type'=>'event','meta_query' => array( array( 'key' => 'my_post_multicheckbox', // The right value should be…
Gozer
  • 11
  • 10
0
votes
1 answer

How to display data from cmb2 option page?

I have created a repeatable field with CMB2, and created a normal field. This is the function of https://pastebin.com/XUQgkvbi If you use foreach for repeatable using a post or page then you can show data as: https://pastebin.com/C35vWGDs And Call…
Md Abul Bashar
  • 75
  • 2
  • 12
0
votes
1 answer

CMB2 slow at loading images

I'm trying to setup some custom fields using CMB2 for WordPress. So far simple text fields works, and so does images, but it takes +2min to load an single image using the multiple file field. This is how I use it: Functions.php function…
0
votes
0 answers

Calculate Position/Rank for returned post

Here is the custom post declaration function ts_result_reg() { $labels = array( 'name' => _x( 'Students Result', 'post type general name' ), 'singular_name' => _x( 'Students Result', 'post type singular name' ), 'add_new' => _x( 'Add New Result',…
Samuel Kazeem
  • 787
  • 1
  • 8
  • 15
0
votes
2 answers

Get image alt from cmb2 file filed in loop CMB2

I use WordPress with CMB2 plugin to create custom meta boxes and fields. It works perfectly but I can't get file field type image alt in the loop. I have repeatable field type file successful_students_block_image in meta box called…
nito
  • 45
  • 9