• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP pagenavi函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中pagenavi函数的典型用法代码示例。如果您正苦于以下问题:PHP pagenavi函数的具体用法?PHP pagenavi怎么用?PHP pagenavi使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了pagenavi函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: content

 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $output = $tax_terms = $filter = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'item_count' => '-1', 'category' => '', 'pagination' => 'no', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // CLIENTS QUERY SETUP
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $client_args = array('post_type' => 'clients', 'post_status' => 'publish', 'paged' => $paged, 'clients-category' => $category_slug, 'posts_per_page' => $item_count);
     $clients_items = new WP_Query($client_args);
     $items .= '<ul class="clients-items clearfix">';
     $client_width = 124;
     $client_height = 124;
     // CLIENTS LOOP
     while ($clients_items->have_posts()) {
         $clients_items->the_post();
         $client_image = get_post_thumbnail_id();
         $client_img_url = wp_get_attachment_url($client_image, 'full');
         $client_link_url = get_post_meta($post->ID, 'sf_client_link', true);
         $items .= '<li class="clearfix client-item">';
         $items .= '<figure>';
         $image = aq_resize($client_img_url, $client_width, $client_height, true, false);
         if ($image) {
             if ($client_link_url) {
                 $items .= '<a href="' . $client_link_url . '" target="_blank"><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" /></a>';
             } else {
                 $items .= '<img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" />';
             }
         }
         $items .= '</figure>';
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap">';
         $items .= pagenavi($clients_items);
         $items .= '</div>';
     }
     // PAGE BUILDER OUPUT
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_clients_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper clients-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_text_heading">' . $title . '</h3></div>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
开发者ID:nilmadhab,项目名称:webtutplus,代码行数:58,代码来源:clients.php


