Support » Plugin: Events Manager » “Read More” doesn’t work
“Read More” doesn’t work
-
Hi, I’m trying to use the “Read More” from wordpress (the thing that cut a post where chose to and add a “read more” link to see the whole content on the single-post (or single-event in this case) page. (cf: https://en.support.wordpress.com/wordpress-editor/blocks/more-block/2/ )
Any one made a fix for this or something I could use ?
Thanks !The page I need help with: [log in to see the link]
-
you can try to use placeholder
#_EVENTEXCERPT{20,...}<a href="#_EVENTURL"> Read More</a>
Thank you for your answer @angelo_nwl but it doesn’t seem to work. Actually, it just writes the exact same line you sent me. I’ve edited the event in text mode instead of visual to be sure. The “read more” link appears after the #_EVENTEXCERPT placeholder but with #_EVENTURL as href.
Do I have yo activate the placeholders to use them ? I didn’t see anything about activating it in the help section of the module.
Thank you !
-
This reply was modified 3 years, 10 months ago by
conradude.
Hi @angelo_nwl any idea how I could fix this ? Thank you
just to confirm, can I know where are you adding this and do you have a direct link to your site with this issue for us to see?
Hello @angelo_nwl yes sure !
You can see here https://www.charlesfreger.com/exhibitions/
i tried to add the placeholder.
Thank you
#_EVENTEXCERPT{20,…} Read More
did you add this in your formatting option under Events > Settings > Formatting > Default event list format?Thanks for your answer @angelo_nwl . I’m not sure what you’re asking.
I went to Events > Settings > Formatting, opened the Events tab and found the textarea called “Default event list format”.
In it, I have this :
<tr> <td> #_EVENTDATES<br/> #_EVENTTIMES </td> <td>
I tried modifying like this but nothing changed
<tr> <td> #_EVENTDATES<br/> #_EVENTTIMES #_EVENTEXCERPT{20,…} Read More </td> <td> #_EVENTLINK {has_location}<br/><i>#_LOCATIONNAME, #_LOCATIONTOWN #_LOCATIONSTATE</i>{/has_location} </td> </tr>
What should I do ? Thank you
you can try something like
#_EVENTEXCERPT{20,…} <a href="#_EVENTURL">Read More</a>
Hi @angelo_nwl and thank you. I trie it but nothing happens. I still see “#_EVENTEXCERPT{20,…} Read More” in the text without nothing happening as you can see in https://www.charlesfreger.com/exhibitions/
can I know where are you adding
#_EVENTEXCERPT{20,…} <a href="#_EVENTURL">Read More</a>
? Looks like it’s working perfectly fine on our test servers adding this under events > settings > formatting > events > default event list formatHellodracon,
I had an issue that seemed very much like this. I finally figured out that my Theme (Kleo) was over-riding the EM setting. If you have a non-WP theme, you may want to search out something from your Themes support forum. Below is what I am successfully using:
In my Child Theme > functions.php, I added:
/* CODE TO CONTROL KLEO THEME OVERALL EXCERPT CHARACTER LIMIT * Change number on line 4 below * Copied from: https://seventhqueen.com/support/kleo/article/limit-excerpt */ if ( ! function_exists( 'kleo_excerpt' ) ) { function kleo_excerpt( $limit = 50, $words = false ) { /*Force excerpt length*/ $limit = 1000; $from_content = false; $excerpt_initial = get_the_excerpt(); if ( $excerpt_initial == '' ) { $excerpt_initial = get_the_content(); $from_content = true; } $excerpt_initial = preg_replace( '<code>\[[^\]]*\]</code>', '', $excerpt_initial ); $excerpt_initial = strip_tags( $excerpt_initial ); /* If we got it from get_the_content -> apply length restriction */ if ( $from_content ) { $excerpt_length = apply_filters( 'excerpt_length', $limit ); $excerpt_initial = wp_trim_words( $excerpt_initial, $excerpt_length, '' ); } if ( $words ) { $excerpt = explode( ' ', $excerpt_initial, $limit ); if ( count( $excerpt ) >= $limit ) { array_pop( $excerpt ); $excerpt = implode( " ", $excerpt ) . '...'; } else { $excerpt = implode( " ", $excerpt ) . ''; } } else { $excerpt = substr( $excerpt_initial, 0, $limit ) . ( strlen( $excerpt_initial ) > $limit ? '...' : '' ); } return '<p>' . $excerpt . '</p>'; } } function kleo_new_excerpt_length( $length ) { return 500; } add_filter( 'excerpt_length', 'kleo_new_excerpt_length' );
@angelo_nwl I’ve added this line in two places : the event description itself and the events > settings > formatting > events > default event list format
As you can see on https://www.charlesfreger.com/exhibitions/ the code appear but doesn’t truncate the event desc. I tried to add the wordpress “read more” in it, but nothing changes.
@aprilschmitt27 Thanks a lot, I can see that I already have an excerpt function in my theme. I tried anyway with your but nothing changed. Thanks anyway, that’s nice of you.
-
This reply was modified 3 years, 9 months ago by
conradude.
-
This reply was modified 3 years, 10 months ago by
- The topic ‘“Read More” doesn’t work’ is closed to new replies.