Copying and pasting emoji in a wordpress post

Emoji are just letters. They’re defined by the user’s operating system. The same way the alphabet is. You don’t need to do anything special. If you did, then that website would be pointless. The only thing you need to consider is older operating systems that don’t support Emoji, but WordPress itself loads a script that … Read more

Trying to create a mouseover effect in html using Gutenberg editor

You were very close. You just had a single-quote swapped with a double-quote after the onmouseover. <figure class=”wp-block-image”> <img src=”https://website.com/wp-content/uploads/2019/08/image1.png” onmouseover=”this.src=”https://website.com//wp-content/uploads/2019/08/image2.png”;” onmouseout=”this.src=”https://website.com/wp-content/uploads/2019/08/image1.png”;” alt=”alttext” class=”wp-image-1111″/> </figure> I usually place semi-colons after the single-quotes to make it easier to tell when your quotes are balanced, whether Javascript requires it, or not.

Is there a way to dynamically get to your uploads folder?

Take a look at wp_upload_dir here https://developer.wordpress.org/reference/functions/wp_upload_dir/ $upload_dir = wp_upload_dir(); var_dump( $upload_dir ); /* $upload_dir will comprise of the following return values: ‘path’ – (string) Base directory and subdirectory or full path to upload directory. ‘url’ – (string) Base URL and subdirectory or absolute URL to upload directory. ‘subdir’ – (string) Subdirectory if uploads use … Read more

How to get specific image in media library with php

There’s a few functions: wp_get_attachment_image_url( $attachment_id, $size ) – Gets the URL to specified size of the image. wp_get_attachment_image_src( $attachment_id, $size ) – Gets an array of the image URL, width, and height for the specified size of the image. wp_get_attachment_image( $attachment_id, $size ) – Gets the full HTML for an image, including width, height, … Read more