Events Made Easy Forums How do I … Escape wpautop on more-tag excerpts?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #42807
    Anonymous
    Inactive

    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.

    #47732
    Franky
    Keymaster

    Hmmm … 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:

    http://www.e-dynamics.be/wordpress/?cat=41

    #47733
    Anonymous
    Inactive

    And 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.

    #47734
    Franky
    Keymaster

    Now that it works: can you explain (when you wake up) why this is advantageous to you?

    #47735
    Anonymous
    Inactive

    The 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.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top