Ready to get started?Download WordPress


Post on a page (7 posts)

  1. praveen68
    Posted 1 year ago #

    I am designing a site where there are 9 post on a page. Each post is contained in a div with a big button with hover. Below that is the heading followed by post snippet. The post don't have read more link. The button must be linking to full post. Can you suggest me how to go about it. Is there a plugin or widget to suit this.

  2. You can use excerpt_more filter to display read more link.

  3. jasonpaulweber
    Posted 1 year ago #

    Go to wp-content / themes / yourtheme / page.php

    Find the_post or it may say the_content -- it may look something like this:

    <div id="primary" class="site-content">
    	<div id="content" role="main">
    		<?php while ( have_posts() ) : the_post(); ?>

    Change the_post to the_excerpt


    Do the same for category.php and archives.php if you'd like.

  4. praveen68
    Posted 1 year ago #

    Thanks Jason. I am converting the html to wordpress. CAn the button have a hover from post image insert.

  5. We should not Change the_post to the_excerpt. the_post is required to iterate in post loop. instead you should use the_content or the_expert function in loop along with the_post to display multiple posts.

  6. jasonpaulweber
    Posted 1 year ago #

    Yes, on page.php change the_content to the_excerpt ....

    And yes, you can use various hover effects on your page.php ...

  7. praveen68
    Posted 1 year ago #

    Thank you Jason and Vinod. I used sidebar widgets to display the posts on page and linked it to the post id. I am able to customize text displayed on each post on the page.

Topic Closed

This topic has been closed to new replies.

About this Topic