Events Made Easy › Forums › How do I … › Escape wpautop on more-tag excerpts?
- This topic has 4 replies, 2 voices, and was last updated 13 years, 7 months ago by Anonymous.
-
AuthorPosts
-
Mon 16 May 2011 at 00:38 #42807AnonymousInactive
I do everything I can to avoid asking for help, but Whoo! – I’ve just spent the last several hours dancing around something that I suspect is going to turn out to be embarrassingly simple. I’m trying to escape wpautop on excerpts defined by the more tag.
I thought a conditional remove-filter in the low 200 lines of events-manager.php would do it, then tried focusing on the higher 1200s in the apply-filters there. But I haven’t been able to come up with something that loses wpautop in the pre-more-tag excerpts, which display on the index and sort pages, while preserving that auto-formatting on the full text for the single-events pages. It’s all or nothing in both.
Things were displaying well (somehow) until I upgraded to the current release this morning (it’s been a few months since I had). I’d like to keep the recent improvements rather than roll back. Franky, you rock.
Mon 16 May 2011 at 18:01 #47732FrankyKeymasterHmmm … I didn’t change anything in perticular concerning this, but any change might provoke an undesired effect of course. Maybe try this: at around line 1262 in events-manager.php, below the condition
if ($field == "event_excerpt") {
add:
remove_filter( 'the_content', 'wpautop' );
But maybe it’s better to use the available filters for this? For the filters you can use:
Mon 16 May 2011 at 20:58 #47733AnonymousInactiveAnd you just pulled that out of your big ol’ brain. Man. I was in the right area and pursuing the right idea, but couldn’t pull it off.
One minor note in case anyone follows on this later: I did need to change the_content to eme_notes… but case closed!
A nap seems in order.
Mon 16 May 2011 at 21:27 #47734FrankyKeymasterNow that it works: can you explain (when you wake up) why this is advantageous to you?
Mon 16 May 2011 at 22:57 #47735AnonymousInactiveThe p breaks were putting gaps in the layout of the events lists. It was just unsightly. I still don’t know why they weren’t there before, then suddenly were after the upgrade. Life is full of mysteries.
We’re using EME (completely disregarding some of its key functionality but liking the rest of it) as a public service public-events calendar for anything going on in the broadcast footprint of our little volunteer-run, member-owned community radio station. I’m one of the member-volunteers – a small, proud ragtag gang of unpaid but hearty non-professionals.
The calendar is at http://www.blacksheepradio.org/blacksheepblogshop/events/ … There’s a few tweaks still needed (and a mobile layout), but we’re up and running strong. I’m proud of what’s been accomplished with this despite so being so rarely certain what I’m doing. I had HTML knowledge left over from ye olde days, but that’s really of no use with PHP. I’ve learned a lot along the way, but I’m still such a hack. Despite that I did a fair bit of code manipulation, and managed to get by with only asking two questions here. I’m awfully pleased with myself. The most important thing left to do is scraping together a donation to send your way.
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.