Trouble with <!-- more --> button

  1. 2 years ago

    Hi all, I just found the read more button within admin which I think is amazing. However, I just inserted it into one of my posts and it hasn't appeared on the front of my site. I am using my own custom theme, is there anything I need to add onto my theme to get it working? Also, I would like an about me blurb on the front of my site which then links to the rest of the about me page, can I use this <!-- more --> on the about? Any help would be appreciated.

    In case you wanted to check my site, it's michaelbrooks.co.uk . I talk mostly about Laravel and web development. :)

  2. ericbarnes

    Jun 3 Administrator

    Sorry for the delay. When you are looping your posts you need to use:

    {{ $post->parsed_intro }}

    Instead of:

    {{ $post->parsedContent }}
  3. Thank you for the reply. How could I add a Read More button at the end so they know that it's not the end of the post. I'm guessing it would be in JQuery/Javascript, but not sure how as that <!-- more --> is just a comment tag. Any help would be appreciated. :)

  4. Thank you for the reply. How could I add a Read More button at the end so they know that it's not the end of the post. I'm guessing it would be in JQuery/Javascript, but not sure how as that <!-- more --> is just a comment tag. Any help would be appreciated. :)

  5. ericbarnes

    Jun 11 Administrator

    That isn't included so you have full flexibility to do it however you want. :)

    One way would be to just that

    {{ $post->parsed_intro }}

    Then under it add the link manually. So your end result would be something like:

    {{ $post->parsed_intro }}
    <a href="{{ wardrobe_url('/post/'.$post->slug) }}">Read More</a>

or Sign Up to reply!