Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #398670

    So I was trying to figure out how to do a couple of things for the category archive blog pages. First I wanted the small thumbnail. Figured that out by this page: http://kriesi.at/documentation/enfold/change-archive-categorytag-blog-style/

    But I would like to make the thumbnail a manually 80×80 and cannot figure that out.

    Then I wanted it to be an excerpt with the read more link and followed this page:
    https://kriesi.at/support/topic/category-archive-pages-to-show-excerpt-only/

    The problem, is this changed the actual blog post to excerpt only and now you cannot read the blog on the actual blog page.

    Please help. Thank you!

    #398749

    Hi vadesign!

    Thank you for using Enfold.

    Try to install this plugin: https://wordpress.org/plugins/simple-image-sizes/

    Go to Settings > Media then adjust the “square” thumbnail size. This will help with the excerpt: https://kriesi.at/support/topic/blog-category-frontpage-view/#post-386022

    Best regards,
    Ismael

    #399224

    The excerpt code worked perfectly. Thank you!

    For the thumbnails, that still didn’t work as intended. I may not have explained myself properly. Let me try again.

    If I was to create a blog page with only certain categories on it and I use the ‘Blog Posts’ content element, there is an option in there that says:
    Preview Image Size
    Set the image size of the preview images

    What I want to do on archive posts, without having to create a page for each category, is to have the Preview Image Size be the thumbnail size of 80×80. However, what is happening is the archive category page images are setting to this feature, “‘Set the preview image size automatically based on column or layout width'”.

    How to I programmically have that default setting changed to:
    “Choose the preview image size manually (select thumbnail size)” = Thumbnail (80×80)

    Does this explain what I am looking for better?

    Also, thank you kindly for replying so fast. I really appreciate your time and effort to help me resolve this. :)

    #399460

    Hey!

    The option will not work archive pages. Please give us a link to the current archive or category page. Maybe if we can see it, we’ll understand the problem better. Try to add this to the functions.php:

    function avia_image_slideshow_filter($current_post)
    	{
    
    		$prepend_image = get_the_post_thumbnail(get_the_ID(), 'square');
    		$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
    		{
    			
    			$large_image = wp_get_attachment_image_src( get_post_thumbnail_id(get_the_ID()), 'square' );
    			$prepend_image = '<div class="avia-post-format-image"><a href="'.$large_image[0].'">'.$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']  = "";
    			}
    
    		
    		if(is_single(get_the_ID()) && get_post_meta( $current_post['the_id'], '_avia_hide_featured_image', true ) ) $current_post['before_content'] = "";
    		
    		return avia_default_title_filter($current_post);
    	}
    

    Edit loop-index.php, look for this code:

    $size = strpos($blog_style, 'big') ? (strpos($current_post['post_layout'], 'sidebar') !== false) ? 'entry_with_sidebar' : 'entry_without_sidebar' : 'square';
    

    Replace it with:

    $size = strpos($blog_style, 'square') ? (strpos($current_post['post_layout'], 'sidebar') !== false) ? 'entry_with_sidebar' : 'entry_without_sidebar' : 'square';
    

    Cheers!
    Ismael

    #399947

    Unfortunately, I am on a development server right now. Once I go live in about two weeks or so, I will send a link. Unfortunately, the code above didn’t work for what I was looking for. But thank you so kindly for trying. I appreciate it. I will respond again in two weeks with a link to the archive page so you can see what I mean. :)

    #400389

    Hi!

    Great, please keep us posted on your issue.

    Cheers!
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.