Closed alfgago closed 8 years ago
1) Nope. Similar questions (same answer) https://github.com/ThemeFuse/Unyson/issues/721 https://github.com/ThemeFuse/Unyson/issues/827 2) oembed was added in v2.4.17 https://github.com/ThemeFuse/Unyson-Extensions-Approval/issues/171 3) See the second restriction http://manual.unyson.io/en/latest/options/introduction.html#restrictions
Sorry for late reply.
Have a nice day!
I found a "solution" for this, it's working great for me if anyone is needing this like I did. Just add the metaboxes in page.php like you would normally do and then in functions.php you can remove those you don't need depending on the page template.
I have something like this for my specific needs, here I remove "one_page_box" option from the options when the template is not selected, and remove others when it is selected:
function elias_remove_meta_fp(){
$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;
$template_file = get_post_meta($post_id,'_wp_page_template',TRUE);
// check for a template type
if ($template_file == 'one-page.php') {
remove_meta_box( 'eg-meta-box' , 'page', 'normal' );
remove_meta_box( 'fw-options-box-page-builder-box' , 'page', 'normal' );
remove_meta_box( 'mymetabox_revslider_0','page','normal' );
remove_meta_box( 'aFhfcMetaBox','page','normal' );
remove_post_type_support( 'page', 'editor' );
}else{
remove_meta_box( 'fw-options-box-one_page_box' , 'page', 'normal' );
}
}
add_action( 'do_meta_boxes', 'elias_remove_meta_fp' );
Hope this helps someone
Hi, I'm making my first theme with Unyson and I must say I'm loving it so far. Just having a few issues when creating custom metabox. and I have a few questions.
So, what I want is to have a different metabox depending on the post format (video, audo, image, etc).
For the video metabox, so far I have this in post.php:
But there's 2 problems with that, and those are my second and third issues:
2) oembed type is not working, it just shows /* UNDEFINED OPTION TYPE */ in the post metabox
3) 'attr' => array( 'class' => 'custom-class', 'data-foo' => 'bar' ), is not doing anything, the class does not appear to be there.
Thank you.