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

    Is there an wasy way to change the default image that is shown in “related posts” below a blog post.

    For example, a thumbnail of a blog posts image or a static image that I define. If this can be done in the custom css box would be great.

    #138643

    Hi,

    open up wp-contentthemessentenceincludesrelated-posts.php and replace

    //check if a preview image is set
    if( $slides != "" && !empty( $slides[0]['slideshow_image']) )
    {
    //check for image or video
    if(is_numeric($slides[0]['slideshow_image']))
    {
    $invisible_image = $image = avia_image_by_id($slides[0]['slideshow_image'], 'portfolio_fixed', 'image');
    }
    else
    {
    $invisible_image = $image = "<span class='related_posts_default_image related_posts_video'></span>";
    }
    }

    with

    $invisible_image = $image = '<img src="http://my-image.jpg" alt="" title="" />';

    and replace http://my-image.jpg with the url of your custom image and insert a alt/title text.

    #138644

    Awesome, your a star!

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Change picture in "related posts"’ is closed to new replies.