WordPress Theme: replace logo image with title site if file doesn´t exist on server

Solved with: <?php if (file_exists(get_template_directory().’/images/logos/’.$server_name = preg_replace(‘/[wW]{3,3}\.|\.(es|com|net)/’, ”,$_SERVER[‘HTTP_HOST’]).’.png’)) { ?> <a href=”https://wordpress.stackexchange.com/questions/149864/<?php echo home_url(“https://wordpress.stackexchange.com/” ); ?>”><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/logos/<?php echo $server_name = preg_replace(‘/[wW]{3,3}\.|\.(es|com|net)/’, ”,$_SERVER[‘HTTP_HOST’]).’.png’ ?>” border=”0″ width=”230px” height=”60px” alt=”<?php bloginfo( ‘name’ ); ?>”/></a> <?php }else{ ?> <h3><?php bloginfo( ‘name’ ); ?></h3> <?php } ?> Thanks at all!

Why are some SVG-images not visible in my footer?

Not sure if you’ve already done this, so forgive me if I’m telling you something you already know. But WordPress doesn’t support SVG Uploads out of the box, so to speak. This is due to security issues that can be created when a user uploads SVGs with malicious code. Mainly, a problem if you let … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)