How to change images url in function.php?

Most of the cache plugins have built-in CDN settings. If you are looking for a simple solution for the image URL only, you can use CDN Enabler. It is from KeyCDN but you don’t have to use KeyCDN for it to work. Simply Write your alternative domain to only use image extensions if you don’t … Read more

if get_post_meta is empty echo a placeholder or shortcode

You can use empty, to check your variable. Something like this $prod_id = get_the_ID(); if (!empty(get_post_meta($prod_id,’_product_tech’,true))) { echo'<a class=”shutter” title=”technische gegevens” href=”‘.get_post_meta($prod_id,’_product_tech’,true).'”><img width=”750″ height=”100%” src=”‘.get_post_meta($prod_id,’_product_tech’,true).'”></a>’; } else { //Is empty }

add another variable to php function

Well I figured out I could duplicate the function and rename the title so it runs twice. But for future, is there a more elegant way of doing this in one instance? thanks! // orderby slideshows function modify_slider_order($query, $slider_id) { // only alter the order for slider with “x” ID // https://tinyurl.com/zb6hzpc if($slider_id == 17 … Read more