WordPress #6: Display Posts on A Page with Content Views Plugin

On WordPress

Go to Plugins >> Add New >> Search for “Content Views” >> Install >> Activate

Now on the WordPress menu / navbar on the left, there should be Content Views menu,

Add New >> Add Title (any that represents the posts) >> Set Filter Settings / Category and Display Settings per required >> Save or Show Preview to see the outcome.

After saving, there should be a shortcode on top of the page.

Code

Copy the shortcode. Paste it to single.php to your directory, or to blog.php (if it’s a /blog page).

<?php get_header();?>

<head>
	<style>
            <!-- CSS here -->
	</style>
</head>
<body class="bg-light">
     <div class="col-lg-12">
	<div class="row">
		<div class="col-sm-6">
			<?php echo do_shortcode("[pt_view id=da840186gx]"); ?>
		</div>
	</div>
     </div>
</body>

<?php get_footer();?>

Outcome

To remove ‘Read More’ button,

<style>
   .pt-cv-readmore {
	visibility: hidden;
   }
</style>

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *