• Hi
    I would like to have the first paragraph of my blog visible with the title and then click on read more link to see more of the story.
    Is this possible and are there any pitfalls to doing this.

    I am new to wordpress so It maybe a simple setting in the dashboard that I can’t see.

    Thanks
    Chris

Viewing 5 replies - 1 through 5 (of 5 total)
  • When you are listing the Posts, rather than using the_content() (which shows the whole of the post) you could use the_excerpt(). You can declare the Excerpt for each post on the Edit Post screen, but this will take time, so if you leave that blank WordPress will dipsplay the first 60 (I think) characters of the post.

    You can then add a ‘Read More’ link if you wish (I simply use <a href="<?php the_permalink($post->post_id); ?>">Read more...</a>), or clicking on the title should also do the trick.

    Hope that helps

    Thread Starter grishart

    (@grishart)

    Thanks I have done that but when I click on the Read more i am getting the error message The requested URL was not found on this server

    and the url is reading https://www.emotionalfirstaid.co.uk/news/http:/www.emotionalfirstaid.co.uk/news/aboutus is this because I am hosting the site?

    When you say add the exerpt on the edit page would I need to do that in the html view when I am writing each post in the future?

    Thanks
    Chris

    Thread Starter grishart

    (@grishart)

    Ignore the error message thing I have just realised that what I had tried to do earlier was causeing that! :-0

    The link being created incorrectly may just be the way your site is set up (slightly different than mine I suspect) – have a quick look for obvious errors that may be generating the link twice though (perhaps change the_permalink($post->post_id); to just the_permalink();, and make sure that you are not in PHP when writing that as it will cause undesirable results.

    As for the Excerpt – if you look on the Edit Post screen in your admin area then you should see another box underneith the main text editor that is simply title ‘Excerpt’ – this is what you can fill in if you wish, but if you do not fill it in WordPress will not ignore your post, it will simply take the first 60 characters.

    To then display the_exceprt() as opposed to the_content() you would need to edit the file index.php.

    Thread Starter grishart

    (@grishart)

    Hi Thanks
    It seems when I add permalinks to the pages it also adds it to my posts and gives everyone the same url?

    I have to revert to the ?page_id=2 form so the posts still work.

    Thanks
    Chris

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to just show the start of each blog’ is closed to new replies.