示例2: content

 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $output = $filter = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', "item_count" => '12', "category" => '', 'pagination' => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $team_args = array('post_type' => 'team', 'post_status' => 'publish', 'paged' => $paged, 'team-category' => $category_slug, 'posts_per_page' => $item_count, 'ignore_sticky_posts' => 1);
     $team_members = new WP_Query($team_args);
     $count = 0;
     $items .= '<ul class="team-members clearfix">';
     while ($team_members->have_posts()) {
         $team_members->the_post();
         $member_name = get_the_title();
         $member_position = get_post_meta($post->ID, 'sf_team_member_position', true);
         $member_image = get_post_thumbnail_id();
         $member_page_link = get_permalink();
         $items .= '<li data-id="id-' . $count . '" class="clearfix team-member four columns">';
         $img_url = wp_get_attachment_url($member_image, 'full');
         $image = aq_resize($img_url, 220, 298, true, false);
         $items .= '<figure>';
         if ($image) {
             $items .= '<a href="' . $member_page_link . '"><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $member_name . '" /></a>';
         }
         $items .= '</figure>';
         $items .= '<h4 class="team-member-name">' . $member_name . '</h4>';
         $items .= '<h5 class="team-member-position">' . $member_position . '</h5>';
         $items .= '<a class="read-more" href="' . $member_page_link . '">' . __("Find out more", "swiftframework") . '<i class="icon-chevron-right"></i></a>';
         $items .= '</li>';
         $count++;
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap full-width">';
         $items .= pagenavi($team_members);
         $items .= '</div>';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="team_list_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper">';
     $output .= $title != '' ? "\n\t\t\t" . '<h3 class="wpb_heading">' . $title . '</h3>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
开发者ID:adams0917,项目名称:woocommerce_eht,代码行数:57,代码来源:team.php


示例3: content

 public function content($atts, $content = null)
 {
     $title = $order = $items = $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'item_count' => '-1', 'order' => '', 'category' => '', 'pagination' => 'no', 'el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
     $output = '';
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // JOBS QUERY SETUP
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $jobs_args = array('orderby' => $order, 'post_type' => 'jobs', 'post_status' => 'publish', 'paged' => $paged, 'jobs-category' => $category_slug, 'posts_per_page' => $item_count);
     $jobs = new WP_Query($jobs_args);
     $items .= '<ul class="jobs clearfix">';
     // PORTFOLIO LOOP
     while ($jobs->have_posts()) {
         $jobs->the_post();
         $job_title = get_the_title();
         $job_text = get_the_content();
         $items .= '<li class="job">';
         $items .= '<h3>' . $job_title . '</h3>';
         $items .= '<div class="job-text">' . do_shortcode($job_text) . '</div>';
         $items .= '</li>';
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap">';
         $items .= pagenavi($jobs);
         $items .= '</div>';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper jobs-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_text_heading"><span>' . $title . '</span></h3></div>' : '';
     $output .= "\n\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     //
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
开发者ID:nilmadhab,项目名称:webtutplus,代码行数:49,代码来源:jobs.php


示例4: content


//.........这里部分代码省略.........
             $image_width = 540;
             $image_height = 540;
             $item_class = 'col-sm-6';
         } else {
             if ($item_columns == "3") {
                 $image_width = 360;
                 $image_height = 360;
                 $item_class = 'col-sm-4';
             } else {
                 $item_class = 'col-sm-3';
             }
         }
     }
     $items .= '<ul class="team-members row clearfix">';
     while ($team_members->have_posts()) {
         $team_members->the_post();
         $member_name = get_the_title();
         $member_position = sf_get_post_meta($post->ID, 'sf_team_member_position', true);
         $member_bio = get_the_content();
         $custom_excerpt = sf_get_post_meta($post->ID, 'sf_custom_excerpt', true);
         if ($custom_excerpt != "") {
             $member_bio = sf_custom_excerpt($custom_excerpt, 1000);
         }
         $member_email = sf_get_post_meta($post->ID, 'sf_team_member_email', true);
         $member_phone = sf_get_post_meta($post->ID, 'sf_team_member_phone_number', true);
         $member_twitter = sf_get_post_meta($post->ID, 'sf_team_member_twitter', true);
         $member_facebook = sf_get_post_meta($post->ID, 'sf_team_member_facebook', true);
         $member_linkedin = sf_get_post_meta($post->ID, 'sf_team_member_linkedin', true);
         $member_google_plus = sf_get_post_meta($post->ID, 'sf_team_member_google_plus', true);
         $member_skype = sf_get_post_meta($post->ID, 'sf_team_member_skype', true);
         $member_instagram = sf_get_post_meta($post->ID, 'sf_team_member_instagram', true);
         $member_dribbble = sf_get_post_meta($post->ID, 'sf_team_member_dribbble', true);
         $member_xing = sf_get_post_meta($post->ID, 'sf_team_member_xing', true);
         $member_image = get_post_thumbnail_id();
         $member_link = get_permalink();
         $items .= '<li itemscope data-id="id-' . $count . '" class="clearfix team-member ' . $item_class . '">';
         $img_url = wp_get_attachment_url($member_image, 'full');
         $image = sf_aq_resize($img_url, $image_width, $image_height, true, false);
         $items .= '<figure class="gallery-style">';
         if ($image) {
             $items .= '<a href="' . get_permalink() . '"><img itemprop="image" src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" /></a>';
         }
         $items .= '<figcaption>';
         $items .= '<h5 class="team-member-name">' . $member_name . '</h5>';
         $items .= '<h5 class="team-member-position">' . $member_position . '</h5>';
         if ($member_twitter || $member_facebook || $member_linkedin || $member_google_plus || $member_skype || $member_instagram || $member_dribbble || $member_xing != "") {
             $items .= '<ul class="social-icons">';
             if ($member_twitter) {
                 $items .= '<li class="twitter"><a href="http://www.twitter.com/' . $member_twitter . '" target="_blank"><i class="fa-twitter"></i><i class="fa-twitter"></i></a></li>';
             }
             if ($member_facebook) {
                 $items .= '<li class="facebook"><a href="' . $member_facebook . '" target="_blank"><i class="fa-facebook"></i><i class="fa-facebook"></i></a></li>';
             }
             if ($member_linkedin) {
                 $items .= '<li class="linkedin"><a href="' . $member_linkedin . '" target="_blank"><i class="fa-linkedin"></i><i class="fa-linkedin"></i></a></li>';
             }
             if ($member_google_plus) {
                 $items .= '<li class="googleplus"><a href="' . $member_google_plus . '" target="_blank"><i class="fa-google-plus"></i><i class="fa-google-plus"></i></a></li>';
             }
             if ($member_skype) {
                 $items .= '<li class="skype"><a href="skype:' . $member_skype . '" target="_blank"><i class="fa-skype"></i><i class="fa-skype"></i></a></li>';
             }
             if ($member_instagram) {
                 $items .= '<li class="instagram"><a href="' . $member_instagram . '" target="_blank"><i class="fa-instagram"></i><i class="fa-instagram"></i></a></li>';
             }
             if ($member_dribbble) {
                 $items .= '<li class="dribbble"><a href="http://www.dribbble.com/' . $member_dribbble . '" target="_blank"><i class="fa-dribbble"></i><i class="fa-dribbble"></i></a></li>';
             }
             if ($member_xing) {
                 $items .= '<li class="xing"><a href="' . $member_xing . '" target="_blank"><i class="fa-xing"></i><i class="fa-xing"></i></a></li>';
             }
             $items .= '</ul>';
         }
         $items .= '</figcaption>';
         $items .= '</figure>';
         $items .= '</li>';
         $count++;
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap">';
         $items .= pagenavi($team_members);
         $items .= '</div>';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = spb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="team_list_widget spb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="spb_wrapper">';
     $output .= $title != '' ? "\n\t\t\t" . '<h3 class="spb-heading"><span>' . $title . '</span></h3>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     global $sf_include_isotope, $sf_has_team;
     $sf_include_isotope = true;
     $sf_has_team = true;
     return $output;
 }
开发者ID:VeritasStrategies,项目名称:Poplin,代码行数:101,代码来源:team.php


示例5: pagenavi

	<?php 
if ($pagination == "infinite-scroll") {
    global $sf_include_infscroll;
    $sf_include_infscroll = true;
    $pagination_output .= '<div class="pagination-wrap hidden">';
    $pagination_output .= pagenavi($wp_query);
    $pagination_output .= '</div>';
} else {
    if ($pagination == "load-more") {
        global $sf_include_infscroll;
        $sf_include_infscroll = true;
        $pagination_output .= '<a href="#" class="load-more-btn">' . __('Load More', 'swiftframework') . '</a>';
        $pagination_output .= '<div class="pagination-wrap load-more hidden">';
        $pagination_output .= pagenavi($wp_query);
        $pagination_output .= '</div>';
    } else {
        if ($pagination == "standard") {
            if ($blog_type == "masonry") {
                $pagination_output .= '<div class="pagination-wrap masonry-pagination">';
            } else {
                $pagination_output .= '<div class="pagination-wrap">';
            }
            $pagination_output .= pagenavi($wp_query);
            $pagination_output .= '</div>';
        }
    }
}
echo $pagination_output;
?>

</div>
开发者ID:Infernosaint,项目名称:WPSetupTest2,代码行数:31,代码来源:search.php


示例6: content


//.........这里部分代码省略.........
             } else {
                 if ($width == "2/3") {
                     $columns = 4;
                     $item_size_class = 'span2';
                 } else {
                     if ($width == "3/4") {
                         $columns = 3;
                         $item_size_class = 'span3';
                     } else {
                         if ($column_width != "") {
                             if ($column_width == "1/3") {
                                 $columns = 2;
                             } else {
                                 if ($column_width == "1/2") {
                                     $columns = 3;
                                 } else {
                                     if ($column_width == "3/4") {
                                         $columns = 4;
                                     } else {
                                         $columns = 6;
                                     }
                                 }
                             }
                         } else {
                             $columns = 6;
                         }
                     }
                 }
             }
         }
     }
     $auto = false;
     if ($carousel_auto == "yes") {
         $auto = true;
     }
     if ($carousel == "yes" || $carousel == "") {
         $items .= '<div class="carousel-wrap">';
         $items .= '<div id="carousel-' . $sf_carouselID . '" class="clients carousel-items clearfix" data-columns="' . $columns . '" data-auto="' . $auto . '">';
     } else {
         $items .= '<div class="carousel-grid row">';
     }
     $client_width = apply_filters('sf_clients_image_width', 200);
     $client_height = apply_filters('sf_clients_image_height', 200);
     // CLIENTS LOOP
     while ($clients_items->have_posts()) {
         $clients_items->the_post();
         $client_image = get_post_thumbnail_id();
         $client_img_url = wp_get_attachment_url($client_image, 'full');
         $client_link_url = sf_get_post_meta($post->ID, 'sf_client_link', true);
         $client_link_same_window = sf_get_post_meta($post->ID, 'sf_client_link_same_window', true);
         $image_alt = esc_attr(sf_get_post_meta($client_image, '_wp_attachment_image_alt', true));
         $target = "_blank";
         $items .= '<div class="clearfix carousel-item client-item ' . $item_size_class . '">';
         $items .= '<figure>';
         $image = sf_aq_resize($client_img_url, $client_width, $client_height, true, false);
         if ($image) {
             if ($client_link_url) {
                 if ($client_link_same_window) {
                     $target = "_self";
                 }
                 $items .= '<a href="' . $client_link_url . '" target="' . $target . '"><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $image_alt . '" /></a>';
             } else {
                 $items .= '<img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $image_alt . '" />';
             }
         }
         $items .= '</figure>';
         $items .= '</div>';
     }
     wp_reset_postdata();
     if ($carousel == "yes" || $carousel == "") {
         $items .= '</div>';
         $items .= '<a href="#" class="carousel-prev"><i class="ss-navigateleft"></i></a><a href="#" class="carousel-next"><i class="ss-navigateright"></i></a>';
         $options = get_option('sf_dante_options');
         if ($options['enable_swipe_indicators']) {
             $items .= '<div class="sf-swipe-indicator"></div>';
         }
         $items .= '</div>';
     } else {
         $items .= '</ul>';
         // PAGINATION
         if ($pagination == "yes") {
             $items .= '<div class="pagination-wrap">';
             $items .= pagenavi($clients_items);
             $items .= '</div>';
         }
     }
     // PAGE BUILDER OUPUT
     $el_class = $this->getExtraClass($el_class);
     $width = spb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="spb_clients_widget spb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="spb_wrapper clients-wrap carousel-wrap alt-nav">';
     $output .= $title != '' ? "\n\t\t\t" . '<h3 class="spb-heading spb-text-heading"><span>' . $title . '</span></h3>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     global $sf_include_carousel;
     $sf_include_carousel = true;
     return $output;
 }
