Live Wire
[resolved] --more-- tag not working (5 posts)

  1. meligo
    Posted 2 years ago #


    I really like the live wire theme but I have a small issue concerning the --more-- tag, when I use this in my blog posts, the main page of my blog nicely shortens the blog post to where the tag is used, but I don't see [...] or read more or more or whatever.

    http://blog.meligo.be is my blog and as you can see the only option users have is to click the blog post title.

    Anything I can do to check what is going on?

    Many thanks

  2. Sami Keijonen
    Theme Author

    Posted 2 years ago #

    Yes that is exactly how WP works. You have written custom excerpt in articles, right? Then you dont't have [...] in the end.

    In demo I haven't written any custom excerpt: http://foxnet.fi/demot/live-wire/

    Also <!--more--> tag doesn't have any effect when theme is using the_excerpt and not the_content function.



    Naturally all this can be changed if wanted via child theme.

  3. Sami Keijonen
    Theme Author

    Posted 2 years ago #

    So have you written custom excerpt in every article? If so you can add read more link like this.

    Add this line in child theme functions.php inside setup function.

    add_filter( 'the_excerpt', 'my_excerpt_more' );

    And this after setup function.

    function my_excerpt_more( $excerpt ) {
    	return $excerpt . '<p><a class="read-more" href="'. get_permalink( get_the_ID() ) . '">' . __( 'Read More', 'my-text-domain' ) . '</a></p>';
  4. meligo
    Posted 2 years ago #

    Thanks a lot! now it works like a charm :-)
    Maybe something to add to your theme as an option?

    kind regards

  5. Sami Keijonen
    Theme Author

    Posted 2 years ago #

    That is an option to add via child theme:)

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic