Example #1
0
function print_package_item($item_xml)
{
    $header = find_xml_value($item_xml, 'header');
    print_item_header($header, '', '', find_xml_value($item_xml, 'icon-class'));
    global $paged, $sidebar_type, $package_div_size_num_class;
    if (empty($paged)) {
        $paged = get_query_var('page') ? get_query_var('page') : 1;
    }
    $num_fetch = find_xml_value($item_xml, 'num-fetch');
    $num_excerpt = find_xml_value($item_xml, 'num-excerpt');
    $pagination = find_xml_value($item_xml, 'pagination');
    $item_type = find_xml_value($item_xml, 'item-size');
    $item_class = $package_div_size_num_class[$item_type]['class'];
    $item_size = $package_div_size_num_class[$item_type][$sidebar_type];
    $category = find_xml_value($item_xml, 'category', false);
    $category = $category == 'All' ? '' : $category;
    $order = find_xml_value($item_xml, 'order');
    $orderby = find_xml_value($item_xml, 'orderby');
    // start fetching database
    query_posts(array('post_type' => 'package', 'paged' => $paged, 'order' => $order, 'orderby' => $orderby, 'package-category' => $category, 'posts_per_page' => $num_fetch));
    echo '<div class="package-item-holder">';
    if ($item_type == '1/4 Grid Style' || $item_type == '1/3 Grid Style' || $item_type == '1/2 Grid Style' || $item_type == '1/1 Grid Style') {
        print_widget_package($item_class, $item_size, $item_type, $num_excerpt);
    } else {
        if ($item_type == '1/4 Grid 2nd Style' || $item_type == '1/3 Grid 2nd Style' || $item_type == '1/2 Grid 2nd Style' || $item_type == '1/1 2nd Grid Style') {
            print_grid2_package($item_class, $item_size, $item_type, $num_excerpt);
        } else {
            if ($item_type == '1/1 Medium Thumbnail') {
                print_medium_package($item_class, $item_size, $num_excerpt);
            }
        }
    }
    echo '</div>';
    echo '<div class="clear"></div>';
    if ($pagination == "Yes") {
        pagination();
    }
    wp_reset_query();
}
Example #2
0
echo '<div class="gdl-page-left mb0 ' . $sidebar_array['page_left_class'] . '">';
echo '<div class="row">';
echo '<div class="gdl-page-item mb0 pb20 ' . $sidebar_array['page_item_class'] . '">';
if (is_tax('portfolio-category') || is_tax('portfolio-tag')) {
    // portfolio archive
    $port_size = get_option(THEME_SHORT_NAME . '_portfolio_archive_size', '1/4');
    $show_title = get_option(THEME_SHORT_NAME . '_portfolio_archive_show_title', 'Yes') == "Yes" ? true : false;
    $show_tag = get_option(THEME_SHORT_NAME . '_portfolio_archive_show_tags', 'Yes') == "Yes" ? true : false;
    print_normal_portfolio($port_size, $show_title, $show_tag);
} else {
    if (is_tax('package-category') || is_tax('package-tag')) {
        $item_type = '1/4 Grid Style';
        $item_class = $package_div_size_num_class[$item_type]['class'];
        $item_size = $package_div_size_num_class[$item_type][$sidebar_type];
        $num_excerpt = 150;
        print_widget_package($item_class, $item_size, $item_type, $num_excerpt);
    } else {
        // blog archive
        $item_type = get_option(THEME_SHORT_NAME . '_search_archive_item_size', '1/1 Full Thumbnail');
        $num_excerpt = get_option(THEME_SHORT_NAME . '_search_archive_num_excerpt', 285);
        $full_content = get_option(THEME_SHORT_NAME . '_search_archive_full_blog_content', 'No');
        global $blog_div_size_num_class;
        $item_class = $blog_div_size_num_class[$item_type]['class'];
        $item_size = $blog_div_size_num_class[$item_type][$sidebar_type];
        echo '<div id="blog-item-holder" class="blog-item-holder">';
        if ($item_type == '1/4 Blog Widget' || $item_type == '1/3 Blog Widget' || $item_type == '1/2 Blog Widget' || $item_type == '1/1 Blog Widget') {
            print_blog_widget($item_class, $item_size, $num_excerpt, $full_content, $item_type);
        } else {
            if ($item_type == '1/1 Medium Thumbnail') {
                print_blog_medium($item_class, $item_size, $num_excerpt, $full_content);
            } else {