开发者ID:VeritasStrategies,项目名称:Poplin,代码行数:101,代码来源:clients.php


示例7: sf_blog_items


//.........这里部分代码省略.........
                                     $item_class = "col-sm-6";
                                 } else {
                                     if ($columns == "1") {
                                         $item_class = "col-sm-12";
                                     }
                                 }
                             }
                         }
                     }
                 } else {
                     $item_class = "col-sm-12";
                 }
             }
         }
         $taxonomy_name = 'category';
         if ($post_type != "post") {
             $taxonomy_name = $post_type . '-category';
         }
         $post_terms = get_the_terms($post->ID, $taxonomy_name);
         $term_slug = " ";
         if (!empty($post_terms)) {
             foreach ($post_terms as $post_term) {
                 $term_slug = $term_slug . $post_term->slug . ' ';
             }
         }
         /* BLOG ITEM OUTPUT
            ================================================== */
         $blog_items_output .= '<li itemscope itemtype="http://schema.org/BlogPosting" class="blog-item ' . $item_class . ' ' . $term_slug . ' ' . implode(' ', get_post_class()) . '" id="' . get_the_ID() . '" data-date="' . get_the_time('U') . '">';
         $blog_items_output .= sf_get_post_item($post->ID, $blog_type, $show_title, $show_excerpt, $show_details, $excerpt_length, $content_output, $show_read_more, $fullwidth);
         $blog_items_output .= '</li>';
     }
     wp_reset_query();
     wp_reset_postdata();
     $blog_items_output .= '</ul>';
     /* SOCIAL INTEGRATION
        ================================================== */
     if ($social_integration == "yes" && $pagination == "none") {
         $tweet_count = $instagram_count = floor($item_count / 4);
         $item_count = $item_count - $tweet_count - $instagram_count;
         if ($instagram_id == "") {
             $tweet_count = $tweet_count * 2;
         } else {
             if ($twitter_username == "") {
                 $instagram_count = $instagram_count * 2;
             }
         }
         if ($insta_item_count != "") {
             $instagram_count = $insta_item_count;
         }
         if ($tweet_item_count != "") {
             $tweet_count = $tweet_item_count;
         }
         /* TWEETS
            ================================================== */
         if ($twitter_username != "") {
             if ($fullwidth == "yes") {
                 $blog_items_output .= '<ul class="blog-tweets">' . sf_get_tweets($twitter_username, $tweet_count, 'blog-fw', $item_class) . '</ul>';
             } else {
                 $blog_items_output .= '<ul class="blog-tweets">' . sf_get_tweets($twitter_username, $tweet_count, 'blog', $item_class) . '</ul>';
             }
         }
         /* INSTAGRAMS
            ================================================== */
         if ($instagram_id != "" && $instagram_token != "") {
             $blog_items_output .= '<ul class="blog-instagrams" data-title="' . __("Instagram", "swiftframework") . '" data-count="' . $instagram_count . '" data-userid="' . $instagram_id . '" data-token="' . $instagram_token . '" data-itemclass="' . $item_class . '"></ul>';
         }
     }
     /* PAGINATION OUTPUT
        ================================================== */
     if ($pagination == "infinite-scroll") {
         global $sf_include_infscroll;
         $sf_include_infscroll = true;
         $blog_items_output .= '<div class="pagination-wrap hidden">';
         $blog_items_output .= pagenavi($blog_items);
         $blog_items_output .= '</div>';
     } else {
         if ($pagination == "load-more") {
             global $sf_include_infscroll;
             $sf_include_infscroll = true;
             $blog_items_output .= '<a href="#" class="load-more-btn">' . __('Load More', 'swiftframework') . '</a>';
             $blog_items_output .= '<div class="pagination-wrap load-more hidden">';
             $blog_items_output .= pagenavi($blog_items);
             $blog_items_output .= '</div>';
         } else {
             if ($pagination == "standard") {
                 if ($blog_type == "masonry") {
                     $blog_items_output .= '<div class="pagination-wrap masonry-pagination">';
                 } else {
                     $blog_items_output .= '<div class="pagination-wrap">';
                 }
                 $blog_items_output .= pagenavi($blog_items);
                 $blog_items_output .= '</div>';
             }
         }
     }
     $blog_items_output .= '</div>';
     /* FUNCTION OUTPUT
        ================================================== */
     return $blog_items_output;
 }
