[Plugin: Events Manager] limiting text for event manager without using
-
hi folks, i know its not recommended to edit plugins, however i was having trouble finding a way to limit the number of words with my event manager descriptions. i didnt want to use the <!–more–> option either, because i didnt want to confuse my client with using the <!–more–> option. if you are looking for a way to limit the text and #_EVENTEXCERPT OR #_EXCERPT is not what you are looking for, you can try adding this code to the em-events.php file at approx line 1233
case '#_MYEXCERPT': $replace = $this->post_content; if($result == "#_MYEXCERPT"){ $length = 25; $replace = implode(' ',array_slice(explode(' ', $replace),0,$length)); $replace = $replace.' ...'; } break;
now all you need to do is add #_MYEXCERPT and it will limit the
amount of words being outputted in the description/notes. also change $length = 25 to the number of words you wish to output. i used 25 in this example. i really do hope this was helpful for you even though this may not be the recommended way of doing this because if there is an update, this change will be lost and have to be reapplied after each update. also if you have a better solution i would really love to hear it.
- The topic ‘[Plugin: Events Manager] limiting text for event manager without using’ is closed to new replies.