Support Forums for LiveMesh Themes & Plugins › Forums › Invent Theme Support › Show more contents using "more" tag in the testimonial page
Tagged: more tag, Testimonial
- This topic has 7 replies, 3 voices, and was last updated 6 years, 6 months ago by
palmtree.
-
AuthorPosts
-
May 18, 2017 at 6:53 am #26659
palmtree
ParticipantI want this page
https://www.livemeshthemes.com/invent/home-2/#testimonials2Not to show content after “more” tag (by inserting more tag it works now)
But this page
https://www.livemeshthemes.com/invent/testimonials/To show content after “more tag (which doesn’t work). Currently if I use more tag, contents after more tag is not visible in https://www.livemeshthemes.com/invent/testimonials/ as well.
I want to hide certain content of each testimonial in front page but display in testimonial dedicated page.
Is there any way to modify a bit of code inside template-testimonials.php?
May 24, 2017 at 1:30 pm #26708Raghavendra
ModeratorIn the template-testimonials.php, pls replace the line no. 73 containing
the_content()
with –global $more; $more = -1; the_content(); $more = 0;
You can copy over the template-testimonials.php into your child theme to prevent updates to theme from removing your change.
May 24, 2017 at 1:57 pm #26712palmtree
ParticipantThanks it works!
Meteorite, is there any way to get rid of [···] for more tag output only in this particular testimonial section?
I have triedthe_content('',false,'')
but did not work.May 24, 2017 at 2:00 pm #26714Raghavendra
ModeratorThere is more information available here-
May 24, 2017 at 2:53 pm #26718palmtree
ParticipantActually whatever rules I applied, they are ignored…
I have also tried to add following to functions.php but also didn’t work.function my_excerpt_more($more) { return ''; } add_filter('excerpt_more', 'my_excerpt_more');
May 25, 2017 at 6:31 am #26728Veena
ModeratorCan you pls try this –
function change_excerpt( $text ) { $pos = strrpos( $text, '['); if ($pos === false) { return $text; } return rtrim (substr($text, 0, $pos) ); } add_filter('get_the_excerpt', 'change_excerpt');
May 25, 2017 at 7:01 am #26729Veena
ModeratorMay 25, 2017 at 7:32 am #26730palmtree
ParticipantPhoenix,Thanks for trying.
Your code also didn’t do anything. It seems like any code I put is ignored..
If I use<?php the_excerpt(); ?>
the after more tag I cannot see any text in the testimonial page seen at https://www.livemeshthemes.com/invent/testimonials/As long as I keep
<?php the_content(); ?>
with the method meteorite suggested, the more tag works although it outputs [···].But at the end of the day, if more tag works that is the main purpose! Getting rid of [···] is just for very little designing purpose. I can live with it:)
Thanks for your support!
-
AuthorPosts
- The forum ‘Invent Theme Support’ is closed to new topics and replies.