Creating a table from shortcode avoiding wpautop for each row

The extra space comes from wpautop(), which inserts <br /> on every line break. You have to strip these out before calling do_shortcode(). Additionally, use add_filter( ‘the_content’, ‘shortcode_unautop’ );. From my experience, you need both. Probably a bug. See my shortcode plugin for an example. It has shortcodes for tables too. Aside: Shortcodes should never … Read more

When is wp_trim_excerpt() called?

If you’ve already looked in XRef, you’ve seen this comment at the top of the doc block: /** * Generates an excerpt from the content, if needed. So it’s not used in core, but is available for you to use if you need it. Update Let me explain a little of what’s going on: excerpt_length … Read more

remove from text-widget

OK, attempting to remove the with jQuery is counter intuitive. Modifying it via output buffering is inefficient. And we shouldn’t edit the actual widget code itself, since this will revert back next time we update WordPress. I would suggest either creating your own text widget, or simply extend and modify the existing WordPress widget as … Read more

how to make wordpress not to look for themes

I can’t see a reasons why you not just put your code from the functions.php into Plugins or Must Use Plugins, it isn’t that hard to do and is, in my mind preferable, to connecting this task somehow to the wp-config.php. Besides that, if you don’t absolutely have to remove the backend/admin themes functionality itself, … Read more