WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. meligo
    Member
    Posted 9 months ago #

    Hey

    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
    Member
    Theme Author

    Posted 9 months 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.

    http://codex.wordpress.org/Function_Reference/the_excerpt

    http://codex.wordpress.org/Function_Reference/the_content

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

  3. Sami Keijonen
    Member
    Theme Author

    Posted 9 months 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
    Member
    Posted 9 months 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
    Member
    Theme Author

    Posted 9 months ago #

    That is an option to add via child theme:)

Reply

You must log in to post.

About this Theme

About this Topic