开发者ID:arobbins,项目名称:spellestate,代码行数:101,代码来源:sf-blog.php


示例8: content


//.........这里部分代码省略.........
                 } else {
                     if ($thumb_link_type == "lightbox_image") {
                         $lightbox_image_url = '';
                         foreach ($thumb_lightbox_image as $image) {
                             $lightbox_image_url = $image['full_url'];
                         }
                         $link_config = 'href="' . $lightbox_image_url . '" class="view"';
                         $item_icon = "search";
                     } else {
                         if ($thumb_link_type == "lightbox_video") {
                             $link_config = 'href="' . $thumb_lightbox_video_url . '" class="fancybox-media"';
                             $item_icon = "facetime-video";
                         } else {
                             $link_config = 'href="' . $permalink . '" class="link-to-post"';
                             $item_icon = "file";
                         }
                     }
                 }
             }
         }
         $items .= '<li data-id="id-' . $count . '" class="clearfix portfolio-item ' . $item_class . ' columns' . $term_slug . '">';
         $items .= '<figure>';
         // THUMBNAIL MEDIA TYPE SETUP
         if ($thumb_type == "video") {
             if ($display_type == "bordered" || $display_type == "bordered_gallery") {
                 $video = video_embed($thumb_video, $bordered_thumb_width, $bordered_video_height);
             } else {
                 $video = video_embed($thumb_video, $thumb_width, $video_height);
             }
             $items .= $video;
         } else {
             if ($thumb_type == "slider") {
                 $items .= '<div class="flexslider thumb-slider"><ul class="slides">';
                 foreach ($thumb_gallery as $image) {
                     $items .= "<li><img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$image['alt']}' /></li>";
                 }
                 $items .= '</ul><div class="open-item"><a ' . $link_config . '><i class="icon-plus"></i></a></div></div>';
             } else {
                 if ($display_type == "bordered" || $display_type == "bordered_gallery") {
                     $image = aq_resize($thumb_img_url, $bordered_thumb_width, $bordered_thumb_height, true, false);
                 } else {
                     $image = aq_resize($thumb_img_url, $thumb_width, $thumb_height, true, false);
                 }
                 if ($image) {
                     $items .= '<a ' . $link_config . '>';
                     $items .= '<div class="overlay"><div class="thumb-info">';
                     if ($display_type == "gallery" || $display_type == "bordered_gallery") {
                         $items .= '<h4>' . $item_title . '</h4>';
                         $items .= '<i class="icon-' . $item_icon . ' small-icon"></i>';
                     } else {
                         $items .= '<i class="icon-' . $item_icon . '"></i>';
                     }
                     $items .= '</div></div>';
                     $items .= '<img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $item_title . '" />';
                     $items .= '</a>';
                 }
             }
         }
         $items .= '</figure>';
         // ITEM INFO SETUP
         if ($display_type != "gallery" && $display_type != "bordered_gallery") {
             $items .= '<div class="portfolio-item-details">';
             if ($show_title == "yes") {
                 $items .= '<h4 class="portfolio-item-title"><a ' . $link_config . '>' . $item_title . '</a></h4>';
             }
             if ($show_client == "yes" && $item_client) {
                 $items .= '<span class="portfolio-client-title">' . $item_client . '</span>';
             }
             if ($show_excerpt == "yes") {
                 $items .= '<div class="portfolio-item-excerpt">' . $post_excerpt . '</div>';
             }
             $items .= '</div>';
         }
         $items .= '</li>';
         $count++;
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap full-width">';
         $items .= pagenavi($portfolio_items);
         $items .= '</div>';
     }
     // PAGE BUILDER OUPUT
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_portfolio_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper portfolio-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h2 class="wpb_heading">' . $title . '</h2></div>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     global $include_isotope;
     global $has_portfolio;
     $include_isotope = true;
     $has_portfolio = true;
     return $output;
 }
