WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Pages, Page Templates, <!--more--> - I need a page to display posts using more.. (6 posts)

  1. Degrama
    Member
    Posted 5 years ago #

    OkOk

    I need to have a page called "Movies", show exactly the same information as the frontpage. Well doesnt have to be exact, but I at least need to be able to edit it.

    Step 1:
    I created a Page Template called "Movies" which I thought would work because I copied the code from index.php into movies.php and it almost worked. The only problem is it displays each post in full, when I really need it to display only the content above <--more-->... obviously <--more--> does not work in pages :\

    Step 2:
    Not pretty, I added a redirect in movies.php back to the front-page. Works but ultimately sucks and I dont like doing things like this...

    Any ideas, suggestions, or solutions?

  2. Rodeo Imagination
    Member
    Posted 5 years ago #

    Have you tried using the_excerpt() instead of the_content()? That way you are forcing just a part of the text to be shown.

  3. Degrama
    Member
    Posted 5 years ago #

    but ultimately my excerpt() is blank.... I thought you had to fill out a portion of the excerpt for that to work?

  4. MichaelH
    Member
    Posted 5 years ago #

    In the template tag, the_excerpt(), it says:

    If you do not provide an explicit excerpt to a post (in the post editor's optional excerpt field), it will display a teaser which refers to the first 55 words of the post's content.

  5. Rodeo Imagination
    Member
    Posted 5 years ago #

    As MichaelH said, the_excerpt() recalls part of the text.

    If you want to have more control over the_excerpt() you can search for plugin "The excerpt reloaded" which pulls not only plain text, but format content like images and tags (bold, paragraph, etc).

    It depends on the use you want to get out of it. Good luck!

  6. Degrama
    Member
    Posted 5 years ago #

    ok thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic