How to stop images from being wrapped in tags?

this is a function, that unwraps images from p tags inside the_content /** * WP: Unwrap images from <p> tag * @param $content * @return mixed */ function so226099_filter_p_tags_on_images( $content ) { $content = preg_replace(‘/<p>\\s*?(<a .*?><img.*?><\\/a>|<img.*?>)?\\s*<\\/p>/s’, ‘\1’, $content); return $content; } add_filter(‘the_content’, ‘so226099_filter_p_tags_on_images’);

Hide specific content from excerpts

Ok, I’ve found the answer myself through a lot of Googling 🙂 If anyone else is struggling, this pastebin provides a solid solution for stripping out headings from the excerpts. The solution was provided by Michael at the WordPress Support Forum.

Can I use a plugin for a singular page on my website?

What you want is definitely possible. Although technically it’ll not be just a single event page, rather an event directory. Under that directory there will be single event links created by the event plugin you’ve mentioned. However, those single event links will not have any physical static files, rather those will be managed by WordPress … Read more

Collapse content [closed]

Solved this. I created a plugin which loads this js: function showContent(element){ $(‘.huisjes’).slideUp(); if ( $(element).is( ‘:hidden’ ) ) { $(element).slideDown(‘slow’); } else { $( element).slideUp(); } } Then I created two shortcodes: function createDiv($atts, $content = null) { extract(shortcode_atts(array( ‘id’ => “”, ), $atts)); return ‘<div id=”‘. $id . ‘” class=”huisjes” style=”display:none;”/>’ . $content … Read more