Thanks for the reply,
I am familiar with the documentation you provided and how to make custom components. My issue is trying to get my component to utilize the row and column fictionality of the Pro Builder so that I can add elements to my custom component. I have things working and rendering fine on the builder side of things and can add elements to the two columns of my component. The issue is when rendering content when not in the builder view is it only renders elements placed in the first column, but not the second.
Is there anyway you can offer any hint as to what is missing in my component code?
definition.php
class Peekaboo_Content {
public function ui() {
return array(
'title' => __( 'Peek-a-boo Content', 'ev-peekaboo-content' )
);
}
public function flags() {
return array(
'no_server_render' => true,
'context' => '_layout',
'dynamic_child' => true,
'elements' => array(
'floor' => 2,
'ceil' => 2
),
);
}
public function peekaboo_layout() {
return array(
'_column_layout' => '2/2',
'elements' => array(
array(
'_type' => 'column',
'_active' => true,
'size' => '1/2',
),
array(
'_type' => 'column',
'size' => '1/2',
)
)
);
}
public function update_defaults( $defaults ) {
return array_merge($defaults, $this->peekaboo_layout() );
}
// public function register_shortcode() {
// return false;
// }
public function update_build_shortcode_atts( $atts ) {
unset( $atts['title'] );
return $atts;
}
public function update_build_shortcode_content( $content ) {
return $content;
}
}
<?php
/**
* Shortcode handler
*/
$class = "ev-peekaboo-content ev-peekaboo-content--plugin" . $class;
?>
<div <?php cs_atts( array( 'id' => $id, 'class' => $class, 'style' => $style ), true ); ?>>
<?php echo $content; ?>
</div>
Any assistance would be greatly appreciated as solving this will really make this theme useful and allow us to use it on my more projects.
Cheers