Need help? Check out our Support site, then


Description under post title

  1. I currently have a static front page and I want to add the little description feature after each post you can read a little bit of the post and a button will say read more which will take you to the full article. When I tried to pair this code separately with my other codes on the page it works but doesn't keep my original format. How do I insert this code into my other codes properly?

    [display-posts include_excerpt="true"]

    <h3 style="text-align:center;"><span style="color:#0066cc;">Podcast Episodes</span></h3> [display-posts include_excerpt="true"]
    [display-posts category="podcast-episodes" posts_per_page="3" include_date="true" date_format="F j, Y" image_size="thumbnail"]
    <h3 style="text-align:center;"><span style="color:#0066cc;">Sports & Pro Wrestling Articles</span></h3> [display-posts include_excerpt="true"]
    [display-posts category="sportspro-wrestling-articles" posts_per_page="3" include_date="true" date_format="F j, Y" image_size="thumbnail"]
    <h3 style="text-align:center;"><span style="color:#0066cc;">Music/Movies/Games Reviews</span></h3>[display-posts include_excerpt="true"]
    [display-posts category="music/movies/games-reviews" posts_per_page="3" include_date="true" date_format="F j, Y" image_size="thumbnail"]
    <h3 style="text-align:center;"><span style="color:#0066cc;">Social Topic Pieces</span> </h3>[display-posts include_excerpt="true"]
    [display-posts category="social-topic-articles" posts_per_page="3" include_date="true" date_format="F j, Y" image_size="thumbnail"]

    Above is how I set it on my static page.

    The blog I need help with is fteswl.com.

  2. Hello @fteswl,
    You theme "Arcane" supports the post excerpts feature, check here: https://theme.wordpress.com/themes/arcane/.

    So you do not have to work with codes to insert the post excerpts and the read more link.

    Just do this,
    1. Go to My Site(s) → Customize(Beside the Themes option). This will open the site Customizer.
    2. On the sidebar of the Customizer, click on Content Options tab and select Post excerpt under the Blog Display section.
    3. Click Save & Publish.

    You can also make use of the More tag, but it is not necessary since your theme already supports excerpts.

    Hope this helps! 🙂

  3. Hey Otpidus,

    When I go to "Theme Options" from the "Customize" section it has "show excerpt" clicked already. It does show excerpts on the actual pages but not on my home page, which is a static front page. That is where I need help at.

  4. manuschwendener
    Member

    The same is happening for me.

    On https://ubblogtest.wordpress.com I display the posts from https://ubblogtest.wordpress.com/neueste [which I need to be able to display the featured images] – but the excerpt fields are ignored.

    [display-posts include_excerpt="true" excerpt_more="Weiterlesen" excerpt_more_link="true" posts_per_page="7" image_size="medium" wrapper="div"]

    Excerpts working as expected on https://ubblogtest.wordpress.com/alle, which is the Posts Page.

  5. manuschwendener
    Member

    Fix working for me, found on https://github.com/billerickson/display-posts-shortcode/wiki#customizing-the-excerpt:

    I was missing excerpt_length="20" .

    [display-posts include_excerpt="true" excerpt_length="20" excerpt_more="Weiterlesen" excerpt_more_link="true" posts_per_page="7" image_size="medium" wrapper="div"]

  6. So I need to add excerpt length = 20 to see the a little bit of the post description on the front page?

  7. Hello again @fteswl,
    Maybe try this:
    1. Display post excerpts
    [display-posts include_excerpt="true"]
    and then,
    2. Manually add a read more link to the full post using the post editor?

  8. manuschwendener
    Member

    > So I need to add excerpt length = 20 to see the a little bit of the post
    > description on the front page?

    I needed to add excerpt_length="25" (with an underscore between excerpt and length) to display the text from the excerpt field at all.

    But I haven't figured out yet how to get the excerpt to stop after those 25 words and add a 'read more' link.

    My code at the moment:

    [display-posts include_excerpt="true" excerpt_length="25" excerpt_more="Weiterlesen" excerpt_more_link="true" posts_per_page="5" image_size="medium" wrapper="div"]

    https://ubblogtest.wordpress.com

  9. Hello @manuschwendener,
    I am not sure about the attributes like [excerpt_length="25" excerpt_more="Weiterlesen" excerpt_more_link="true"], as they are not mentioned any where here: https://en.support.wordpress.com/display-posts-shortcode/

    If you read about the usage of those shortcodes from the WordPress.ORG, then please search the forums if they work on WordPress.COM as well. Because not all shortcodes that work on WordPress.ORG work on WordPress.COM as well.

  10. CORRECTION:
    If you read about the usage of those shortcodes from the WordPress.ORG support guides*

  11. manuschwendener
    Member

    @otpidusprime You are right. I only posted here because my excerpts didn't show at all before I added excerpt_length.

    I have now changed my code to

    [display-posts include_excerpt="true" posts_per_page="5" image_size="medium" wrapper="div"]

    and it's working.

    I still would like a 'Read more' link, though ;-)

  12. manuschwendener
    Member

    @fteswl you write

    'When I go to "Theme Options" from the "Customize" section it has "show excerpt" clicked already. It does show excerpts on the actual pages but not on my home page'

    On https://fteswl.com/category/podcast-episodes I see the beginnings of your texts, with a "READ MORE" link.

    The Excerpts field is a separate field. In my theme, I have to edit a post, then click on 'More Options' in the column on the right, under 'Post Settings'. Only then I see the field called "Excerpt".

    (But in my case, if I leave that empty, the front page just shows the text from the blog post.)

  13. manuschwendener
    Member

    Btw. if you add texts in the Excerpt field, save the post and still don't see the excerpt on the main page that might be a cache problem, not because your change didn't work.

  14. @manuschwendener,

    I still would like a 'Read more' link, though ;-)

    Maybe you can use the More Tag to force the read more links for your posts and see if it works?

  15. manuschwendener
    Member

    > Maybe you can use the More Tag to force the read more links for
    > your posts and see if it works?

    Thank you for that link, otpidusprime. I would like to use that for different reasons, but the theme's instructions are stronger.

    (It's set after 'chicory' in the 'Open Science – text with pictures' post.)

  16. manuschwendener
    Member

    > Maybe you can use the More Tag to force the read more links for
    > your posts and see if it works?

    Thank you for that link, otpidusprime. I would like to use that for different reasons, but the theme's instructions are stronger.

    (It's set after 'chicory' in the 'Open Science – text with pictures' post.)

  17. manuschwendener
    Member

    > Maybe you can use the More Tag to force the read more links for
    > your posts and see if it works?

    Thank you for that link, otpidusprime. I would like to use that for different reasons, but it's not working as expected with Twenty Seventeen (not important enough atm to go into the details, though).

  18. [display-posts include_excerpt="true"] Works but it's displaying all the posts instead of just the 3 posts in each section. So I am not sure how to incorporate the code.

    I also would like that "read more" button under each post. Does that mean I have to manually input that button in the post for each post on the front page now?

    I can't tell if it works yet though because I have to get the excerpts code to just do the 3 posts under each category first and then I can see about the read more. There is no css code to tie in with the excerpt?

  19. manuschwendener
    Member

    @otpidusprime I found out how to activate the more tag on my Posts Page, but it's not working on the main page
    (https://en.forums.wordpress.com/topic/twenty-seventeen-can-i-have-less-than-55-words-before-continue-reading?replies=4#post-2929372)

  20. manuschwendener
    Member

    @fteswl If you want to work with excerpts, try moving "include_excerpt="true" into the code for the 3 posts per category, not have them in separate brackets:

    <h3 style="text-align:center;"><span style="color:#0066cc;">Podcast Episodes</span></h3>
    [display-posts category="podcast-episodes" posts_per_page="3" include_excerpt="true" include_date="true" date_format="F j, Y" image_size="thumbnail"]

    ---

    On the other hand, as far as I know you can't get a 'read more' link if you're working with the Excerpt fields – so it might not be what you want.

    In my theme, if I leave the excerpt field empty and have 'Post excerpt' checked in the Customizer (under Content Options), I get a "Continue reading" link on the main page if the text is longer than 55 words.
    https://ubblogtest.wordpress.com

  21. Manu yes I would like both the excerpt and the read more on my static front page like how it is on my other pages. I am not sure how to do that.

  22. manuschwendener
    Member

    Seeing that you paid for Arcane, maybe ask your question here https://premium-themes.forums.wordpress.com/forum/arcane?

  23. Thank you Manu I made a thread there.

  24. manuschwendener
    Member

    Wanted to add (but was too late):

    What you want to see on your main page has nothing to do with [display-posts include_excerpt="true"].

    "include_excerpt" fetches the text from a separate Excerpt field that you can fill for each posts. It would override the start of the text of your blog posts (which is the text you see on your other pages) and you would lose the 'more' link.

    What you want to see on your front page is the start of your blog posts, with a 'Read more' link – like they look on your other pages.

  25. Yeah exactly

  26. So basically there isn't anything to help?

  27. manuschwendener
    Member

    I read the reply in https://premium-themes.forums.wordpress.com/topic/static-front-page-help.

    All I can say is that I can get it to work in the Twenty Seventeen theme, see https://ubblogtest.wordpress.com and https://ubblogtest.wordpress.com/alle.

    If I were you this is what I would try next:

    In the CSS don't write [display-posts include_excerpt="true"] in its own brackets, but integrate it into the statements that you already have.

    This would give you (from your first post here)

    <h3 style="text-align:center;"><span style="color:#0066cc;">Podcast Episodes</span></h3>
    [display-posts category="podcast-episodes" posts_per_page="3" include_excerpt="true" include_date="true" date_format="F j, Y" image_size="thumbnail"]

    <h3 style="text-align:center;"><span style="color:#0066cc;">Sports & Pro Wrestling Articles</span></h3>
    [display-posts category="sportspro-wrestling-articles" posts_per_page="3" include_excerpt="true" include_date="true" date_format="F j, Y" image_size="thumbnail"]

    <h3 style="text-align:center;"><span style="color:#0066cc;">Music/Movies/Games Reviews</span></h3>
    [display-posts category="music/movies/games-reviews" posts_per_page="3" include_excerpt="true" include_date="true" date_format="F j, Y" image_size="thumbnail"]

    <h3 style="text-align:center;"><span style="color:#0066cc;">Social Topic Pieces</span> </h3>
    [display-posts category="social-topic-articles" posts_per_page="3" include_excerpt="true" include_date="true" date_format="F j, Y" image_size="thumbnail"]

  28. manuschwendener
    Member

    But if you want to use include_excerpt="true" you also have to write an Excerpt for each post (this is a separate field under Post Settings – More Options).

    With excerpts you won't get 'read more' links, but the title and the picture still link to the blog post.

  29. I added the codes you presented thank you Manu. Is there a way to keep it centered so the text doesn't go under the image?

  30. manuschwendener
    Member

    You can style it with CSS, I'll copy my code below but don't know how to stop it from wrapping around the picture.

    .display-posts-listing .alignleft {
    	float: right;
    	margin: 5px 5px 25px 25px;
    }
    
    .display-posts-listing .listing-item {
    	clear: both;
    	padding-bottom: 40px;
    }
    
    .display-posts-listing .listing-item .title {
    	display: block;
    	font-size: 125%;
    	margin-bottom: 15px;
    }
    
    .display-posts-listing .excerpt-dash {
    	display: none;
    }
    
    a.title {
    	box-shadow: none;
    	-webkit-box-shadow: none;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic