mansion2015
Forum Replies Created
-
Forum: Plugins
In reply to: [Meta Box] problems still even with 4.8.1 updateThe update didnt fix it, for some reason it is just the services part of the homepage section, all the other areas appear to have come back fine but the CSS for that area isnt reading right.
Thanks
Forum: Plugins
In reply to: [Meta Box] problems still even with 4.8.1 updateCan you please take one more look at the my site?
I added the requested changes to my rest site.. http://sandbox.university-bank.com/
but I can not get the green box section to appear right.. there are supposed to be little images in each box and the buttons were aligned before according to my CSS.
Any ideas?
Forum: Plugins
In reply to: [Meta Box] problems still even with 4.8.1 updateSo i added what you requested to my php file on my test site…
http://sandbox.university-bank.com/
you can see that the green background and the background behind the “come in” section came back which is an improvement because before it looked like it did on our live site currently.. http://midwestloanservices.com/
The only thing that hasnt come back are in those boxes with the green background the formatting is off and there are supposed to be three small images, one in each box…
any ideas?
Forum: Plugins
In reply to: [Meta Box] problems still even with 4.8.1 updateI do this just in the one php file?
Forum: Plugins
In reply to: [Meta Box] problems still even with 4.8.1 updateHello –
I visited https://metabox.io/docs/registering-meta-boxes/ and replaced my code with the code in the first section (that is what I had sent you before) I guess i dont get what I need to from there to solve the mix of old syntax (using global variable $meta_boxes) and new syntax (using filter rwmb_meta_boxes) to register meta boxes. can you explain.
Forum: Plugins
In reply to: [Meta Box] problems still even with 4.8.1 update<?php
/**
* Joeby meta boxes – require ‘Meta box’ plugin
*/
$prefix = ‘iweb_’;global $meta_boxes;
$meta_boxes = array();
$value = get_post_meta( get_the_ID(), ‘field_id’, true );
// If field is not cloneable
echo $value;
// If field is cloneable
if ( !empty( $value ) ) {
foreach ( $value as $subvalue ) {
echo $subvalue;
}
}/* =========================================*/
// Homesection meta$meta_boxes[] = array(
‘id’ => ‘sectiontype’,
‘title’ => ‘Home page section type’,
‘pages’ => array( ‘homepagesection’ ),
‘context’ => ‘normal’,
‘priority’ => ‘high’,// List of meta fields
‘fields’ => array(
array(
‘name’ => ‘Section type’,
‘id’ => “{$prefix}section_type”,
‘type’ => ‘select_advanced’,
// Array of ‘value’ => ‘Label’ pairs for select box
‘options’ => array(
‘Default section’ => __( ‘Default section’, ‘rwmb’ ),
‘Portfolio section’ => __( ‘Portfolio section’, ‘rwmb’ ),
‘Contact section’ => __( ‘Contact section’, ‘rwmb’ ),
‘Blog section’ => __( ‘Blog section’, ‘rwmb’ ),
),
// Select multiple values, optional. Default is false.
‘multiple’ => false,
‘std’ => ‘Default section’,
‘placeholder’ => __( ‘Select section type’, ‘rwmb’ ),
),
)
);$meta_boxes[] = array(
‘id’ => ‘sectionoptions’,
‘title’ => ‘Home page section heading’,
‘pages’ => array( ‘homepagesection’ ),
‘context’ => ‘normal’,
‘priority’ => ‘high’,// List of meta fields
‘fields’ => array(
array(
‘name’ => ‘Custom section title’,
‘id’ => $prefix . “section_title”,
‘type’ => ‘text’,
‘std’ => ”,
‘desc’ => ‘Enter your Section title’,
),
array(
‘name’ => ‘Section sub title’,
‘id’ => $prefix . “section_subtitle”,
‘type’ => ‘textarea’,
‘std’ => ”,
‘desc’ => ‘Short paragraph of description under title’,
),
array(
‘name’ => ‘Heading color’,
‘id’ => “{$prefix}section_headingcolor”,
‘type’ => ‘select_advanced’,
// Array of ‘value’ => ‘Label’ pairs for select box
‘options’ => array(
‘dark’ => __( ‘Dark’, ‘rwmb’ ),
‘light’ => __( ‘Light’, ‘rwmb’ ),
),
// Select multiple values, optional. Default is false.
‘multiple’ => false,
‘std’ => ‘dark’,
‘placeholder’ => __( ‘Select’, ‘rwmb’ ),
‘desc’ => __( ‘Select section heading color’, ‘rwmb’ ),),
array(
‘name’ => __( ‘Disable section heading on frontend’, ‘rwmb’ ),
‘id’ => “{$prefix}section_disableheading”,
‘type’ => ‘checkbox’,
// Value can be 0 or 1
‘desc’ => ‘Check to disable section heading on frontend’,
‘std’ => 0,
),
)
);$meta_boxes[] = array(
‘id’ => ‘sectionstyleoptions’,
‘title’ => ‘Customize home page section styling’,
‘pages’ => array( ‘homepagesection’ ),
‘context’ => ‘normal’,
‘priority’ => ‘high’,// List of meta fields
‘fields’ => array(array(
‘name’ => ‘Add background image’,
‘id’ => “{$prefix}section_bgimg”,
‘type’ => ‘plupload_image’,
‘desc’ => ‘Upload image’,
‘max_file_uploads’ => 1,
‘std’ => ”,
),array(
‘name’ => ‘Use background color’,
‘id’ => “{$prefix}section_bgcolor”,
‘type’ => ‘color’,
‘desc’ => ‘Select color’,
‘std’ => ”,
),
array(
‘name’ => ‘Section border’,
‘id’ => “{$prefix}section_border”,
‘type’ => ‘select_advanced’,
// Array of ‘value’ => ‘Label’ pairs for select box
‘options’ => array(
‘border’ => __( ‘Border’, ‘rwmb’ ),
‘noborder’ => __( ‘No Border’, ‘rwmb’ ),
),
// Select multiple values, optional. Default is false.
‘multiple’ => false,
‘std’ => ‘noborder’,
‘placeholder’ => __( ‘Select’, ‘rwmb’ ),
‘desc’ => __( ‘Enable or disable section border (top & bottom)’, ‘rwmb’ ),),
array(
‘name’ => ‘Border color’,
‘id’ => “{$prefix}section_bordercolor”,
‘type’ => ‘color’,
‘desc’ => ‘Select color’,
‘std’ => ”,
),)
);// ====== testimonial ====
$meta_boxes[] = array(
‘id’ => ‘testimonialoptions’,
‘title’ => ‘Testimonial options’,
‘pages’ => array( ‘testimonial’ ),
‘context’ => ‘normal’,
‘priority’ => ‘high’,// List of meta fields
‘fields’ => array(
array(
‘name’ => ‘Testimonial name’,
‘id’ => $prefix . “testimonial_name”,
‘type’ => ‘text’,
‘std’ => ”,
‘desc’ => ‘Enter your testimonial name’,
),array(
‘name’ => ‘Testimonial author job/description’,
‘id’ => $prefix . “testimonial_job”,
‘type’ => ‘text’,
‘std’ => ”,
‘desc’ => ‘Enter your testimonial job or description’,
),array(
‘name’ => ‘Testimonial author image’,
‘id’ => “{$prefix}testimonial_img”,
‘type’ => ‘plupload_image’,
‘desc’ => ‘Upload image’,
‘max_file_uploads’ => 1,
‘std’ => ”,
),
array(
‘name’ => ‘Testimonial text’,
‘id’ => $prefix . “testimonial_testi”,
‘type’ => ‘textarea’,
‘std’ => ”,
‘desc’ => ‘Testimonial testimonial’,
),)
);// ==== end testimonial ====
/* Portfolio meta */
$meta_boxes[] = array(
‘id’ => ‘portfoliooptions’,
‘title’ => ‘Portfolio detail’,
‘pages’ => array( ‘portfolio’ ),
‘context’ => ‘normal’,
‘priority’ => ‘high’,// List of meta fields
‘fields’ => array(
array(
‘name’ => ‘Portfolio item title’,
‘id’ => $prefix . “portfolio_title”,
‘type’ => ‘text’,
‘std’ => ”,
‘desc’ => ‘Enter your portfolio title’,
),
array(
‘name’ => ‘Portfolio item sub title’,
‘id’ => $prefix . “portfolio_subtitle”,
‘type’ => ‘text’,
‘std’ => ”,
‘desc’ => ‘Enter your portfolio subtitle (you can also use this field to enter author name e.g by Alexander Doe’,
),
array(
‘name’ => ‘External link URL’,
‘id’ => $prefix . “portfolio_extlinkurl”,
‘type’ => ‘text’,
‘std’ => ”,
‘desc’ => ‘Enter portfolio external link URL’,
))
);/* =========================================*/
// Page meta
/* =========================================*/$meta_boxes[] = array(
‘id’ => ‘page_meta’,
‘title’ => ‘Inner page heading title (Only for for inner page)’,
‘pages’ => array( ‘page’,’post’),
‘context’ => ‘normal’,
‘priority’ => ‘high’,// List of meta fields
‘fields’ => array(
array(
‘name’ => ‘Heading title’,
‘id’ => $prefix . “heading_title”,
‘type’ => ‘text’,
‘std’ => ”,
‘desc’ => ‘Enter your heading title, leave this blank if you want to use your page or post title’,
),)
);/********************* META BOX REGISTERING ***********************/
/**
* Register meta boxes
*
* @return void
*/
/**
* Edit/remove meta boxes already registered by a parent theme / plugin
* Priority 20 makes sure all meta boxes are already registered
*/add_filter( ‘rwmb_meta_boxes’, ‘YOURPREFIX_register_meta_boxes’ );
function YOURPREFIX_register_meta_boxes( $meta_boxes ) {
$prefix = ‘rw_’;
// 1st meta box
$meta_boxes[] = array(
‘id’ => ‘personal’,
‘title’ => __( ‘Personal Information’, ‘textdomain’ ),
‘post_types’ => array( ‘post’, ‘page’ ),
‘context’ => ‘normal’,
‘priority’ => ‘high’,
‘fields’ => array(
array(
‘name’ => __( ‘Full name’, ‘textdomain’ ),
‘desc’ => ‘Format: First Last’,
‘id’ => $prefix . ‘fname’,
‘type’ => ‘text’,
‘std’ => ‘Anh Tran’,
‘class’ => ‘custom-class’,
‘clone’ => true,
),
)
);
// 2nd meta box
$meta_boxes[] = array(
‘title’ => __( ‘Media’, ‘textdomain’ ),
‘post_types’ => ‘movie’,
‘fields’ => array(
array(
‘name’ => __( ‘URL’, ‘textdomain’ ),
‘id’ => $prefix . ‘url’,
‘type’ => ‘text’,
),
)
);
return $meta_boxes;
}Forum: Plugins
In reply to: [Meta Box] problems still even with 4.8.1 updateVery frustrating! Hopefully there is a new update/fix soon. My client is not impressed!
Forum: Plugins
In reply to: [Meta Box] problems still even with 4.8.1 updateHello –
This was done to a test version of the site that is not live, I didn’t want to break our real site, the changes did not help.
Please advise.
Thanks