开发者ID:adams0917,项目名称:woocommerce_eht,代码行数:101,代码来源:portfolio+(Kristian+Klamar's+conflicted+copy+2013-03-25).php


示例9: sf_portfolio_items


//.........这里部分代码省略.........
         /* ITEM OUTPUT
         			================================================== */
         $portfolio_items_output .= '<li itemscope itemtype="http://schema.org/CreativeWork" data-id="id-' . $count . '" class="clearfix portfolio-item ' . $item_class . ' ' . $term_slug . '">' . "\n";
         /* THUMBNAIL CONFIG
         			================================================== */
         if ($thumb_type != "none") {
             if ($display_type == "gallery" || $display_type == "masonry-gallery" || $display_type == "masonry-fw" || $display_type == "masonry-gallery-fw") {
                 $portfolio_items_output .= '<figure class="animated-overlay">' . "\n";
             } else {
                 $portfolio_items_output .= '<figure class="animated-overlay overlay-alt">' . "\n";
             }
             if ($thumb_type == "video") {
                 $video = sf_video_embed($thumb_video, $thumb_width, $video_height);
                 $portfolio_items_output .= $video;
             } else {
                 if ($thumb_type == "slider") {
                     $portfolio_items_output .= '<div class="flexslider thumb-slider"><ul class="slides">' . "\n";
                     foreach ($thumb_gallery as $image) {
                         $portfolio_items_output .= "<li><a " . $link_config . "><img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$image['alt']}' /></a></li>" . "\n";
                     }
                     $portfolio_items_output .= '</ul></div>' . "\n";
                 } else {
                     if ($thumb_type == "image" && $thumb_img_url == "") {
                         $thumb_img_url = "default";
                     }
                     $image = sf_aq_resize($thumb_img_url, $thumb_width, $thumb_height, true, false);
                     if ($image) {
                         $portfolio_items_output .= '<img itemprop="image" src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $item_title . '" />' . "\n";
                         $portfolio_items_output .= '<a ' . $link_config . '></a>';
                         if ($item_subtitle != "" && $hover_show_excerpt == "no" && ($display_type == "gallery" || $display_type == "masonry-gallery" || $display_type == "masonry-gallery-fw")) {
                             $portfolio_items_output .= '<figcaption><div class="thumb-info thumb-info-extended">';
                         } else {
                             if ($display_type == "standard" || $display_type == "masonry" || $display_type == "masonry-fw") {
                                 $portfolio_items_output .= '<figcaption><div class="thumb-info thumb-info-alt">';
                             } else {
                                 if ($hover_show_excerpt == "yes" && ($display_type == "gallery" || $display_type == "masonry-gallery" || $display_type == "masonry-gallery-fw")) {
                                     $portfolio_items_output .= '<figcaption><div class="thumb-info thumb-info-excerpt">';
                                 } else {
                                     $portfolio_items_output .= '<figcaption><div class="thumb-info">';
                                 }
                             }
                         }
                         if ($display_type == "gallery" || $display_type == "masonry-gallery" || $display_type == "masonry-gallery-fw") {
                             if ($hover_show_excerpt == "yes") {
                                 $portfolio_items_output .= '<h4 itemprop="name headline">' . $item_title . '</h4>';
                                 $portfolio_items_output .= '<div itemprop="description">' . $post_excerpt . '</div>';
                             } else {
                                 $portfolio_items_output .= '<h4 itemprop="name headline">' . $item_title . '</h4>';
                                 $portfolio_items_output .= '<h5 itemprop="name alternative">' . $item_subtitle . '</h5>';
                             }
                         }
                         $portfolio_items_output .= '<i class="' . $item_icon . '"></i>';
                         $portfolio_items_output .= '</div></figcaption>';
                     }
                 }
             }
             $portfolio_items_output .= '</figure>' . "\n";
         }
         if ($display_type != "gallery" && $display_type != "masonry-gallery" && $display_type != "masonry-gallery-fw") {
             $portfolio_items_output .= '<div class="portfolio-item-details">' . "\n";
             $portfolio_items_output .= '<div class="comments-likes">';
             if (function_exists('lip_love_it_link')) {
                 $portfolio_items_output .= lip_love_it_link(get_the_ID(), '<i class="ss-heart"></i>', '<i class="ss-heart"></i>', false);
             }
             $portfolio_items_output .= '</div>';
             if ($show_title == "yes") {
                 if ($enable_portfolio_gallery) {
                     $portfolio_items_output .= '<h3 class="portfolio-item-title" itemprop="name headline"><a href="' . $permalink . '" class="link-to-post">' . $item_title . '</a></h3>' . "\n";
                 } else {
                     $portfolio_items_output .= '<h3 class="portfolio-item-title" itemprop="name headline"><a ' . $link_config . '>' . $item_title . '</a></h3>' . "\n";
                 }
             }
             if ($show_subtitle == "yes" && $item_subtitle) {
                 $portfolio_items_output .= '<h5 class="portfolio-subtitle" itemprop="alternativeHeadline">' . $item_subtitle . '</h5>' . "\n";
             }
             if ($show_excerpt == "yes") {
                 $portfolio_items_output .= '<div class="portfolio-item-excerpt" itemprop="description">' . $post_excerpt . '</div>' . "\n";
             }
             $portfolio_items_output .= '</div>' . "\n";
         }
         $portfolio_items_output .= '</li>' . "\n";
         $count++;
     }
     wp_reset_postdata();
     $portfolio_items_output .= '</ul>' . "\n";
     /* PAGINATION OUTPUT
     			================================================== */
     if ($pagination == "yes") {
         if ($display_type == "masonry" || $display_type == "masonry-gallery" || $display_type == "masonry-fw" || $display_type == "masonry-gallery-fw") {
             $portfolio_items_output .= '<div class="pagination-wrap masonry-pagination">';
         } else {
             $portfolio_items_output .= '<div class="pagination-wrap">';
         }
         $portfolio_items_output .= pagenavi($portfolio_items);
         $portfolio_items_output .= '</div>';
     }
     /* FUNCTION OUTPUT
     			================================================== */
     return $portfolio_items_output;
 }
