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!
Related Posts:
- Getting Images from theme’s directory in pages
- Creating a rotating header /image slider using theme customization
- Screenshot.png not showing up
- Any specific reason why images do not show on site?
- How to add an image to the post preview in the free theme “food recipes”
- Divi Theme – images not showing on front page [closed]
- Problem Cropping Images From WP Customizer
- How can I display an image description, from an image gallery?
- I have no images in an activated wp theme
- How to upload and style svg logo?
- How would you add sequentially numbered labels to images in posts?
- How to get rid of undefined variable in previous post image
- How can I change the header on the pages?
- WordPress does not load most theme images
- How to change a theme’s footer image
- Site only working in browser where I created it
- Image sizes reset when changing theme
- WordPress and Advanced Custom Fields and Flickity
- Adding custom html/css/images to Theme
- How to add multiple images in a page
- Theme files and imagesnot loading on a mobile device
- How do I change a Themes Header Image?
- What type to upload image within theme options?
- How to get customable image header?
- I am having trouble displaying an image at the top of a widget area [closed]
- WordPress Site Broken and it gives Headers Already sent error
- Get Image Description
- Automatically replace original uploaded image with large image size
- How to scale up featured post thumbnail?
- Custom image size / thumbnail – Crop to aspect ratio even when source image is smaller than set dimensions
- wp_get_attachment_image_src and server path
- Change WordPress image URLs via filter
- How to resize images in wordpress without adding any compression or changing the color profile of the images, possible?
- hook into completed image upload filter
- Get img alt tag from a Image that has been uploaded through the Customizer
- Get Attachment ID from URL [duplicate]
- How to set twenty fourteen header image at 100% width?
- Can’t Display Featured Image in RSS Feed
- Filter to modify post_title after image upload?
- Automatically Add Caption in image
- Import Images from one self-hosted WordPress install to another
- How to Optimize images after uploading all images to WordPress Site?
- How to get relative URL of medium sized featured image?
- How do i reference the theme path in pages for images?
- Using srcsets to load different images based on browser widths
- Multiple entries for one object with different cover images
- How to exclude an image size from the WordPress srcset
- Gutenberg editor get post featured image by id
- Get full URL of images in media library including http://
- Host images only on CDN
- How to intigrate multiple image uploader in a custom post type
- Stripping the_content() from images then displaying them seperately
- Background image resets after time (XAMPP)
- renaming an image automatically everywhere else (posts and pages)
- Custom thumbnail size of image when uploaded
- Change wp-content/uploads to uploads/%postname%/%image%
- Insert File URL Links to Existing Images that Were Not Originally Linked to Themselves
- Difficulties setting a maximum image width
- Does wp_get_attachment_image_src also work with non-image files?
- Filter for post_thumbnail: link to small src and add data-attribute [duplicate]
- Why does WP allow to view and media item as a page
- Display attached images as background-image css
- Remove Additional image sizes created by theme
- wordpress 4.22 does not generate thumbnail images
- How to implement CSS-defined images from bootstrap site in wordpress theme
- Show Image Size as Dragging it Larger or Smaller
- Logo on the tab
- How can I get url from image tag in feed with fetch_feed?
- How to get image name, mime type, width, height, file size from post custom field?
- How to automatically populate a gallery with images attached to posts of one category?
- How to edit caption for images and exclude it from excerption query?
- Can’t seem to see images on my machine but can on the server
- Regenerate BIG threshold scaled images
- How to change background image
- WordPress Link To Image Missing Dropdown
- get_image_tag & wp_get_attachment_image_attributes behaving strangely
- Issues Adding a jQuery Image Slider
- set_post_thumbnail_size only working for width
- Getting the closest named image size from an array of dimensions
- Newly uploaded images are not updating in featured image
- How to attach post ID to image links in WordPress tinymce editor
- Duplicate images in wordpress
- My feature images are showing up twice on the preview page
- How do I embed youtube video via url in frontend posting
- Some images don’t get linked when setting link-to to media-image
- Search and replace image urls in posts
- Create a Link to Larger Image from within list of smaller images
- Thickbox not displaying just the image, instead showing full page in lightbox
- trouble with featured image
- My image rotate 90 degree
- Have a rotating image covering body only on front page?
- Img src path from wp-admin
- I moved WordPress to root now posts go to 404
- Can’t manage to display an uploaded picture (uploaded from a custom button) in the front end
- Script not working in WordPress [duplicate]
- Load Webp Version of Image if it exists
- Convert User’s Avatar/Gravatar to a jpg or png on the Fly
- Placing a background image with text over it
- How to return responsive images from a sanitize_callback?
- How to disable Right Click on a image? [closed]