Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
Hi there,
is there a possibility to show an excerpt on the main page and on another page (where all posts are collected e.g. News) the hole posts without a link to one single post?
And is there a way to define how long the excerpt is?
Please help me i have no idea what else i should try..
Thanks!
Hi Nina
You can define the length of the excerpt by adding some code to you child theme functions file. If you are not already running a child theme here are the instructions.
https://codex.wordpress.org/Child_Themes
Here is a link to a bare child theme for Vantage for you to use.
https://siteorigin.com/wp-content/uploads/2015/01/vantage-child-vanilla-enqueue.zip
Please be aware that when you change to a child-theme you will lose some alterations you have already made.
You can edit the functions.php by going to Appearance->Editor once you have made the child-theme your active theme.
Add this to the functions directly below the enqueue statements
Change the return value to however many characters you want the excerpt to contain.
Hope this helps
Magus
Thanks a lot for your help! :)
This has solve my problem with the lenght of the excerpt.
– but there is still the problem, that now all posts are shown as an excerpt (also on the archive page)
-> here is hopefully a better explanation of what i want to do:
the post (excerpts) on the main page should be shown – and link to a page news where all posts are listet in full lenght without any link to single posts…
Can you please help me :) THANKS
and the style of the post has gone with the php function..
Hi Nina
You are correct the function overrides the default excerpt length, but this is all it does. Part of your questions was if there was a way to define how long an excerpt was, that is the only way.
If you want to show the original excerpts on the home page and the full post on the blogs page then you will need to either remove that function or change the length you have set to one which is more pleasing to the eye.
Then go to Appearance->Theme Settings->Blog and set the option Post Content to ‘Full Post’.
This should give you the appearance you require.
Let us know how you get on
Magus
Yea i do understand what the php function does and that also was what i wanted to do. So really thanks for that.
But i only see either the full posts on both pages or the expert on both pages. it isn’t working that there are two different styles for posts.
thanks for your help
and by the way.. with the style has gone, i mean that the header has no color ,.. or so any more
Hi Nina
I am seeing the correct styling and colour for your header as set in Appearance->Customize.
To get an excerpt on the home page please change the excerpt length in the function from 200 to 56.
To show the full post on your news page go to Appearance->Theme Settings->Blog and set the option Post Content to ‘Full Post’.
Hope this helps
Magus
No, this is not working. Have no idea why not. but thanks for trying to help me :)
But i found a widget, so that solved my problem.
Hi Nina
Am glad that you have managed to iron out your issue.
Always feel free to open a new thread whenever you require support
@Magus much appreciated
Cheers