How to show custom posts with navigation wordpress

Topics focus on Web Developments, Programming, Database, Digital Marketing Tutorials, Code Snippets, SEO, Social Media Marketing and Inspirational articles.

How to show custom posts with navigation wordpress

How to show custom posts with navigation wordpress

How to show custom posts with navigation wordpress

Here I wrote the article about to show custom posts with navigation in wordpress.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php 
	global $paged;
	$temp = $wp_query; 
	$wp_query = null; 
	$wp_query = new WP_Query(); 
	$wp_query->query('showposts=10&post_type=cust_post'.'&paged='.$paged); 
 
	while ($wp_query->have_posts()) : $wp_query->the_post(); 
?>
	<div id="wrap2">
		<div id="inner2">
			<div class="proj">
				<div class="arc-desc">
					<h1><?php the_title(); ?></h1>
					<?php the_excerpt();?>
				</div>
				<br/><br/>
				<div class="navigation"><?php  ?></div>
				<div class="clear"><!-- --></div>
			</div>
		</div>
	</div>
	<?php endwhile; ?>
<nav>
    <?php wp_pagenavi( array( 'query' => $wp_query ) );?>
</nav>
 
<?php 
 /*$wp_query = null; 
   $wp_query = $temp;*/  // Reset
?>

Add comment


 

Pin It on Pinterest

Share This