MORE tag not working
-
This is a very nice theme and I’d like to use it for my blog. So far I found out, that the MORE tag is not working. Can somebody help me?
Code in blog:
beauty of <!–more–> this town.In the blog I can only see “beauty of” and no indication that the blog text is longer.
-
Are you adding more tag by following this steps:
To add a more quicktag in your post, put your cursor where you want to end the excerpted content of your post and click the more quicktag button. quicktags are the little buttons found above the editing window in your Administration > Write > Post SubPanel. They include bold, italic, links, and others, and the famous more.
As per the coding it should work.
Can you share your blog link ?
Hi,yes I used the standard tag button in the post which shows me a “MORE“ line in the post.
I think there is not much which I could do wrong.The blog link is redfam.com
Regards,BeatHello redfam01,
The blog post lists on your home page is coded to display excerpt of 80 characters and after that if more content is there it displays READ MORE. So don’t add more rag explicitly. Home page will automatically display only excerpt.
Falguni
Hi, I removed the MORE tag in the post
4 hours in Prag
but it didn’t help.Beat
80 words not characters. Thanks for your hint I think I got it.
BeatHello Beat,
yeah, 80 words. And, i must say your blog has very beautiful photographs.
Falguni
Thank you for helping me. Would it be possibe for you to make the posts more flexible? e.g. 80 words as default and the flexibility to set the tag in the post where ever I want? Sometimes I have only 10 words, but 10 pictures.If you dont open the post you can’t see the pictures.
I’m not a programmer and maybe my wish is not possible.I like to keep your theme,it is the best I can currently find!
Regards,BeatHello,
Please open the function.php (Nisarg Theme) and others in line 206 from 80 to 50 or 30.…
function custom_excerpt_length( $length ) {
return 80;
}Greetings Uwe
Hello
I am new to WP but have lots of experience in programming. I was bothered by the same issue redfam01 raised: I like to be in control about where I want my post to break on index pages. I first tried to change custom_excerpt_length as suggested above but that was not very appealing.
So I went through some of the WP docu on theme structure and finally made a change to the file content.php (within the template-parts folder of the nisarg theme). That change activates the regular behaviour of the more tag. So the problem is solved for my site.
However, I was not yet able to get the same format of the more link. It is no longer in capital letters and also not centered. This will need more work which I do not have right now.
I would like this theme to be configurable as far as the more tag is concerned: either regular behaviour or the excerpt mode the author favors.Well, at least I figured out just a tiny bit about WP’s inner life….
Greetings from Switzerland.
Here is the small change in content.php that did the trick:
<?php if ( is_search() || is_home() || is_archive() || is_author()) : // Only display Excerpts for Search ?> <div class="entry-summary"> <!-- Hier ge?ndert ---------------------------------> <!-- hier stand <?php the_excerpt(); ?> <!-- ersetzt durch folgendes: --> <?php the_content(); ?> </div><!-- .entry-summary -->
Hi again
I addition to the previous solution to the more tag I now also figured out how to bring back the nisarg-original centered read more link. I modified the file functions.php – added the following lines (position is not critical, is just function definitons):
Works with my blog: I now have full and post-based control over the more tag and the tag is shown nisarg like.
DO THIS ON YOUR OWN RISK!Hope this helps, Peter
/* -------- added this for the decorated nisarg more link -------*/ function my_more_link($more_link, $more_link_text) { return str_replace($more_link_text, '...<p class="read-more"><a class="btn btn-default" href="'. esc_url(get_permalink( get_the_ID() )) . '">' . __(' mehr lesen...', 'nisarg') . '<span class="screen-reader-text"> '. __(' mehr lesen...', 'nisarg').'</span></a></p>', $more_link); } add_filter('the_content_more_link', 'my_more_link', 10, 2); /* ---------- to here ----------------------------- */
Hi Peter,
Great news! I was a programmer 35 years ago and you can assume that I used another programming language ?
I will try to include these changes in my code.
Kind regards, also from Switzerland, BeatHi Peter,
I made the changes and …… it works! Many thanks. I am now able to set the more tag with the post.
Do I understand correctly: You can now set the more tag within a post or automatically after certain words?
Kind regards, BeatHi Beat
This thing with ‘after a certain number of words’ – as it is in the Nisarg theme sounds silly to me. The change I made requires you to set the more tag yourself while writing the post. That is the way most themes do it. So just insert a more tag wherever you like. That is what you wanted in your original post. If you have just a few words followed by pictures, this makes more sense.
Hope this helps.
PeterBTW: check out my picture galleries at
https://foto.descan.comI also have this issue which is quite annoying.
Dakota127, I saw your proposed solution here above but I do not understand where in the code of the content.php you have inserted your lines?
Could it be possible to have more details?Also Falguni, do you plan an update to solve this issue?
Thank you
AlainDearest all,
I am experiencing a very similar problem, which does not seem to be the same as other posts about More tags.
Specifically, the More tag is not inserting a text link. It just curtails the excerpt with no indication that the post (or testimonial) is longer. “Read more” or “continue” or anything like it.
I’m using the Visual editor to insert the More tag. It looks correct
<!–more–>I am using WP 4.5.3, Juniper theme, with only Jetpack installed.
So I looked at my other sites that use other themes. NONE of them have “more” anywhere, and I already got one complaint from a viewer saying that they couldn’t figure out how to read the rest of the blog post because there was no link. (They eventually clicked on the title, but I’m sure I’m losing views because of this.)
Is this a WP 4.5.3 bug? This is a real hindrance to keeping viewers on the sites, IMHO.
Many thanks to anyone who can give me a workaround that is not too complicated and lets me know that the WP programmers are on top of it.
With sparkle,
Laraesque
- The topic ‘MORE tag not working’ is closed to new replies.