Beispiel #1
0
 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts['class'] = !empty($meta['custom_class']) ? $meta['custom_class'] : "";
     $grid = new avia_post_grid($atts);
     $grid->query_entries();
     return $grid->html();
 }
?>
 units' <?php 
avia_markup_helper(array('context' => 'content', 'post_type' => 'portfolio'));
?>
>

                    <div class="entry-content-wrapper clearfix">

                        <div class="category-term-description">
                            <?php 
echo term_description();
?>
                        </div>

                    <?php 
$grid = new avia_post_grid(array('linking' => '', 'columns' => '3', 'contents' => 'title', 'sort' => 'no', 'paginate' => 'yes', 'set_breadcrumb' => false));
$grid->use_global_query();
echo $grid->html();
?>
                    </div>

                <!--end content-->
                </main>
				<?php 
//get the sidebar
$avia_config['currently_viewing'] = 'portfolio';
get_sidebar();
?>

			</div><!--end container-->
Beispiel #3
0
 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts['class'] = !empty($meta['custom_class']) ? $meta['custom_class'] : "";
     if (current_theme_supports('avia_template_builder_custom_post_type_grid')) {
         if (isset($atts['link'])) {
             $atts['link'] = explode(',', $atts['link'], 2);
             $atts['taxonomy'] = $atts['link'][0];
             if (isset($atts['link'][1])) {
                 $atts['categories'] = $atts['link'][1];
             }
         }
         if (empty($atts['post_type']) || !current_theme_supports('add_avia_builder_post_type_option')) {
             $atts['post_type'] = get_post_types();
         }
         if (is_string($atts['post_type'])) {
             $atts['post_type'] = explode(',', $atts['post_type']);
         }
     }
     $atts['fullscreen'] = ShortcodeHelper::is_top_level();
     $grid = new avia_post_grid($atts);
     $grid->query_entries();
     $portfolio_html = $grid->html();
     if (!ShortcodeHelper::is_top_level()) {
         return $portfolio_html;
     }
     $params['class'] = "main_color avia-no-border-styling avia-fullwidth-portfolio " . $meta['el_class'];
     $params['open_structure'] = false;
     $params['id'] = !empty($atts['id']) ? AviaHelper::save_string($atts['id'], '-') : "";
     $params['custom_markup'] = $meta['custom_markup'];
     //we dont need a closing structure if the element is the first one or if a previous fullwidth element was displayed before
     if ($meta['index'] == 0) {
         $params['close'] = false;
     }
     if (!empty($meta['siblings']['prev']['tag']) && in_array($meta['siblings']['prev']['tag'], AviaBuilder::$full_el_no_section)) {
         $params['close'] = false;
     }
     $output = avia_new_section($params);
     $output .= $portfolio_html;
     $output .= avia_section_after_element_content($meta, 'after_portfolio');
     return $output;
 }
Beispiel #4
0
 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts['class'] = !empty($meta['custom_class']) ? $meta['custom_class'] : "";
     if (current_theme_supports('avia_template_builder_custom_post_type_grid')) {
         if (isset($atts['link'])) {
             $atts['link'] = explode(',', $atts['link'], 2);
             $atts['taxonomy'] = $atts['link'][0];
             if (isset($atts['link'][1])) {
                 $atts['categories'] = $atts['link'][1];
             }
         }
         if (empty($atts['post_type']) || !current_theme_supports('add_avia_builder_post_type_option')) {
             $atts['post_type'] = get_post_types();
         }
         if (is_string($atts['post_type'])) {
             $atts['post_type'] = explode(',', $atts['post_type']);
         }
     }
     $grid = new avia_post_grid($atts);
     $grid->query_entries();
     return $grid->html();
 }