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

Automatically wrap multiple images in div

This is a function I use to add a wrapper to each image. I know it’s not 100% what you want, but I thought this might give you a handle to work from. function add_image_wrapper( $content ) { $content = preg_replace_callback( ‘/<img[^>]+>/im’, function ( $matches ) { $image = $matches[0]; $classes = array(); preg_match( ‘/class=”align([^”]+)”/im’, … Read more

Two different inner shortcode under shortcodes or multiple nesting of inner shortcodes

Yes, you can keep nesting shortcodes. Just keep using the do_shortcode() until the deepest level is reached. https://codex.wordpress.org/Shortcode_API#Nested_Shortcodes So you can do this, [container] [other_column class=”extra-class”] [content] col 1 [/content] [another] col 1-2 [/another] [/other_column] [column] [another] col 2 [/another] [/column] [/container] To achieve output like this, <div class=”container”> <div class=”other-column extra-class”> <div class=”content”> col … Read more