开发者ID:roycocup,项目名称:enclothed,代码行数:101,代码来源:sf-portfolio.php


示例10: sf_blog_items

 function sf_blog_items($blog_type, $masonry_effect_type, $show_title, $show_excerpt, $show_details, $excerpt_length, $content_output, $show_read_more, $item_count, $category, $exclude_categories, $pagination, $sidebar_config, $width, $offset, $posts_order)
 {
     $blog_items_output = "";
     $options = get_option('sf_dante_options');
     $filter_wrap_bg = $options['filter_wrap_bg'];
     global $sf_sidebar_config;
     $sf_sidebar_config = $sidebar_config;
     /* CATEGORY SLUG MODIFICATION
     			================================================== */
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     /* BLOG QUERY SETUP
     			================================================== */
     global $post, $wp_query;
     if (get_query_var('paged')) {
         $paged = get_query_var('paged');
         $offset = $offset + $item_count * ($paged - 1);
     } elseif (get_query_var('page')) {
         $paged = get_query_var('page');
         $offset = $offset + $item_count * ($paged - 1);
     } else {
         $paged = 1;
     }
     $blog_args = array();
     $category_array = explode(",", $category_slug);
     if (isset($category_array) && $category_array[0] != "") {
         $blog_args = array('post_type' => 'post', 'post_status' => 'publish', 'paged' => $paged, 'posts_per_page' => $item_count, 'offset' => $offset, 'order' => $posts_order, 'tax_query' => array(array('taxonomy' => 'category', 'field' => 'slug', 'terms' => $category_array)));
     } else {
         $blog_args = array('post_type' => 'post', 'post_status' => 'publish', 'paged' => $paged, 'posts_per_page' => $item_count, 'offset' => $offset, 'order' => $posts_order);
     }
     $blog_items = new WP_Query($blog_args);
     /* LIST CLASS CONFIG
     			================================================== */
     $list_class = $wrap_class = '';
     if ($blog_type == "masonry" || $blog_type == "masonry-fw") {
         $list_class .= 'masonry-items first-load grid ' . $masonry_effect_type;
     } else {
         if ($blog_type == "mini") {
             $list_class .= 'mini-items';
         } else {
             $list_class .= 'standard-items';
             if ($sidebar_config == "no-sidebars") {
                 $wrap_class .= 'col-sm-8 col-sm-offset-2';
             }
         }
     }
     /* BLOG ITEMS OUTPUT
     			================================================== */
     $blog_items_output .= '<div class="blog-items-wrap blog-' . $blog_type . ' ' . $wrap_class . '">';
     if ($blog_type == "standard") {
         $blog_items_output .= '<div class="timeline"></div>';
     }
     if ($blog_type == "masonry" || $blog_type == "masonry-fw") {
         $blog_items_output .= '<ul class="blog-items row ' . $list_class . ' clearfix" id="blogGrid">';
     } else {
         $blog_items_output .= '<ul class="blog-items row ' . $list_class . ' clearfix">';
     }
     while ($blog_items->have_posts()) {
         $blog_items->the_post();
         $post_format = get_post_format($post->ID);
         if ($post_format == "") {
             $post_format = 'standard';
         }
         if ($blog_type == "mini") {
             $item_class = "col-sm-12";
         } else {
             if ($blog_type == "masonry") {
                 if ($sidebar_config == "both-sidebars") {
                     $item_class = "col-sm-3";
                 } else {
                     $item_class = "col-sm-4";
                 }
             } else {
                 if ($blog_type == "masonry-fw") {
                     $item_class = "col-sm-3";
                 } else {
                     $item_class = $width;
                 }
             }
         }
         /* BLOG ITEM OUTPUT
         			================================================== */
         $blog_items_output .= '<li itemscope itemtype="http://schema.org/BlogPosting" class="blog-item ' . $item_class . ' ' . implode(' ', get_post_class()) . '" id="' . get_the_ID() . '">';
         $blog_items_output .= sf_get_post_item($post->ID, $blog_type, $show_title, $show_excerpt, $show_details, $excerpt_length, $content_output, $show_read_more);
         $blog_items_output .= '</li>';
     }
     wp_reset_postdata();
     $blog_items_output .= '</ul>';
     /* PAGINATION OUTPUT
     			================================================== */
     if ($pagination == "infinite-scroll") {
         global $sf_include_infscroll;
         $sf_include_infscroll = true;
         $blog_items_output .= '<div class="pagination-wrap inf-scroll-pagination hidden">';
         $blog_items_output .= pagenavi($blog_items);
//.........这里部分代码省略.........
开发者ID:VeritasStrategies,项目名称:Poplin,代码行数:101,代码来源:sf-blog.php


示例11: content

 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $carousel = $item_class = $output = $tax_terms = $filter = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'item_count' => '-1', 'item_columns' => '4', 'category' => '', 'carousel' => 'no', 'carousel_columns' => '', 'pagination' => 'no', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // CLIENTS QUERY SETUP
     global  

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP pager函数代码示例发布时间:2022-05-15
下一篇:
PHP pagelinkurl函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap