read more tag not displayed
-
Hallo,
I have got the hueman theme 3.3.10 and I created a child theme. My website is http://www.amplonius.de
I would like to have displayed the words “read more” in my posts. The read more function itself works, but there is no advice for the readers that there is more text on the next page. How can I get this?
Thanks for your help.
-
Hello jen-me,
Depending on your theme configuration, you can add the following code to either content-standard or content-featured right below
<?php the_excerpt(); ?><br><a href="<?php the_permalink(); ?>">read more</a>Hope this helps you, take care.
Hallo, thank you for your help but it doesn’t work 🙁
The code of the content-standard.php ist now:
<article id="post-<?php the_ID(); ?>" <?php post_class( array( 'group', 'post-standard' , 'grid-item') ); ?>> <div class="post-inner post-hover"> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <?php hu_the_post_thumbnail('thumb-standard'); ?> <?php if ( has_post_format('video') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-play"></i></span>'; ?> <?php if ( has_post_format('audio') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-volume-up"></i></span>'; ?> <?php if ( is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-star"></i></span>'; ?> </a> <?php if ( comments_open() && ( hu_is_checked( 'comment-count' ) ) ): ?> <a class="post-comments" href="<?php comments_link(); ?>"><span><i class="fa fa-comments-o"></i><?php comments_number( '0', '1', '%' ); ?></span></a> <?php endif; ?> </div><!--/.post-thumbnail--> <div class="post-content"> <div class="post-meta group"> <p class="post-category"><?php the_category(' / '); ?></p> <?php get_template_part('parts/post-list-author-date'); ?> </div><!--/.post-meta--> <h2 class="post-title entry-title"> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> </h2><!--/.post-title--> <?php if (hu_get_option('excerpt-length') != '0'): ?> <div class="entry excerpt entry-summary"> <?php the_excerpt(); ?> </div><!--/.entry--> <?php endif; ?> </div><!--/.post-content--> </div><!--/.post-inner--> </article><!--/.post--> <?php the_excerpt(); ?> <br><a href="<?php the_permalink(); ?>">read more</a>The code of the content-featured.php ist now:
<article id="post-<?php the_ID(); ?>" <?php post_class('group'); ?>> <div class="post-inner post-hover"> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <?php hu_the_post_thumbnail('thumb-large'); // only difference to content.php ?> <?php if ( has_post_format('video') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-play"></i></span>'; ?> <?php if ( has_post_format('audio') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-volume-up"></i></span>'; ?> <?php if ( is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-star"></i></span>'; ?> </a> <?php if ( comments_open() && ( hu_is_checked('comment-count' ) ) ): ?> <a class="post-comments" href="<?php comments_link(); ?>"><span><i class="fa fa-comments-o"></i><?php comments_number( '0', '1', '%' ); ?></span></a> <?php endif; ?> </div><!--/.post-thumbnail--> <div class="post-meta group"> <p class="post-category"><?php the_category(' / '); ?></p> <?php get_template_part('parts/post-list-author-date'); ?> </div><!--/.post-meta--> <h2 class="post-title entry-title"> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> </h2><!--/.post-title--> <?php if ( ! hu_is_checked('featured-posts-full-content') ) : ?> <div class="entry excerpt entry-summary"> <?php if ( hu_get_option('excerpt-length') != '0' ) { the_excerpt(); } ?> </div><!--/.entry--> <?php else : ?> <div class="entry excerpt"> <?php the_content() ?> </div><!--/.entry--> <?php endif; ?> </div><!--/.post-inner--> </article><!--/.post--> <?php the_excerpt(); ?> <br><a href="<?php the_permalink(); ?>">read more</a>Can you please tell me if it is maybe at the wrong position?
I think you misunderstood, you need to copy
<br><a href="<?php the_permalink(); ?>">read more</a>and past it right below<?php the_excerpt(); ?>Take care.
Ah okay, thank you. I think I missunderstood because of my bad english, sorry 😀
Now I copied
<br><a href="<?php the_permalink(); ?>">read more</a>below<?php the_excerpt(); ?>in the content-standard.php (in the content-featured.php is no code<?php the_excerpt(); ?>)Unfortunately it still has no effect 🙁 Have I still done something wrong? Or do you maybe have got another idea?
-
This reply was modified 8 years, 11 months ago by
jen-me.
Just copy and paste the following code to content-featured.php and content-standard.php and clear all caches:
content-featured.php
<article id="post-<?php the_ID(); ?>" <?php post_class('group'); ?>> <div class="post-inner post-hover"> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <?php hu_the_post_thumbnail('thumb-large'); // only difference to content.php ?> <?php if ( has_post_format('video') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-play"></i></span>'; ?> <?php if ( has_post_format('audio') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-volume-up"></i></span>'; ?> <?php if ( is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-star"></i></span>'; ?> </a> <?php if ( comments_open() && ( hu_is_checked('comment-count' ) ) ): ?> <a class="post-comments" href="<?php comments_link(); ?>"><span><i class="fa fa-comments-o"></i><?php comments_number( '0', '1', '%' ); ?></span></a> <?php endif; ?> </div><!--/.post-thumbnail--> <div class="post-meta group"> <p class="post-category"><?php the_category(' / '); ?></p> <?php get_template_part('parts/post-list-author-date'); ?> </div><!--/.post-meta--> <h2 class="post-title entry-title"> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> </h2><!--/.post-title--> <?php if ( ! hu_is_checked('featured-posts-full-content') ) : ?> <div class="entry excerpt entry-summary"> <?php if ( hu_get_option('excerpt-length') != '0' ) { the_excerpt(); } ?> </div><!--/.entry--> <?php else : ?> <div class="entry excerpt"> <br><a href="<?php the_permalink(); ?>">read more</a> <?php the_content() ?> </div><!--/.entry--> <?php endif; ?> </div><!--/.post-inner--> </article><!--/.post-->content-standard.php
<article id="post-<?php the_ID(); ?>" <?php post_class( array( 'group', 'post-standard' , 'grid-item') ); ?>> <div class="post-inner post-hover"> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <?php hu_the_post_thumbnail('thumb-standard'); ?> <?php if ( has_post_format('video') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-play"></i></span>'; ?> <?php if ( has_post_format('audio') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-volume-up"></i></span>'; ?> <?php if ( is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-star"></i></span>'; ?> </a> <?php if ( comments_open() && ( hu_is_checked( 'comment-count' ) ) ): ?> <a class="post-comments" href="<?php comments_link(); ?>"><span><i class="fa fa-comments-o"></i><?php comments_number( '0', '1', '%' ); ?></span></a> <?php endif; ?> </div><!--/.post-thumbnail--> <div class="post-content"> <div class="post-meta group"> <p class="post-category"><?php the_category(' / '); ?></p> <?php get_template_part('parts/post-list-author-date'); ?> </div><!--/.post-meta--> <h2 class="post-title entry-title"> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> </h2><!--/.post-title--> <?php if (hu_get_option('excerpt-length') != '0'): ?> <div class="entry excerpt entry-summary"> <?php the_excerpt(); ?> <br><a href="<?php the_permalink(); ?>">read more</a> </div><!--/.entry--> <?php endif; ?> </div><!--/.post-content--> </div><!--/.post-inner--> </article><!--/.post-->-
This reply was modified 8 years, 11 months ago by
FadingMusic.
Alternatively you can use a plugin, but i don’t recommend it.
No, unfortunately it doesn’t work :/
I have also a content.php
<article id="post-<?php the_ID(); ?>" <?php post_class( array('group', 'grid-item') ); ?>> <div class="post-inner post-hover"> <div class="post-thumbnail"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <?php hu_the_post_thumbnail('thumb-medium'); ?> <?php if ( has_post_format('video') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-play"></i></span>'; ?> <?php if ( has_post_format('audio') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-volume-up"></i></span>'; ?> <?php if ( is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-star"></i></span>'; ?> </a> <?php if ( comments_open() && ( hu_is_checked( 'comment-count' ) ) ): ?> <a class="post-comments" href="<?php comments_link(); ?>"><span><i class="fa fa-comments-o"></i><?php comments_number( '0', '1', '%' ); ?></span></a> <?php endif; ?> </div><!--/.post-thumbnail--> <div class="post-meta group"> <p class="post-category"><?php the_category(' / '); ?></p> <?php get_template_part('parts/post-list-author-date'); ?> </div><!--/.post-meta--> <h2 class="post-title entry-title"> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> </h2><!--/.post-title--> <?php if (hu_get_option('excerpt-length') != '0'): ?> <div class="entry excerpt entry-summary"> <?php the_excerpt(); ?> </div><!--/.entry--> <?php endif; ?> </div><!--/.post-inner--> </article><!--/.post-->Maybe do I have to change something here? Putting
<br><a href="<?php the_permalink(); ?>">read more</a>below<?php the_excerpt(); ?>in this file had no effect either.Hi jen-me,
If you applied the suggested changes, then either something must be overriding it or you need to clear all caches. You might even need to hit CTRL + F5 to refresh your cache as well.
<br>adds a line break after the excerpt, while<a href="<?php the_permalink(); ?>">read more</a>is basically a renamed post title. -
This reply was modified 8 years, 11 months ago by
The topic ‘read more tag not displayed’ is closed to new replies.
