Tagged: posts
- This topic has 8 replies, 2 voices, and was last updated 6 years ago by
vfxphotog.
-
AuthorPosts
-
November 17, 2017 at 6:44 pm #126297
vfxphotog
ParticipantI have more than 4 posts but only one row (4 posts) is showing. Clicking “MORE” button doesn’t work. I couldn’t find the option to increase the number of rows. Does it exist?
November 18, 2017 at 4:30 am #126309Pratik
Keymaster@vfxphotog: Please post in your site url.
November 18, 2017 at 12:18 pm #126322vfxphotog
ParticipantHere is my site:
https://photoselfiea.com/November 19, 2017 at 11:14 pm #126390Pratik
KeymasterHi @vfxphotog,
It looks like you have specified Static Home Page but have not specified a posts page. Please add a page to display as blogs in Dashboard- Settings- Reading- Your homepage displays and select a posts page there.
Check http://nimb.ws/WKPqNp for more info.
Regards,
PratikNovember 20, 2017 at 12:49 am #126396vfxphotog
ParticipantThanks for your reply, Pratik.
I’ve followed your instruction. The “more post” button is working and by clicking, it changes to a new page showing all of my blog posts. But the front page still only displays one row of my posts.
Is there another option I need to change from the theme customizer?November 20, 2017 at 2:01 am #126401Pratik
KeymasterHi @vfxphotog,
That option is not available. If you want to change the number of posts there, then you need to do it via child theme. First, create a child theme. Details for it is here: https://catchthemes.com/blog/create-child-theme-wordpress/
Then, copy verity-pro/template-parts/recent-posts/front-recent-posts.php and paste it in child theme like verity-child/template-parts/recent-posts/front-recent-posts.php. Finally change line 74 in that file
'posts_per_page' => 4,
to any number you want.November 20, 2017 at 1:54 pm #126451vfxphotog
ParticipantI have copied verity-pro/template-parts/recent-posts/front-recent-posts.php and pasted at verity-pro-
child/template-parts/recent-posts/front-recent-posts.php and changed the ‘posts_per_page’ to 12 (like below) but nothing has changed after I’d uploaded & installed the verity-pro-child.zip which includes style.css for the child theme. Am I missing anything here?Below codes shows only part of the whole codes in the file.
<div id=”infinite-post-wrap” class=”archive-post-wrap”>
<?php/**
* Show eight latest posts excluding first one
*/
$recent_posts = new WP_Query( array(
‘posts_per_page’ => 12,
‘post__not_in’ => array( $first_post_id ),
‘ignore_sticky_posts’ => true,
‘paged’ => ”,
) );/* Start the Loop */
while ( $recent_posts->have_posts() ) :
$recent_posts->the_post();get_template_part( ‘template-parts/content/content’, ‘archive’ );
endwhile;
wp_reset_postdata();
?>
<div class=”posts-navigation”>
<div class=”nav-links”>
“>November 20, 2017 at 10:44 pm #126469Pratik
Keymaster@vfxphotog: Did you activate the child theme?
November 21, 2017 at 3:19 am #126493vfxphotog
ParticipantFinally, it’s working. There are so much to learn. Thank you so much for your support. Pratik.
-
AuthorPosts
- The topic ‘Only one row of my posts displaying in the front page’ is closed to new replies.