Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #276978

    Dear all,

    is it possible to display a No-Image-Icon for Latest Portfolio Sidebar Widget?

    I used this already in my child-them functions.php:

    /**
    * change-the-related-posts-no-image-icon
    */	
    add_filter('avf_default_icons','avia_replace_standard_icon', 10, 1);
    
    function avia_replace_standard_icon($icons)
    {
    $icons['standard']	 = array( 'font' =>'entypo-fontello', 'icon' => 'ue879');
    return $icons;
    }

    Kind regards!

    • This topic was modified 10 years, 5 months ago by parperei.
    #277441

    Hey parperei!

    You can hide the placeholder with css code – insert it into the child theme style.css or quick css field:

    
    .widget .news-thumb.no-news-thumb {
    display: none;
    }
    

    Update: Obviously you can also use the same code to apply a background image to the placeholder span like:

    
    .widget .news-thumb.no-news-thumb {
    background: url(https://kriesi.at/wp-content/themes/kriesi/images/logo.png);
    }
    

    and instead of http://kriesi.at/wp-content/themes/kriesi/images/logo.png just insert an url to your image.

    Best regards,
    Peter

    #277443

    Hey Dude!
    alright, thank you for this snip!

    Cheers!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How to add a No-Image-Icon to Latest Portfolio Sidebar Widget’ is closed to new replies.