0
這是我的代碼,所以我嘗試使用jQuery的HTML負載,但沒有任何反應需要幫助大師,所以從你guyz的任何幫助將不勝感激,所以這將是容易的,如果你guyz會幫助我在我的引導程序導航中有ajax分頁。ajax分頁問題在WordPress的引導標籤
<?php
/*
* Template Name: Gallery
*/
get_header(); ?>
<script type="text/javascript" charset="utf-8">
</script>
<div class="about-content">
<div class="container">
<div class="border-bottom">
<!--images-->
<div class="services images">
<div class="container">
<div class="content">
<div class="images-tab" role="tabpanel">
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#all" aria-controls="all" role="tab" data-toggle="tab">VIEW ALL</a></li>
<?php $args = array('hide_empty' => false);
$image_category = get_terms('image_category',$args);
foreach($image_category as $image_categories) :?>
<li role="presentation"><a href="#<?php echo $image_categories->slug ?>" aria-controls="<?php echo $image_categories->slug ?>" role="tab" data-toggle="tab"><?php echo $image_categories->name; ?></a></li>
<?php endforeach;wp_reset_query(); ?>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<?php
$args = array('hide_empty' => false);
$image_category = get_terms('image_category',$args);
foreach($image_category as $image_categories) :?>
<div role="tabpanel" class="tab-pane" id="<?php echo $image_categories->slug; ?>">
<div class="row" id="content">
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$arg = array(
'post_type' => 'gallery',
'posts_per_page' =>1,
'paged' => $paged,
'tax_query' => array(
array(
'taxonomy' => 'image_category',
'field' => 'name',
'terms' => $image_categories
)
)
);
$query = new WP_Query($arg);
while($query->have_posts()) : $query->the_post();
$args1 = array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'all');
$category_object = wp_get_object_terms($post->ID,'image_category',$args1); ?>
<div id="content" class="post col-md-4"><?php the_post_thumbnail(); ?></div>
<?php endwhile; wp_reset_postdata();?>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
</div>
<!--images-->
<div class="pagination-content">
<ul>
<li><i class="fa fa-play fa-rotate-180"></i></li>
<li> <?php
global $wp_query;
$big = 999999999; // need an unlikely integer
//$translated = __('Page', 'mytextdomain'); // Supply translatable string
echo paginate_links(array(
'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
'format' => '?paged=%#%',
'prev_next' => false,
'current' => max(1, get_query_var('paged')),
'total' => $query->max_num_pages,
//'before_page_number' => '<span class="screen-reader-text">'.$translated.' </span>'
));
?></li>
<li class="yellow"><a href="#"><i class="fa fa-play"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>