Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #252705

    Hi, I would like to make the feature images in the blog page clickable so that when a visitor clicks on the image it will take him to the post.

    As it is now, only the title is a link to the post.

    Thanks.

    #253124

    Hi bakbek!

    Thank you for using the theme!

    The featured images on the blog overview page should be clickable and link to the actual posts by default. What type of blog style do you have? If you don’t mind, we would like to see the actual blog page.

    Cheers!
    Ismael

    #253279
    This reply has been marked as private.
    #254051

    Hi!

    Have you made any changes on theme files?
    Please update Enfold to the latest version 2.6.4 – http://kriesi.at/documentation/enfold/updating-your-theme-files/

    Cheers!
    Yigit

    #255465

    Updated it to version 2.7 but the featured images are still not clickable.

    #256093

    Hey!

    Anchor tag is not being output. Please try deactivating all active plugins and re-upload featured images and check if that helps. Have you made any changes on theme files?

    Regards,
    Yigit

    #256750

    Don’t think I changed any theme files and if I did, I updated the theme so if I did make such changes they would be overwritten with the new file, right?

    #256752

    I deactivated all plugins and uploaded the featured image again but still the featured image is not clickable…

    #256948

    Hey!

    Thank you for using the theme!

    Please edit includes > helper-post-formats.php, find this code on line 164:

    if(!function_exists('avia_image_slideshow_filter'))
    {
    	function avia_image_slideshow_filter($current_post)
    	{
    
    		$prepend_image = get_the_post_thumbnail(get_the_ID(), 'large');
    		$image = "";
    
    		if(!$prepend_image)
    		{
    			$image		= avia_regex($current_post['content'],'image');
    			if(is_array($image))
    			{
    				$image = $image[0];
    				$prepend_image = '<div class="avia-post-format-image"><img src="'.$image.'" alt="" title ="" /></div>';
    			}
    			else
    			{
    				$image		= avia_regex($current_post['content'],'<img />',"");
    				if(is_array($image))
    				{
    					$prepend_image = '<div class="avia-post-format-image">'.$image[0]."</div>";
    				}
    			}
    		}
    		else
    		{
    			$prepend_image = '<div class="avia-post-format-image">'.$prepend_image."</div>";
    		}
    
    			if(!empty($prepend_image) && is_string($prepend_image))
    			{
    				if($image) $current_post['content'] = str_replace($image, "", $current_post['content']);
    				$current_post['before_content'] = $prepend_image;
    				$current_post['slider']  = "";
    			}
    
    		return avia_default_title_filter($current_post);
    	}
    }

    Replace it with this:

    if(!function_exists('avia_image_slideshow_filter'))
    {
    	function avia_image_slideshow_filter($current_post)
    	{
    
    		$prepend_image = get_the_post_thumbnail(get_the_ID(), 'large');
    		$imagelink = get_permalink();
    		$image = "";
    
    		if(!$prepend_image)
    		{
    			$image		= avia_regex($current_post['content'],'image');
    			if(is_array($image))
    			{
    				$image = $image[0];
    				$prepend_image = '<div class="avia-post-format-image"><a href="'.$imagelink.'"><img src="'.$image.'" alt="" title ="" /></a></div>';
    			}
    			else
    			{
    				$image		= avia_regex($current_post['content'],'<img />',"");
    				if(is_array($image))
    				{
    					$prepend_image = '<div class="avia-post-format-image"><a href="'.$imagelink.'">'.$image[0]."</a></div>";
    				}
    			}
    		}
    		else
    		{
    			$prepend_image = '<div class="avia-post-format-image"><a href="'.$imagelink.'">'.$prepend_image."</a></div>";
    		}
    
    			if(!empty($prepend_image) && is_string($prepend_image))
    			{
    				if($image) $current_post['content'] = str_replace($image, "", $current_post['content']);
    				$current_post['before_content'] = $prepend_image;
    				$current_post['slider']  = "";
    			}
    
    		return avia_default_title_filter($current_post);
    	}
    }
    

    Cheers!
    Ismael

    #256995

    Great. That worked.

    Thanks.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘How to make the featured image in the blog view clickable’ is closed to new replies.