I would like to make the post preview about 5 sentences and would also like to ad a picture.
I tried uploading a picture as the main image and although it showed in the actual post, it didn't appear in the post preview.
Thanks
I would like to make the post preview about 5 sentences and would also like to ad a picture.
I tried uploading a picture as the main image and although it showed in the actual post, it didn't appear in the post preview.
Thanks
Hi,
The excerpt (post preview) length is set up by wordpress but is possible to add filter and set the excerpt lenhgt.
Login to your WordPress Site and perform the following steps:
1. Navigate to Appearance section in the Sidebar and Click Editor
2. Click the Theme Functions or "functions.php" template file
3. Just above the closing <?php } ?> tag add the following code:
add_filter('excerpt_length', 'my_excerpt_length');
function my_excerpt_length($length) {
return 20; }
Change 20 to the length you would like the WordPress excerpt to be in words.
Update the file and and go view your site.
I tried uploading a picture as the main image and although it showed in the actual post, it didn't appear in the post preview.
If you would like to have a image in post preview then you need to add the html code of the image and the text you want to appear there in wordpress excerpt field. To activate the wordpress excerpt field go to the right top corner Screen Options menu when you edit or create a post.
Cheers,
Max.
Chances are your issue is already answered, but if it’s not, you can always create a new topic.
Add new topicSearching for something specific? Type something and press Enter to search.
Add Reply
You must log in to post.