Esempio n. 1
0
<?php

/**
 * Template Name: Custom Template
 */
$settings = get_option('experiensa-segment-settings');
$segment = new Experiensa\Component\Segment($settings);
$segment->setDataFromTemplateName('Custom Template');
$segment_container = $segment->getContainer();
$segment_align = $segment->getAlignment();
$segment_background = $segment->getBackground();
?>
<div class="ui <?php 
echo $segment_background['class'];
?>
 vertical segment" style="<?php 
echo $segment_background['style'];
?>
">
  <div class="ui <?php 
echo $segment_container['class'];
?>
" style="<?php 
echo $segment_container['style'];
?>
">
  <?php 
while (have_posts()) {
    the_post();
    ?>
    <div class="ui <?php 
Esempio n. 2
0
//$taxs = \Experiensa\Modules\QueryBuilder::getTaxonomies();
//    echo "<pre>";
//    print_r($taxs);
//    echo "</pre>";
$sections = new Experiensa\Component\Section($page_id, $settings);
if ($sections->checkExistSectionOptions()) {
    $segments = $sections->getSegmentList();
    //        echo "<pre>";
    //    print_r($segments);
    //    echo "</pre>";
    foreach ($segments as $segment) {
        $segment_options = $sections->getSegmentOptions($segment);
        //        echo "<pre>";
        //        print_r($segment_options);
        //        echo "</pre>";
        $segment_obj = new Experiensa\Component\Segment(['segment_options' => $segment]);
        $segment_obj->setDataFromSegmentOptions($segment);
        $segment_container = $segment_obj->getContainer();
        $segment_align = $segment_obj->getAlignment();
        $segment_background = $segment_obj->getBackground();
        ?>
<div class="ui <?php 
        echo $segment_background['class'];
        ?>
 vertical segment" style="<?php 
        echo $segment_background['style'];
        ?>
">
    <div class="ui <?php 
        echo $segment_container['class'];
        ?>