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!

What is the point of using the front-page.php template? [closed]

You would use the front-page.php template because it allows to have custom content and layout for your website’s static front page. You can edit content on your static front page from inside the WordPress admin if the front-page.php template contains the the_content() template tag or similar. It really depends on what your content and presentation … Read more

My theme is not translated

Make sure you put your function inside after_setup_theme action hook add_action( ‘after_setup_theme’, ‘load_translation’ ); function load_translation() { if( is_dir( get_stylesheet_directory() . ‘/languages’ ) ) { load_theme_textdomain(‘adifier’, get_stylesheet_directory() . ‘/languages’); } else { load_theme_textdomain(‘adifier’, get_template_directory() . ‘/languages’); } Also, you have to make sure your theme domain is matched with the translated file. For an easier … Read more

Very slow page loads

The problem as it turned out was the fusion-builder-mobile-layout-creator plugin. By going into settings for the theme and unchecking mobile layout (which checked itself again immediately), it cleared the buildup of entries. It may recur but that’s the fix. We might have to uninstall the plugin entirely longer term.