Open all external links in new window – need help with the code

Way to complicated to do this with php in WordPress, I’d advice on doing this on the frontend with a bit of jquery magic. I wrote a tiny jQuery plugin that opens all external links (all links with another domain/host name than the current site) in a new window. Check out the plugin: https://www.npmjs.com/package/jquery.jold.external-hrefs To … Read more

Add media dynamically on gutenberg block

You can set the multiple and gallery props to {true} which enables to select multiple images and make a gallery. More information in the GitHub readme: https://github.com/WordPress/gutenberg/tree/master/packages/block-editor/src/components/media-upload

How to change response of admin-ajax request?

WP_Fullcalendar::ajax overrided by WP_EventsManager plugin in file em-wpfc.php, if wpfc and wpem used in combination. Here is my final code in functions.php /** * Translate WP_Fullcalendar titles for events * @param $items * @return array */ function wp_fc_translate($items) { foreach ($items as &$item) { $item[‘title’] = apply_filters(‘the_title’, $item[‘title’]); } return $items; } add_action(‘wpfc_events’, ‘wp_fc_translate’);

WordPress multisite with subdirectories always redirects to mainsite

This is the .htaccess I used for multisite: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ – [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L]