本文整理汇总了PHP中dslc_post_pagination函数的典型用法代码示例。如果您正苦于以下问题:PHP dslc_post_pagination函数的具体用法?PHP dslc_post_pagination怎么用?PHP dslc_post_pagination使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dslc_post_pagination函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: output
//.........这里部分代码省略.........
<?php
the_content();
?>
<?php
} else {
?>
<?php
if (has_excerpt()) {
echo do_shortcode(wp_trim_words(get_the_excerpt(), $options['excerpt_length']));
} else {
echo do_shortcode(wp_trim_words(get_the_content(), $options['excerpt_length']));
}
?>
<?php
}
?>
</div><!-- .dslc-project-excerpt -->
<?php
}
?>
<?php
if ($post_elements == 'all' || in_array('button', $post_elements)) {
?>
<div class="dslc-project-read-more">
<a href="<?php
echo $the_project_url;
?>
" target="<?php
echo $the_project_url_target;
?>
">
<?php
if (isset($options['button_icon_id']) && $options['button_icon_id'] != '') {
?>
<span class="dslc-icon dslc-icon-<?php
echo $options['button_icon_id'];
?>
"></span>
<?php
}
?>
<?php
echo $options['button_text'];
?>
</a>
</div><!-- .dslc-project-read-more -->
<?php
}
?>
</div><!-- .dslc-project-main -->
<?php
}
?>
</div><!-- .dslc-project -->
<?php
// Row Separator
if ($options['type'] == 'grid' && $count == 0 && $real_count != $dslc_query->found_posts && $real_count != $options['amount'] && $options['separator_enabled'] == 'enabled') {
echo '<div class="dslc-post-separator"></div>';
}
}
if ($options['type'] == 'carousel') {
?>
</div><?php
}
?>
</div><!-- .dslc-projects -->
<?php
} else {
if ($dslc_is_admin) {
?>
<div class="dslc-notification dslc-red"><?php
_e('You do not have any projects at the moment. Go to <strong>WP Admin → Projects</strong> to add some.', 'dslc_string');
?>
<span class="dslca-refresh-module-hook dslc-icon dslc-icon-refresh"></span></span></div><?php
}
}
/**
* Pagination
*/
if (isset($options['pagination_type']) && $options['pagination_type'] != 'disabled') {
$num_pages = $dslc_query->max_num_pages;
if ($options['offset'] > 0) {
$num_pages = ceil(($dslc_query->found_posts - $options['offset']) / $options['amount']);
}
dslc_post_pagination(array('pages' => $num_pages, 'type' => $options['pagination_type']));
}
wp_reset_postdata();
/* Module output ends here */
$this->module_end($options);
}
示例2: output
//.........这里部分代码省略.........
echo isset($options['as_ajax_projects']) && $options['as_ajax_projects'] ? '1' : '0';
?>
" data-id="<?php
echo get_the_ID();
?>
" href="<?php
echo $the_project_url;
?>
" target="<?php
echo $the_project_url_target;
?>
"><span class="dslc-icon dslc-icon-link"></span></a>
</div>
<?php
}
?>
</div><!-- .dslc-init-center -->
</div><!-- .dslc-project-main -->
<?php
}
?>
</div><!-- .dslc-project-thumb -->
<?php
}
?>
</div><!-- .dslc-project -->
<?php
// Row Separator
if ($options['type'] == 'grid' && $count == 0 && $real_count != $dslc_query->found_posts && $real_count != $options['amount'] && $options['separator_enabled'] == 'enabled') {
echo '<div class="dslc-post-separator"></div>';
}
}
if ($options['type'] == 'carousel') {
?>
</div><?php
}
?>
</div><!-- .dslc-projects -->
<?php
} else {
if ($dslc_is_admin) {
?>
<div class="dslc-notification dslc-red"><?php
_e('You do not have any projects at the moment. Go to <strong>WP Admin → Projects</strong> to add some.', 'dslc_string');
?>
<span class="dslca-refresh-module-hook dslc-icon dslc-icon-refresh"></span></span></div><?php
}
}
/**
* Pagination
*/
if (isset($options['pagination_type']) && $options['pagination_type'] != 'disabled') {
$num_pages = $dslc_query->max_num_pages;
dslc_post_pagination(array('pages' => $num_pages, 'type' => $options['pagination_type']));
}
wp_reset_query();
?>
<?php
if ($options['as_ajax_projects'] == 1 && $options['as_ajax_projects_position'] == 'bottom') {
?>
<!-- PRINT PROJECTS DATA -->
<div id="as_portfolio_content" style="display:none;">
<div class="as-wrapper clearfix">
<div class="as-portfolio-ajax-wrapper">
<div class="as-port-control dslc-col dslc-12-col dslc-last-col">
<a href="javascript:void(0);" class="prev" data-ajax="1" data-id="59">
<span class="dslc-icon dslc-icon-angle-left"></span><span class="as-btn-text-ajax-prj"><?php
_e('Prev', 'as');
?>
</span>
</a>
<a href="javascript:void(0);" class="close-port">
<span class="dslc-icon dslc-icon-remove"></span>
</a>
<a href="javascript:void(0);" class="next" data-ajax="1" data-id="57">
<span class="as-btn-text-ajax-prj"><?php
_e('Next', 'as');
?>
</span><span class="dslc-icon dslc-icon-angle-right"></span>
</a>
</div>
</div>
<div class="as-port-content">
</div>
</div>
</div>
<div class="clearfix"></div>
<!-- PRINT PROJECTS DATA / END -->
<?php
}
?>
<?php
/* Module output ends here */
$this->module_end($options);
}
示例3: output
//.........这里部分代码省略.........
$author_output = ob_get_contents();
ob_end_clean();
?>
<div class="<?php
echo $element_class . $columns_class . $extra_class;
?>
" data-cats="<?php
echo $post_cats_data;
?>
">
<div class="dslc-testimonial-inner">
<?php
if ($options['author_pos'] == 'outside top' || $options['author_pos'] == 'outside left' || $options['author_pos'] == 'outside right') {
echo $author_output;
}
?>
<div class="dslc-testimonial-main">
<?php
if ($options['author_pos'] == 'inside top') {
echo $author_output;
}
?>
<?php
if ($post_elements == 'all' || in_array('quote', $post_elements)) {
?>
<div class="dslc-testimonial-quote">
<?php
echo do_shortcode(get_the_content());
?>
</div><!-- .dslc-testimonial-quote -->
<?php
}
?>
<?php
if ($options['author_pos'] == 'inside bottom') {
echo $author_output;
}
?>
</div><!-- .dslc-testimonial-main -->
<?php
if ($options['author_pos'] == 'outside bottom') {
echo $author_output;
}
?>
</div><!-- .dslc-testimonial-inner -->
</div><!-- .dslc-testimonial -->
<?php
// Row Separator
if ($options['type'] == 'grid' && $count == 0 && $real_count != $dslc_query->found_posts && $real_count != $options['amount']) {
echo '<div class="dslc-post-separator"></div>';
}
}
if ($options['type'] == 'carousel') {
?>
</div><?php
}
?>
</div><!-- .dslc-posts-inner -->
</div><!-- .dslc-testimonials -->
<?php
} else {
if ($dslc_is_admin) {
?>
<div class="dslc-notification dslc-red"><?php
_e('You do not have any testimonials at the moment. Go to <strong>WP Admin → Testimonials</strong> to add some.', 'live-composer-page-builder');
?>
<span class="dslca-refresh-module-hook dslc-icon dslc-icon-refresh"></span></span></div><?php
}
}
/**
* Pagination
*/
if (isset($options['pagination_type']) && $options['pagination_type'] != 'disabled') {
$num_pages = $dslc_query->max_num_pages;
if ($options['offset'] > 0) {
$num_pages = ceil(($dslc_query->found_posts - $options['offset']) / $options['amount']);
}
dslc_post_pagination(array('pages' => $num_pages, 'type' => $options['pagination_type']));
}
wp_reset_postdata();
/* Module output ends here */
$this->module_end($options);
}
示例4: output
//.........这里部分代码省略.........
?>
<?php
$share_info = dslc_get_social_count();
?>
<div class="dslc-posts-social-share">
<?php
$post_img = wp_get_attachment_url(get_post_thumbnail_id(get_the_ID()));
?>
<?php
$share_status = esc_attr(get_the_title(get_the_ID()) . ' ' . get_permalink(get_the_ID()));
?>
<a href="#" target="_blank" onClick="return dslc_social_share(400, 300, 'http://www.facebook.com/share.php?u=<?php
echo get_permalink(get_the_ID());
?>
')"><span class="dslc-icon dslc-icon-facebook"></span><span class="dslc-posts-social-share-count"><?php
if ($share_info) {
echo esc_html($share_info['fb']);
}
?>
</span></a>
<a href="#" onClick="return dslc_social_share(400, 300, 'https://twitter.com/home?status=<?php
echo $share_status;
?>
')" ><span class="dslc-icon dslc-icon-twitter"></span><span class="dslc-posts-social-share-count"><?php
if ($share_info) {
echo esc_html($share_info['twitter']);
}
?>
</span></a>
<a href="#" onClick="return dslc_social_share(400, 300, 'https://pinterest.com/pin/create/button/?url=<?php
the_permalink();
?>
&media=<?php
echo esc_html($post_img);
?>
&description=<?php
echo esc_attr(get_the_excerpt());
?>
')"><span class="dslc-icon dslc-icon-pinterest"></span><span class="dslc-posts-social-share-count"><?php
if ($share_info) {
echo esc_html($share_info['pinterest']);
}
?>
</span></a>
</div><!-- .dslc-posts-social-share -->
<?php
}
?>
<?php
}
?>
</div><!-- .dslc-blog-post -->
<?php
do_action('dslc_blog_module_after_post', $real_count);
?>
<?php
// Row Separator
if ($options['type'] == 'grid' && $count == 0 && $real_count != $dslc_query->found_posts && $real_count != $options['amount'] && $options['separator_enabled'] == 'enabled') {
echo '<div class="dslc-post-separator"></div>';
}
}
if ($options['type'] == 'carousel') {
?>
</div><?php
}
?>
</div><!-- .dslc-posts-inner --><?php
?>
</div><!-- .dslc-blog-posts --><?php
} else {
if ($dslc_is_admin) {
?>
<div class="dslc-notification dslc-red"><?php
_e('You do not have any blog posts at the moment. Go to <strong>WP Admin → Posts</strong> to add some.', 'live-composer-page-builder');
?>
<span class="dslca-refresh-module-hook dslc-icon dslc-icon-refresh"></span></span></div><?php
}
}
/**
* Pagination
*/
if (isset($options['pagination_type']) && $options['pagination_type'] != 'disabled') {
$num_pages = $dslc_query->max_num_pages;
if ($options['offset'] > 0) {
$num_pages = ceil(($dslc_query->found_posts - $options['offset']) / $options['amount']);
}
dslc_post_pagination(array('pages' => $num_pages, 'type' => $options['pagination_type']));
}
wp_reset_postdata();
$this->module_end($options);
}
示例5: output
//.........这里部分代码省略.........
?>
<div class="dslc-cpt-post-excerpt">
<?php
if ($options['excerpt_or_content'] == 'content') {
?>
<?php
the_content();
?>
<?php
} else {
?>
<?php
// Lumberman edit start
if (post_type_supports(get_post_type(), 'excerpt')) {
echo do_shortcode(wp_trim_words(get_the_excerpt(), $options['excerpt_length']));
} else {
// show 'dslc_search_content' metabox as excerpt for the content types
// that have no 'excerpt' feature enabled
echo do_shortcode(wp_trim_words(get_post_meta(get_the_ID(), 'dslc_search_content', true), $options['excerpt_length']));
}
// Lumberman edit end
?>
<?php
}
?>
</div><!-- .dslc-cpt-post-excerpt -->
<?php
}
?>
<?php
if ($post_elements == 'all' || in_array('button', $post_elements)) {
?>
<div class="dslc-cpt-post-read-more">
<a href="<?php
the_permalink();
?>
">
<?php
if (isset($options['button_icon_id']) && $options['button_icon_id'] != '') {
?>
<span class="dslc-icon dslc-icon-<?php
echo $options['button_icon_id'];
?>
"></span>
<?php
}
?>
<?php
echo $options['button_text'];
?>
</a>
</div><!-- .dslc-cpt-post-read-more -->
<?php
}
?>
</div><!-- .dslc-cpt-post-main -->
<?php
}
?>
</div><!-- .dslc-cpt-post -->
<?php
// Row Separator
if ($options['type'] == 'grid' && $count == 0 && $real_count != $dslc_query->found_posts && $options['separator_enabled'] == 'enabled') {
echo '<div class="dslc-post-separator"></div>';
}
}
if ($options['type'] == 'carousel') {
?>
</div><?php
}
?>
</div><!--.dslc-posts-inner --><?php
?>
</div><!-- .dslc-cpt-posts --><?php
} else {
if ($dslc_is_admin) {
?>
<div class="dslc-notification dslc-red">You do not have any posts of that post type at the moment. <span class="dslca-refresh-module-hook dslc-icon dslc-icon-refresh"></span></span></div><?php
}
}
/**
* Pagination
*/
// if ( isset( $options['pagination_type'] ) && $options['pagination_type'] == 'numbered' ) {
// Always show pagination for archive listings
$num_pages = $dslc_query->max_num_pages;
dslc_post_pagination(array('pages' => $num_pages));
// }
wp_reset_query();
$this->module_end($options);
}
示例6: output
//.........这里部分代码省略.........
?>
<?php
the_content();
?>
<?php
} else {
?>
<?php
if (has_excerpt()) {
echo do_shortcode(wp_trim_words(get_the_excerpt(), $options['excerpt_length']));
} else {
echo do_shortcode(wp_trim_words(get_the_content(), $options['excerpt_length']));
}
?>
<?php
}
?>
</div><!-- .dslc-staff-member-excerpt -->
<?php
}
?>
<?php
if ($post_elements == 'all' || in_array('social', $post_elements)) {
?>
<div class="as-staff-social-wrapper">
<div class="as-staff-list-social">
<?php
foreach ($socials as $k => $v) {
if (!empty($v)) {
?>
<a href="<?php
echo $v;
?>
" target="<?php
echo $options['social_link_target'];
?>
"><span class="dslc-icon dslc-icon-<?php
echo $k;
?>
"></span></a>
<?php
}
}
?>
</div>
</div>
<?php
}
?>
<!-- .dslc-staff-social -->
</div><!-- .dslc-staff-member-main -->
<?php
}
?>
</div><!-- .dslc-staff-member -->
<?php
// Row Separator
if ($options['type'] == 'grid' && $count == 0 && $real_count != $dslc_query->found_posts && $real_count != $options['amount'] && $options['separator_enabled'] == 'enabled') {
echo '<div class="dslc-post-separator"></div>';
}
}
if ($options['type'] == 'carousel') {
?>
</div><?php
}
?>
</div><?php
} else {
if ($dslc_is_admin) {
?>
<div class="dslc-notification dslc-red"><?php
_e('You do not have staff at the moment. Go to <strong>WP Admin → Staff</strong> to add some.', 'dslc_string');
?>
<span class="dslca-refresh-module-hook dslc-icon dslc-icon-refresh"></span></span></div><?php
}
}
/**
* Pagination
*/
if (isset($options['pagination_type']) && $options['pagination_type'] != 'disabled') {
$num_pages = $dslc_query->max_num_pages;
if ($options['offset'] > 0) {
$num_pages = ceil(($dslc_query->found_posts - $options['offset']) / $options['amount']);
}
dslc_post_pagination(array('pages' => $num_pages, 'type' => $options['pagination_type']));
}
wp_reset_postdata();
/* Module output ends here */
$this->module_end($options);
}