Yeah this but display the post body for one post
You will get more content from database, than you need, but if it is just a 5-10 posts, there is completely no problem at all. And to show only one post content you have to make a simple condition like:
for( $x = 0; $x <= 10; $x++ ) { if( $x == 0 ) { echo $result[$i]->title; echo $result[$i]->content; } else { echo '<a href="'. $result[$i]->link .'">'. $result[$i]->title .'</a>'; } }
where $result is data from your database
Ok let me work on this,thanks alot
Good luck and if you will have any problems, paste here (or codepen) some part of code you have. It will be easier to help
My pleasure
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yeah this but display the post body for one post
You will get more content from database, than you need, but if it is just a 5-10 posts, there is completely no problem at all. And to show only one post content you have to make a simple condition like:
for( $x = 0; $x <= 10; $x++ ) {
if( $x == 0 ) {
echo $result[$i]->title;
echo $result[$i]->content;
} else {
echo '<a href="'. $result[$i]->link .'">'. $result[$i]->title .'</a>';
}
}
where $result is data from your database
Ok let me work on this,thanks alot
Good luck and if you will have any problems, paste here (or codepen) some part of code you have. It will be easier to help
My pleasure