OceanWP and SVG images

Ever tried to enable the upload of SVG images in WordPress, and kept getting the error:
“Sorry, you are not allowed to upload this file type.” ?

So, you tried the plugins Safe-SVG, disabled Wordfence, disabled Solid Security, added a snippet with WPCode, changed your wp-config.php file, and maybe some other options you found on the Interweb?
Well, if you are using the OceanWP theme like I do, then nothing will work, except when you go to your OceanWP panel, select the ‘Integration’ tab on the left, slap your forehead with a flat stretched-out hand, and finally slide the switch on that page, all just to enable the SVG files support.

Next, of course, remove all those plugins, code snippets and other things you have added to your WordPress installation and continue with your life.

Have a nice day!

How to change background-image opacity in CSS without affecting the text

Thank you so much for your quick solution… coder-coder.com

copy-paste

When building a website, you may often want to put a background image on an HTML <div> that also contains text or other content.

And to make the text stand out, you want to change the opacity of that background image in CSS so that it’s semi-transparent. But you’ve tried, and you can’t change the opacity of the background image without also affecting the text or other child elements!

What can you do? Not to worry– this article will give you some practical solutions to controlling your background image opacity.

So, first, the bad news…

Continue reading How to change background-image opacity in CSS without affecting the text

Access Windows Share without a password

Older laptop, simple user to logon without any password; Simply click to login and use the computer.

Now, if you want to access a share on that computer, using that same user, and gave the correct rights to be able to access it, it will not work… This was my solution from 2011, which still worked today!
Start gpedit.msc and find and disable this setting:

Happy sharing!
Have a nice day…

Webhosters pricing development

It was not my imagination … it was getting ridiculous!
So glad I moved all my hosting to mijn.host and my customers to their own hosting accounts. Just read this article today:

SOURCE: EMERCE

Webhosting behoorlijk duur geworden

Webhosting pakketten zijn sinds mei 2020 gemiddeld 39,83 procent duurder geworden. Dat blijkt uit onderzoek van Start24.

Prijzen van hostingproviders die tot een conglomeraat behoren zijn met gemiddeld 71,15 procent omhoog gegaan. Bij onafhankelijke providers zijn de prijzen met 22,29 procent gestegen. Bij drie van de 39 onderzochte providers bedroegen de prijsstijgingen zelfs meer dan 100 procent. Dit was het geval bij Versio (221,98%), Neostrada (189.38%) en Argeweb (162,57%).

~~knip~~

Prijsvoering zegt aardig wat over de ethiek van een onderneming, stelt Boer. Bedrijven die hun prijzen met een factor 3 verhogen zonder een aanmerkelijk betere dienstverlening aan te bieden, hebben over het algemeen minimale interesse in jouw belang als klant. Met dit soort bedrijven wil je (waarschijnlijk) niet in zee gaan. Hosting providers wiens prijzen echter binnen een redelijke marge zijn gestegen, zullen in de regel betrouwbaarder zijn.

Remember a setting in a Cookie

When you have jquery:

$(document).ready(function(){

function setmyCookie(cname, cvalue, exdays) {
  const d = new Date();
  d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
  let expires = "expires="+d.toUTCString();
  document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function getmyCookie(cname) {
  let name = cname + "=";
  let ca = document.cookie.split(";");
  for(let i = 0; i < ca.length; i++) {
    let c = ca[i];
    while (c.charAt(0) == " ") {
      c = c.substring(1);
    }
    if (c.indexOf(name) == 0) {
      return c.substring(name.length, c.length);
    }
  }
  return "";
}
$('a.nturl.single-language.es').click(function () { 
	setmyCookie("mylng", "es", 365);
});
$('a.nturl.single-language.en').click(function () { 
	setmyCookie("mylng", "en", 365);
});
$('a.nturl.single-language.nl').click(function () { 
	setmyCookie("mylng", "nl", 365);
});

mylng = getmyCookie("mylng");
if (mylng == "") {
	mylng = "es";
}
if (mylng == "es") {
	window.setTimeout(function() {
		$('a.nturl.single-language.es').click();
	}, 0);
}
if (mylng == "nl") {
	window.setTimeout(function() {
		$('a.nturl.single-language.nl').click();
	}, 0);
}

});

And if you’re trying to figure out the functionality;
The links are from a plugin and a click also activates a language. This script just adds another click-hook to save the language in a cookie, and also activate the chosen language on every page load.
That’s all!

OceanWP Header background image black

Did you try to control this with a function?
And did it stop working recently and is now only showing a blacked out area?
Did you use the hook ocean_page_header_background_image and the function as posted in the OceanWP docs?

Well… Just change your script to give back the image ID instead of the URL:

if ( is_singular( 'post' ) ) {
  // $bg_img = get_stylesheet_directory_uri() . '/img/my-image.jpg';
  $bg_img = 1394;
}

You’re welcome.
Have a nice day!

PS.
Also posted to support hoping maybe OceanWP can fix this, so we can use the image filename/URL again?