WordPress.org

Ready to get started?Download WordPress

Forums

How to display the titles and few lines only of a post in the main page? (7 posts)

  1. wordprezzer
    Member
    Posted 2 years ago #

    Hi,

    I'm using the twenty eleven theme and would like to restrict the display of the whole post content.
    In fact, showing all the content, particularily if it is long, will lengthen the page and limits it to few titiles. So, I would lile to show only the title of the post with the first lines and leave the rest of the post available only if the reader wished to read more.
    Does somebody know how apply this in the default theme?
    In other word, how to display only the titles and few lines of the post content on the main page?

    Thank you

  2. wordprezzer
    Member
    Posted 2 years ago #

    I just would like to add that, currently, if I make a long post it will appear entirely in the main page! So, I would like to limit the visible text to the few first line only and leave the rest under read more... !

  3. Digital Raindrops
    Member
    Posted 2 years ago #

    Use the more tag from the editor or write a post excerpt, I wrote a post to explain the excerpts and more options, it may help!

    David

  4. wordprezzer
    Member
    Posted 2 years ago #

    Thank you very much, Digital Raindrops!
    This is exactly what I'm looking for!
    Nevertheless, there is a small issue: the text appears as 'continue reading the "post title" !
    This is a little bit crude word! I'd prefer short one such as "read more" !
    So, do you know how to modify this to a shorter version (read more rather than continue reading .." ?
    In which file I could find this code and modify it to "read more" instead of "continue reading.." ?

    Thank you very much

  5. wordprezzer
    Member
    Posted 2 years ago #

    Or simply put "more.." instead of "read more.."

  6. Digital Raindrops
    Member
    Posted 2 years ago #

    That is really a different topic, much more involved, you should either create a new topic or Google a solution.

    In which file I could find this code and modify it to "read more" instead of "continue reading.." ?

    Never alter the twenty eleven theme, when WordPress is updated the theme could be deleted and re-installed any changes will be history!

    First you would use a child theme, this would have a style.css, a functions.php and a screenshot.

    There are several child theme downloads, one of them is mine, use any of them, install and activate, if you do not want to create your own.

    Then you are ready to find the solution and edit the files in the child theme, and upload them with FTP or your ISP's File Manager.

    This one looks fairly well code commented, you could add the code to the child themes functions.php, and the post comment are positive.

    HTH

    David

  7. wordprezzer
    Member
    Posted 2 years ago #

    OK, thank you a lot, David.

    Enjoy your time.

    Regards,

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.