Viewing 30 results - 2,731 through 2,760 (of 10,096 total)
  • Author
    Search Results
  • #1012095

    Hi Ismael ,

    I have read through those and it looks like this basically adds related posts at the bottom of the post. I have a couple of questions:
    1) re: inserting the code to prevent the current post from showing in the post slider into functions.php, does that go into the child theme functions.php, or the parent? Assuming child.

    2) I have close to 150 articles that I’ll need to manually go select and setup this posts slider–is it possible for this to be done automatically based on the category of the post being shown? I only assign each post 1 category.

    3) Rather than using posts slider, is there a way to have just a list of all posts in a category in the sidebar? Doing this without the thumbnail of the image would be fine. Ideally, this would automatically show the category posts of the post being shown (so, if somebody is reading a post on Communication (category = couples), then the sidebar would show all Couples posts.

    EDIT: 4) Sometimes, the font of the post slider looks messy. I messed up my laptop when cleaning the hd and cannot do screenshots, but the text looks pixilated sometimes

    EDIT: 5) The arrows on the slider post cover up part of the panel. can those arrows be either smaller, or placed not on top of the panel?

    Thanks!
    Jon

    • This reply was modified 7 years, 6 months ago by gatehealing.
    #1011991

    In reply to: Symmetrical portfolio

    I am going to do this now, please confirm this are the settings.

    Cropping set to yes, just in “portfolio_small size”. Everything else NO.
    Thumbnail regeneration just check: “portfolio_small”. Everything else unchecked.
    Post type: Posts and portfolio items ONLY.

    Correct?

    Thank you Ismael.

    #1011989

    Finally got around to trying this — the thumbnails do seem to have changed to 160×169 — a thumbnail that size even shows in the Edit Location dialog box (see screen grab: https://screencast.com/t/g89g0UQ8FmnY ), but the largest option in the dropdown is still 80×80, and it’s still showing as 40×40 on the front end.

    Any other ideas?

    Thanks!

    #1011674
    This reply has been marked as private.
    #1011662

    Hey Daan88,

    Please use this code for the gallery.php:

    
    <?php
    /**
     * Gallery
     * 
     * Shortcode that allows to create a gallery based on images selected from the media library
     */
    if ( ! defined( 'ABSPATH' ) ) {  exit;  }    // Exit if accessed directly
    
    if ( !class_exists( 'avia_sc_gallery' ) )
    {
    	class avia_sc_gallery extends aviaShortcodeTemplate
    	{
    			static $gallery = 0;
    			var $extra_style = "";
    			var $non_ajax_style = "";
    
    			/**
    			 * Create the config array for the shortcode button
    			 */
    			function shortcode_insert_button()
    			{
    				$this->config['self_closing']	=	'yes';
    
    				$this->config['name']			= __('Gallery', 'avia_framework' );
    				$this->config['tab']			= __('Media Elements', 'avia_framework' );
    				$this->config['icon']			= AviaBuilder::$path['imagesURL']."sc-gallery.png";
    				$this->config['order']			= 6;
    				$this->config['target']			= 'avia-target-insert';
    				$this->config['shortcode'] 		= 'av_gallery';
    				$this->config['modal_data']     = array('modal_class' => 'mediumscreen');
    				$this->config['tooltip']        = __('Creates a custom gallery', 'avia_framework' );
    				$this->config['preview'] 		= 1;
    				$this->config['disabling_allowed'] = 'manually'; //only allowed manually since the default [gallery shortcode] is also affected
    			}
    
    			function extra_assets()
    			{
    				//load css
    				wp_enqueue_style( 'avia-module-gallery' , AviaBuilder::$path['pluginUrlRoot'].'avia-shortcodes/gallery/gallery.css' , array('avia-layout'), false );
    
    				wp_enqueue_script( 'avia-module-gallery' , AviaBuilder::$path['pluginUrlRoot'].'avia-shortcodes/gallery/gallery.js' , array('avia-shortcodes'), false, TRUE );
    
    			}
    
    			/**
    			 * Popup Elements
    			 *
    			 * If this function is defined in a child class the element automatically gets an edit button, that, when pressed
    			 * opens a modal window that allows to edit the element properties
    			 *
    			 * @return void
    			 */
    			function popup_elements()
    			{
    				$this->elements = array(
    					array(
    						"type" 	=> "tab_container", 'nodescription' => true
    					),
    
    					array(
    						"type" 	=> "tab",
    						"name"  => __("Content" , 'avia_framework'),
    						'nodescription' => true
    					),
    
    					array(
    							"name" 	=> __("Edit Gallery",'avia_framework' ),
    							"desc" 	=> __("Create a new Gallery by selecting existing or uploading new images",'avia_framework' ),
    							"id" 	=> "ids",
    							"type" 	=> "gallery",
    							"title" => __("Add/Edit Gallery",'avia_framework' ),
    							"button" => __("Insert Images",'avia_framework' ),
    							"std" 	=> ""),
    
    					array(
    							"name" 	=> __("Gallery Style", 'avia_framework' ),
    							"desc" 	=> __("Choose the layout of your Gallery", 'avia_framework' ),
    							"id" 	=> "style",
    							"type" 	=> "select",
    							"std" 	=> "thumbnails",
    							"subtype" => array(
    												__('Small Thumbnails',  'avia_framework' ) =>'thumbnails',
    												__('Big image with thumbnails below', 'avia_framework' ) =>'big_thumb',
    												__('Big image only, other images can be accessed via lightbox', 'avia_framework' ) =>'big_thumb lightbox_gallery',
    												)
    							),
    
    					array(
    							"name" 	=> __("Gallery Big Preview Image Size", 'avia_framework' ),
    							"desc" 	=> __("Choose image size for the Big Preview Image", 'avia_framework' ),
    							"id" 	=> "preview_size",
    							"type" 	=> "select",
    							"std" 	=> "portfolio",
    							"required" 	=> array('style','contains','big_thumb'),
    							"subtype" =>  AviaHelper::get_registered_image_sizes(array('logo'))
    							),
    
    					array(
    							"name" 	=> __("Force same size for all big preview images?", 'avia_framework' ),
    							"desc" 	=> __("Depending on the size you selected above, preview images might differ in size. Should the theme force them to display at exactly the same size?", 'avia_framework' ),
    							"id" 	=> "crop_big_preview_thumbnail",
    							"type" 	=> "select",
    							"std" 	=> "yes",
    							"required" 	=> array('style','equals','big_thumb'),
    							"subtype" =>  array(__('Yes, force same size on all Big Preview images, even if they use a different aspect ratio', 'avia_framework') => 'avia-gallery-big-crop-thumb', __('No, do not force the same size', 'avia_framework') => 'avia-gallery-big-no-crop-thumb')),
    
    					array(
                            "name" 	=> __("Gallery Preview Image Size", 'avia_framework' ),
                            "desc" 	=> __("Choose image size for the small preview thumbnails", 'avia_framework' ),
                            "id" 	=> "thumb_size",
                            "type" 	=> "select",
                            "std" 	=> "portfolio",
    							"required" 	=> array('style','not','big_thumb lightbox_gallery'),
                            "subtype" =>  AviaHelper::get_registered_image_sizes(array('logo'))
                        ),
    
    					array(
    							"name" 	=> __("Thumbnail Columns", 'avia_framework' ),
    							"desc" 	=> __("Choose the column count of your Gallery", 'avia_framework' ),
    							"id" 	=> "columns",
    							"type" 	=> "select",
    							"std" 	=> "5",
    							"required" 	=> array('style','not','big_thumb lightbox_gallery'),
    							"subtype" => AviaHtmlHelper::number_array(1,12,1)
    							),
    
    					array(
    	                        "name" 	=> __("Use Lighbox", 'avia_framework' ),
    	                        "desc" 	=> __("Do you want to activate the lightbox", 'avia_framework' ),
    	                        "id" 	=> "imagelink",
    	                        "type" 	=> "select",
    	                        "std" 	=> "5",
    							"required" 	=> array('style','not','big_thumb lightbox_gallery'),
    	                        "subtype" => array(
    	                            __('Yes',  'avia_framework' ) =>'lightbox',
    	                            __('No, open the images in the browser window', 'avia_framework' ) =>'aviaopeninbrowser noLightbox',
    	                            __('No, open the images in a new browser window/tab', 'avia_framework' ) =>'aviaopeninbrowser aviablank noLightbox',
    	                            __('No, don\'t add a link to the images at all', 'avia_framework' ) =>'avianolink noLightbox')
    	                    	),
    
    	                    array(
    		                        "name" 	=> __("Thumbnail fade in effect", 'avia_framework' ),
    		                        "desc" 	=> __("You can set when the gallery thumbnail animation starts", 'avia_framework' ),
    		                        "id" 	=> "lazyload",
    		                        "type" 	=> "select",
    		                        "std" 	=> "avia_lazyload",
    							"required" 	=> array('style','not','big_thumb lightbox_gallery'),
    		                        "subtype" => array(
    		                            __('Show the animation when user scrolls to the gallery',  'avia_framework' ) =>'avia_lazyload',
    		                            __('Activate animation on page load (might be preferable on large galleries)', 'avia_framework' ) =>'deactivate_avia_lazyload')
    		                    ),
    
    							array(
    									"type" 	=> "close_div",
    									'nodescription' => true
    								),	
    
    		                	array(
    									"type" 	=> "tab",
    									"name"	=> __("Screen Options",'avia_framework' ),
    									'nodescription' => true
    								),
    
    								array(
    								"name" 	=> __("Element Visibility",'avia_framework' ),
    								"desc" 	=> __("Set the visibility for this element, based on the device screensize.", 'avia_framework' ),
    								"type" 	=> "heading",
    								"description_class" => "av-builder-note av-neutral",
    								),
    
    								array(	
    										"desc" 	=> __("Hide on large screens (wider than 990px - eg: Desktop)", 'avia_framework'),
    										"id" 	=> "av-desktop-hide",
    										"std" 	=> "",
    										"container_class" => 'av-multi-checkbox',
    										"type" 	=> "checkbox"),
    
    								array(	
    
    										"desc" 	=> __("Hide on medium sized screens (between 768px and 989px - eg: Tablet Landscape)", 'avia_framework'),
    										"id" 	=> "av-medium-hide",
    										"std" 	=> "",
    										"container_class" => 'av-multi-checkbox',
    										"type" 	=> "checkbox"),
    
    								array(	
    
    										"desc" 	=> __("Hide on small screens (between 480px and 767px - eg: Tablet Portrait)", 'avia_framework'),
    										"id" 	=> "av-small-hide",
    										"std" 	=> "",
    										"container_class" => 'av-multi-checkbox',
    										"type" 	=> "checkbox"),
    
    								array(	
    
    										"desc" 	=> __("Hide on very small screens (smaller than 479px - eg: Smartphone Portrait)", 'avia_framework'),
    										"id" 	=> "av-mini-hide",
    										"std" 	=> "",
    										"container_class" => 'av-multi-checkbox',
    										"type" 	=> "checkbox"),
    
    							array(
    									"type" 	=> "close_div",
    									'nodescription' => true
    								),	
    
    						array(
    							"type" 	=> "close_div",
    							'nodescription' => true
    						),	
    
    						);
    
    			}
    
    			/**
    			 * Editor Element - this function defines the visual appearance of an element on the AviaBuilder Canvas
    			 * Most common usage is to define some markup in the $params['innerHtml'] which is then inserted into the drag and drop container
    			 * Less often used: $params['data'] to add data attributes, $params['class'] to modify the className
    			 *
    			 *
    			 * @param array $params this array holds the default values for $content and $args.
    			 * @return $params the return array usually holds an innerHtml key that holds item specific markup.
    			 */
    			function editor_element($params)
    			{
    				$params['innerHtml'] = "<img src='".$this->config['icon']."' title='".$this->config['name']."' />";
    				$params['innerHtml'].= "
    <div class='avia-element-label'>".$this->config['name']."</div>
    ";
    				$params['content'] 	 = NULL; //remove to allow content elements
    				return $params;
    			}
    
    			/**
    			 * Frontend Shortcode Handler
    			 *
    			 * @param array $atts array of attributes
    			 * @param string $content text within enclosing form of shortcode element
    			 * @param string $shortcodename the shortcode found, when == callback name
    			 * @return string $output returns the modified html string
    			 */
    			function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
    			{
    
    	        	extract(AviaHelper::av_mobile_sizes($atts)); //return $av_font_classes, $av_title_font_classes and $av_display_classes 
    
    				$output  = "";
    				$first   = true;
    
    				if(empty($atts['columns']) && isset($atts['ids']))
    				{
    					$atts['columns'] = count(explode(",", $atts['ids']));
    					if($atts['columns'] > 10) { $atts['columns'] = 10; }
    				}
    
    				extract(shortcode_atts(array(
    				'order'      	=> 'ASC',
    				'thumb_size' 	=> 'thumbnail',
    				'size' 			=> '',
    				'lightbox_size' => 'large',
    				'preview_size'	=> 'portfolio',
    				'ids'    	 	=> '',
    				'ajax_request'	=> false,
    				'imagelink'     => 'lightbox',
    				'style'			=> 'thumbnails',
    				'columns'		=> 5,
                    'lazyload'      => 'avia_lazyload',
                    'crop_big_preview_thumbnail' => 'avia-gallery-big-crop-thumb'
    				), $atts, $this->config['shortcode']));
    
    				$attachments = get_posts(array(
    				'include' => $ids,
    				'post_status' => 'inherit',
    				'post_type' => 'attachment',
    				'post_mime_type' => 'image',
    				'order' => $order,
    				'orderby' => 'post__in')
    				);
    
    				//compatibility mode for default wp galleries
    				if(!empty($size)) $thumb_size = $size;
    
    				if('big_thumb lightbox_gallery' == $style)
    				{
    					$imagelink = 'lightbox';
    					$lazyload  = 'deactivate_avia_lazyload';
    					$meta['el_class'] .= " av-hide-gallery-thumbs";
    				}
    
    				if(!empty($attachments) && is_array($attachments))
    				{
    					self::$gallery++;
    					$thumb_width = round(100 / $columns, 4);
    
                        $markup = avia_markup_helper(array('context' => 'image','echo'=>false, 'custom_markup'=>$meta['custom_markup']));
    					$output .= "
    <div class='avia-gallery {$av_display_classes} avia-gallery-".self::$gallery." ".$lazyload." avia_animate_when_visible ".$meta['el_class']."' $markup>";
    					$thumbs = "";
    					$counter = 0;
    
    					foreach($attachments as $attachment)
    					{
    						$link	 =  apply_filters('avf_avia_builder_gallery_image_link', wp_get_attachment_image_src($attachment->ID, $lightbox_size), $attachment, $atts, $meta);
    						$custom_link_class = !empty($link['custom_link_class']) ? $link['custom_link_class'] : '';
    						$class	 = $counter++ % $columns ? "class='$imagelink $custom_link_class'" : "class='first_thumb $imagelink $custom_link_class'";
    						$img  	 = wp_get_attachment_image_src($attachment->ID, $thumb_size);
    						$prev	 = wp_get_attachment_image_src($attachment->ID, $preview_size);
    
    						$caption = trim($attachment->post_excerpt) ? wptexturize($attachment->post_excerpt) : "";
    						$tooltip = $caption ? "data-avia-tooltip='".$caption."'" : "";
    
                            $alt = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true);
                            $alt = !empty($alt) ? esc_attr($alt) : '';
                            $title = trim($attachment->post_title) ? esc_attr($attachment->post_title) : "";
                            $description = trim($attachment->post_content) ? esc_attr($attachment->post_content) : esc_attr(trim($attachment->post_excerpt));
    
                            $markup_url = avia_markup_helper(array('context' => 'image_url','echo'=>false, 'id'=>$attachment->ID, 'custom_markup'=>$meta['custom_markup']));
    
    						if( strpos($style, "big_thumb") !== false && $first)
    						{
    							$big_thumb = "<a class='avia-gallery-big fakeLightbox $imagelink $crop_big_preview_thumbnail $custom_link_class' href='".$link[0]."'  data-onclick='1' title='".$description."' ><span class='avia-gallery-big-inner' $markup_url>";
    							$big_thumb .= "	<img width='".$prev[1]."' height='".$prev[2]."' src='".$prev[0]."' title='".$title."' alt='".$alt."' />";
    			   if($caption) $big_thumb .= "	<span class='avia-gallery-caption'>{$caption}</span>";
    							$big_thumb .= "</span></a>";
    						}
    
    						$thumbs .= " <a href='".$link[0]."' data-rel='gallery-".self::$gallery."' data-prev-img='".$prev[0]."' {$class} data-onclick='{$counter}' title='".$description."' $markup_url><img {$tooltip} src='".$img[0]."' width='".$img[1]."' height='".$img[2]."'  title='".$title."' alt='".$alt."' /></a>";
    
    						$first = false;
    					}
    
    					$output .= "
    <div class='avia-gallery-thumb'>{$thumbs}</div>
    {$big_thumb}";
    					$output .= "</div>
    ";
    
    					$selector = !empty($atts['ajax_request']) ? ".ajax_slide" : "";
    
    					//generate thumb width based on columns
    					$this->extra_style .= "<style type='text/css'>";
    					$this->extra_style .= "#top #wrap_all {$selector} .avia-gallery-".self::$gallery." .avia-gallery-thumb a{width:{$thumb_width}%;}";
    					$this->extra_style .= "</style>";
    
    					if(!empty($this->extra_style))
    					{
    
    						if(!empty($atts['ajax_request']) || !empty($_POST['avia_request']))
    						{
    							$output .= $this->extra_style;
    							$this->extra_style = "";
    						}
    						else
    						{
    							$this->non_ajax_style = $this->extra_style;
    							add_action('wp_footer', array($this, 'print_extra_style'));
    						}
    					}
    
    				}
    
    				return $output;
    			}
    
    			function print_extra_style()
    			{
    				echo $this->non_ajax_style;
    			}
    
    	}
    }
    
    

    and add this code to the quick css field:

    
    #top div .avia-gallery .avia-gallery-big {
        width: 100%;
    }
    

    Best regards,
    Peter

    #1011613

    Hi Rikard,

    Thank you. Yes, I am aware of how to show and hide options. This does not solve the error of that giant thumbnail. We would like this still visible as the small ones down the page.

    Can you let us know what is happening here and what the fix is?

    You can see this correspondence started a long time ago with never a resolve.

    Thanks.
    Kevin

    #1011575
    Daan88
    Participant

    Hello,
    I’m using the gallery function as a big image with the thumbnails below, but I would like to move them above the image. I’m only a novice with PHP but I almost got it to work, but there is still something going wrong. It only shows 1 thumbnail above, and the big image gets a link/caption of the next thumbnail. I think it doesn’t close a certain <div> or something. I feel like I’m really close so it would be awesome if you could have quick look!

    Original:

    
    					foreach($attachments as $attachment)
    					{
    						$link	 =  apply_filters('avf_avia_builder_gallery_image_link', wp_get_attachment_image_src($attachment->ID, $lightbox_size), $attachment, $atts, $meta);
    						$custom_link_class = !empty($link['custom_link_class']) ? $link['custom_link_class'] : '';
    						$class	 = $counter++ % $columns ? "class='$imagelink $custom_link_class'" : "class='first_thumb $imagelink $custom_link_class'";
    						$img  	 = wp_get_attachment_image_src($attachment->ID, $thumb_size);
    						$prev	 = wp_get_attachment_image_src($attachment->ID, $preview_size);
    
    						$caption = trim($attachment->post_excerpt) ? wptexturize($attachment->post_excerpt) : "";
    						$tooltip = $caption ? "data-avia-tooltip='".$caption."'" : "";
    
                            $alt = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true);
                            $alt = !empty($alt) ? esc_attr($alt) : '';
                            $title = trim($attachment->post_title) ? esc_attr($attachment->post_title) : "";
                            $description = trim($attachment->post_content) ? esc_attr($attachment->post_content) : esc_attr(trim($attachment->post_excerpt));
    
                            $markup_url = avia_markup_helper(array('context' => 'image_url','echo'=>false, 'id'=>$attachment->ID, 'custom_markup'=>$meta['custom_markup']));
    
    						if( strpos($style, "big_thumb") !== false && $first)
    						
    
    // 						Big image
    
    						{
    							$output .= "<a class='avia-gallery-big fakeLightbox $imagelink $crop_big_preview_thumbnail $custom_link_class' href='".$link[0]."'  data-onclick='1' title='".$description."' ><span class='avia-gallery-big-inner' $markup_url>";
    							$output .= "	<img width='".$prev[1]."' height='".$prev[2]."' src='".$prev[0]."' title='".$title."' alt='".$alt."' />";
    			   if($caption) $output .= "	<span class='avia-gallery-caption'>{$caption}</span>";
    							$output .= "</span></a>";
    						}
    						
    // 						End Big image
    						
    						
    // 						Start thumbnails
    
    						$thumbs .= " <a href='".$link[0]."' data-rel='gallery-".self::$gallery."' data-prev-img='".$prev[0]."' {$class} data-onclick='{$counter}' title='".$description."' $markup_url><img {$tooltip} src='".$img[0]."' width='".$img[1]."' height='".$img[2]."'  title='".$title."' alt='".$alt."' /></a>";
    						$first = false;
    					}
    
    					$output .= "<div class='avia-gallery-thumb'>{$thumbs}</div>";
    					$output .= "</div>";
    					
    					$selector = !empty($atts['ajax_request']) ? ".ajax_slide" : "";
    					
    					//generate thumb width based on columns
    					$this->extra_style .= "<style type='text/css'>";
    					$this->extra_style .= "#top #wrap_all {$selector} .avia-gallery-".self::$gallery." .avia-gallery-thumb a{width:{$thumb_width}%;}";
    					$this->extra_style .= "</style>";
    					
    					if(!empty($this->extra_style))
    					{
    						
    						if(!empty($atts['ajax_request']) || !empty($_POST['avia_request']))
    						{
    							$output .= $this->extra_style;
    							$this->extra_style = "";
    						}
    						else
    						{
    							$this->non_ajax_style = $this->extra_style;
    							add_action('wp_footer', array($this, 'print_extra_style'));
    						}
    					}
    					
    // 					End thumbnails
    
    				}
    
    				return $output;
    			}
    
    			function print_extra_style()
    			{
    				echo $this->non_ajax_style;
    			}
    
    	}
    }
    

    My gallery.php:

    foreach($attachments as $attachment)
    					{
    						$link	 =  apply_filters('avf_avia_builder_gallery_image_link', wp_get_attachment_image_src($attachment->ID, $lightbox_size), $attachment, $atts, $meta);
    						$custom_link_class = !empty($link['custom_link_class']) ? $link['custom_link_class'] : '';
    						$class	 = $counter++ % $columns ? "class='$imagelink $custom_link_class'" : "class='first_thumb $imagelink $custom_link_class'";
    						$img  	 = wp_get_attachment_image_src($attachment->ID, $thumb_size);
    						$prev	 = wp_get_attachment_image_src($attachment->ID, $preview_size);
    
    						$caption = trim($attachment->post_excerpt) ? wptexturize($attachment->post_excerpt) : "";
    						$tooltip = $caption ? "data-avia-tooltip='".$caption."'" : "";
    
                            $alt = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true);
                            $alt = !empty($alt) ? esc_attr($alt) : '';
                            $title = trim($attachment->post_title) ? esc_attr($attachment->post_title) : "";
                            $description = trim($attachment->post_content) ? esc_attr($attachment->post_content) : esc_attr(trim($attachment->post_excerpt));
    
                            $markup_url = avia_markup_helper(array('context' => 'image_url','echo'=>false, 'id'=>$attachment->ID, 'custom_markup'=>$meta['custom_markup']));
    
    						if( strpos($style, "big_thumb") !== false && $first)
    						// 						Begin Thumnails
    
    						$thumbs .= " <a href='".$link[0]."' data-rel='gallery-".self::$gallery."' data-prev-img='".$prev[0]."' {$class} data-onclick='{$counter}' title='".$description."' $markup_url><img {$tooltip} src='".$img[0]."' width='".$img[1]."' height='".$img[2]."'  title='".$title."' alt='".$alt."' /></a>";
    						$first = false;
    					}
    
    					$output .= "<div class='avia-gallery-thumb'>{$thumbs}</div>";
    					$output .= "</div>";
    					
    					$selector = !empty($atts['ajax_request']) ? ".ajax_slide" : "";
    					
    					//generate thumb width based on columns
    					$this->extra_style .= "<style type='text/css'>";
    					$this->extra_style .= "#top #wrap_all {$selector} .avia-gallery-".self::$gallery." .avia-gallery-thumb a{width:{$thumb_width}%;}";
    					$this->extra_style .= "</style>";
    					
    					if(!empty($this->extra_style))
    					{
    						
    						if(!empty($atts['ajax_request']) || !empty($_POST['avia_request']))
    						{
    							$output .= $this->extra_style;
    							$this->extra_style = "";
    						}
    						else
    						{
    							$this->non_ajax_style = $this->extra_style;
    							add_action('wp_footer', array($this, 'print_extra_style'));
    						}
    					}
    					
    // 					END thumbnails
    
    // 						Start Big image
    
    						{
    							$output .= "<a class='avia-gallery-big fakeLightbox $imagelink $crop_big_preview_thumbnail $custom_link_class' href='".$link[0]."'  data-onclick='1' title='".$description."' ><span class='avia-gallery-big-inner' $markup_url>";
    							$output .= "	<img width='".$prev[1]."' height='".$prev[2]."' src='".$prev[0]."' title='".$title."' alt='".$alt."' />";
    			   if($caption) $output .= "	<span class='avia-gallery-caption'>{$caption}</span>";
    							$output .= "</span></a>";
    						}
    // 						End Big image
    						
    
    				}
    
    				return $output;
    			}
    
    			function print_extra_style()
    			{
    				echo $this->non_ajax_style;
    			}
    
    	}
    }
    
    

    Thanks in advance!
    Daan

    #1011573

    Hi,

    This is still an issue.

    When logged in, and I click on ALL POSTS the post list has a massive photo instead of a thumbnail. How do I get this back to where the blog posts just have a small thumbnail photo.

    Please login to see. You will notice this happens on the first 13 or so, and the rest have small thumbnails.

    Everything is up-to-date.

    Thanks.
    Kevin

    Tenshi_Wing
    Participant

    Hi im trying to view a video on the site , but not pulling it from youtube or vimeo. Its uploaded to the galley and it only playing the sound.
    If i right click and show in new tab then the video shows and plays.

    Can you assist please?

    http://www.legacyfilms.co.za/portfolio/?preview_id=25&preview_nonce=424c1b76e3&_thumbnail_id=-1&preview=true

    jurgen1979
    Participant

    I have a website, build with Enfold, with a lot (A LOT) of images. (+1200)

    I had to mover the site to another server. Because of the fact that there are so much media files a normal WP import/export does not work. The systeem keeps crashing. So I had to copy all those files through FTP. That went well, it all works now BUT … those images are not in the Media Library … And that’s a problem.

    I found some solutions on the internet. For example the “Add From Server” plugin. That plugin does the job … partly. Because of the fact that Enfold creates several version of a images it becomes a bit of a mess.

    Also I found out (the hard way) that when I try to register the images to the media library the folder structure (year > month) gets lost … And that terrible because in the site all links to media are broken then …

    SO … I hope there is someone here who can help me.

    How can I import media files that are already on the server – in the correct folders – without the thumbnail-versions created by Enfold AND how can I keep the folder-structure …

    Thanks for the reply …

    #1011131

    Hi,

    Thanks for the update. We selected a larger version of the image or thumbnail. If you want to adjust it, edit the image element, click on the current image and then select the image again under the Media Library tab. Look for the “ATTACHMENT DISPLAY SETTINGS” and set the “Size” accordingly. Right now, it is set to “Large (646x1030px)”.

    Best regards,
    Ismael

    #1010813

    The last thumbnail is wrapping. If I decrease the width, then the 3rd thumbnail isn’t aligned on the right.

    #1010545

    In reply to: Symmetrical portfolio

    Hi,

    Select the “portfolio_small” thumbnail of the “portfolio” and “post” custom post type. Again, you have to make sure that the “portfolio_small” thumbnail is selected in the portfolio grid options after regenerating the images.

    You have to select the “Entradas” or “posts” post type in addition to the “portfolio” post type.

    Best regards,
    Ismael

    #1010376

    Hi loulivia,

    Here is the code you can put in Enfold > General Styling > Quick Css,  if it does not work, put into themes/enfold/css/custom.css

    
    
    @media only screen and (min-width: 990px) {
      #top .thumbnail_container img {
          width: auto;
          height: 165px;
          margin: 0 auto;
      }
    }
    @media only screen and (min-width: 768px) and (max-width: 989px){
      #top .thumbnail_container img {
          width: auto;
          height: 117px;
          margin: 0 auto;
      }
    }
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1009927

    How can I make the thumbnail images bigger and reduce the gaps between and above them?

    #1009812
    foxvendetta
    Participant

    Hi,
    After updating Enfold to the latest version, the thumbnails on single post pages are appearing stretched and blurry. Before the update, the featured image would display at 100% of what ever the image size is.

    This only seems to be happening to featured images. Thumbnails in other areas of the site are working normally.
    I have searched for solutions here in the forum but the ones I have found are woocommerce related, but woocommerce is not installed on this site.

    I think this is happening because the featured image setting is : featured: 1500×430 pixels (cropped to fit).
    How can I make it so that the thumbnails displayed are set at 100% of the original image dimensions instead of stretching them?

    Thank you.

    #1009764

    Unfortunately they’re not visible on mobile. Therefore, on the mobile post category pages look dull and uninteresting. Yes, there’s a small thumbnail on the left on desktop., which makes one wonder why the theme doesn’t have the same size featured image on the post category pages as on the blog posts page (the main page with exceprts). We all know images attract attention and arouse interest. A picture speaks a thousand words.

    Now the mobile page has just text and your answer gave me to understand there is no easy way to add the images there. More people are browsing the Internet on their mobile phone than on their desktop or laptop these days. The post category pages are very important as a directory of blogs. It’d be nice to see in your future version that the category pages would have the same style images as the blog post page. That shouldn’t be too hard to do and it would make the pages look consistent.

    Thank you for a great theme. It’s quite versatile and allowed me hastily put together a decent website.

    #1009681
    ChristineGerman
    Participant

    I’m using a child theme that I originally followed from advice in the thread below:

    I want the Blog Post Grid Layout to display the title, then below the Author (original author of the post) and date. Right now for some reason, the author is being populated as the same author for all the posts in a given section…it seems like it may be taking the author who made the most recent post. But each article is being written by a different student, so it needs to display the actual author of that individual post (taken from the Author section in the back end when you look at Posts).

    The error is especially noticable in the “Latest” section on the homepage of my site.

    The shortcodes file altering this element is below, and titled postslider.php:

    <?php
    /**
    * Post Slider
    *
    * Display a Slideshow of Post Entries
    * Element is in Beta and by default disabled. Todo: test with layerslider elements. currently throws error bc layerslider is only included if layerslider element is detected which is not the case with the post/page element
    */
    if ( ! defined( ‘ABSPATH’ ) ) { exit; } // Exit if accessed directly

    if ( !class_exists( ‘avia_sc_postslider’ ))
    {
    class avia_sc_postslider extends aviaShortcodeTemplate
    {

    /**
    * Create the config array for the shortcode button
    */
    function shortcode_insert_button()
    {
    $this->config[‘self_closing’] = ‘yes’;

    $this->config[‘name’] = __(‘Post Slider’, ‘avia_framework’ );
    $this->config[‘tab’] = __(‘Content Elements’, ‘avia_framework’ );
    $this->config[‘icon’] = AviaBuilder::$path[‘imagesURL’].”sc-postslider.png”;
    $this->config[‘order’] = 30;
    $this->config[‘target’] = ‘avia-target-insert’;
    $this->config[‘shortcode’] = ‘av_postslider’;
    $this->config[‘tooltip’] = __(‘Display a Slideshow of Post Entries’, ‘avia_framework’ );
    $this->config[‘drag-level’] = 3;
    }

    /**
    * Popup Elements
    *
    * If this function is defined in a child class the element automatically gets an edit button, that, when pressed
    * opens a modal window that allows to edit the element properties
    *
    * @return void
    */
    function popup_elements()
    {
    $this->elements = array(
    array(
    “type” => “tab_container”, ‘nodescription’ => true
    ),

    array(
    “type” => “tab”,
    “name” => __(“Content” , ‘avia_framework’),
    ‘nodescription’ => true
    ),
    array(
    “name” => __(“Which Entries?”, ‘avia_framework’ ),
    “desc” => __(“Select which entries should be displayed by selecting a taxonomy”, ‘avia_framework’ ),
    “id” => “link”,
    “fetchTMPL” => true,
    “type” => “linkpicker”,
    “subtype” => array( __(‘Display Entries from:’, ‘avia_framework’ )=>’taxonomy’),
    “multiple” => 6,
    “std” => “category”
    ),

    array(
    “name” => __(“WooCommerce Product visibility?”, ‘avia_framework’ ),
    “desc” => __(“Select the visibility of WooCommerce products. Default setting can be set at Woocommerce -&gt Settings -&gt Products -&gt Inventory -&gt Out of stock visibility”, ‘avia_framework’ ),
    “id” => “wc_prod_visible”,
    “type” => “select”,
    “std” => “”,
    “required” => array( ‘link’, ‘parent_in_array’, implode( ‘ ‘, get_object_taxonomies( ‘product’, ‘names’ ) ) ),
    “subtype” => array(
    __(‘Use default WooCommerce Setting (Settings -> Products -> Out of stock visibility)’, ‘avia_framework’ ) => ”,
    __(‘Hide products out of stock’, ‘avia_framework’ ) => ‘hide’,
    __(‘Show products out of stock’, ‘avia_framework’ ) => ‘show’)
    ),

    array(
    “name” => __( “Sorting Options”, ‘avia_framework’ ),
    “desc” => __( “Here you can choose how to sort the products. Default setting can be set at Woocommerce -&gt Settings -&gt Products -&gt Display -&gt Default product sorting”, ‘avia_framework’ ),
    “id” => “prod_order_by”,
    “type” => “select”,
    “std” => “”,
    “required” => array( ‘link’, ‘parent_in_array’, implode( ‘ ‘, get_object_taxonomies( ‘product’, ‘names’ ) ) ),
    “subtype” => array(
    __(‘Use defaut (defined at Woocommerce -> Settings -&gt Default product sorting) ‘, ‘avia_framework’ ) => ”,
    __(‘Sort alphabetically’, ‘avia_framework’ ) => ‘title’,
    __(‘Sort by most recent’, ‘avia_framework’ ) => ‘date’,
    __(‘Sort by price’, ‘avia_framework’ ) => ‘price’,
    __(‘Sort by popularity’, ‘avia_framework’ ) => ‘popularity’,
    __(‘Sort randomly’, ‘avia_framework’ ) => ‘rand’
    )
    ),

    array(
    “name” => __( “Sorting Order”, ‘avia_framework’ ),
    “desc” => __( “Here you can choose the order of the result products. Default setting can be set at Woocommerce -&gt Settings -&gt Products -&gt Display -&gt Default product sorting”, ‘avia_framework’ ),
    “id” => “prod_order”,
    “type” => “select”,
    “std” => “”,
    “required” => array( ‘link’, ‘parent_in_array’, implode( ‘ ‘, get_object_taxonomies( ‘product’, ‘names’ ) ) ),
    “subtype” => array(
    __(‘Use defaut (defined at Woocommerce -&gt Settings -&gt Default product sorting)’, ‘avia_framework’ ) => ”,
    __(‘Ascending’, ‘avia_framework’ ) => ‘ASC’,
    __(‘Descending’, ‘avia_framework’ ) => ‘DESC’
    )
    ),

    array(
    “name” => __(“Columns”, ‘avia_framework’ ),
    “desc” => __(“How many columns should be displayed?”, ‘avia_framework’ ),
    “id” => “columns”,
    “type” => “select”,
    “std” => “3”,
    “subtype” => array( __(‘1 Columns’, ‘avia_framework’ )=>’1′,
    __(‘2 Columns’, ‘avia_framework’ )=>’2′,
    __(‘3 Columns’, ‘avia_framework’ )=>’3′,
    __(‘4 Columns’, ‘avia_framework’ )=>’4′,
    __(‘5 Columns’, ‘avia_framework’ )=>’5′,
    )),
    array(
    “name” => __(“Entry Number”, ‘avia_framework’ ),
    “desc” => __(“How many items should be displayed?”, ‘avia_framework’ ),
    “id” => “items”,
    “type” => “select”,
    “std” => “9”,
    “subtype” => AviaHtmlHelper::number_array(1,100,1, array(‘All’=>’-1′))),

    array(
    “name” => __(“Offset Number”, ‘avia_framework’ ),
    “desc” => __(“The offset determines where the query begins pulling posts. Useful if you want to remove a certain number of posts because you already query them with another post slider element.”, ‘avia_framework’ ),
    “id” => “offset”,
    “type” => “select”,
    “std” => “0”,
    “subtype” => AviaHtmlHelper::number_array(1,100,1, array(__(‘Deactivate offset’,’avia_framework’)=>’0′, __(‘Do not allow duplicate posts on the entire page (set offset automatically)’, ‘avia_framework’ ) =>’no_duplicates’))),

    array(
    “name” => __(“Title and Excerpt”,’avia_framework’ ),
    “desc” => __(“Choose if you want to only display the post title or title and excerpt”,’avia_framework’ ),
    “id” => “contents”,
    “type” => “select”,
    “std” => “excerpt”,
    “subtype” => array(
    __(‘Title and Excerpt’, ‘avia_framework’ ) =>’excerpt’,
    __(‘Title and Excerpt + Read More Link’, ‘avia_framework’ ) =>’excerpt_read_more’,
    __(‘Only Title’, ‘avia_framework’ ) =>’title’,
    __(‘Only Title + Read More Link’, ‘avia_framework’ ) =>’title_read_more’,
    __(‘Only excerpt’, ‘avia_framework’ ) =>’only_excerpt’,
    __(‘Only excerpt + Read More Link’, ‘avia_framework’ ) =>’only_excerpt_read_more’,
    __(‘No Title and no excerpt’, ‘avia_framework’ ) =>’no’)),

    array(
    “name” => __(“Preview Image Size”, ‘avia_framework’ ),
    “desc” => __(“Set the image size of the preview images”, ‘avia_framework’ ),
    “id” => “preview_mode”,
    “type” => “select”,
    “std” => “auto”,
    “subtype” => array(__(‘Set the preview image size automatically based on column width’,’avia_framework’ ) =>’auto’,__(‘Choose the preview image size manually (select thumbnail size)’,’avia_framework’ ) =>’custom’)),

    array(
    “name” => __(“Select custom preview image size”, ‘avia_framework’ ),
    “desc” => __(“Choose image size for Preview Image”, ‘avia_framework’ ),
    “id” => “image_size”,
    “type” => “select”,
    “required” => array(‘preview_mode’,’equals’,’custom’),
    “std” => “portfolio”,
    “subtype” => AviaHelper::get_registered_image_sizes(array(‘logo’))
    ),

    /*
    array(
    “name” => __(“Post Slider Transition”, ‘avia_framework’ ),
    “desc” => __(“Choose the transition for your Post Slider.”, ‘avia_framework’ ),
    “id” => “animation”,
    “type” => “select”,
    “std” => “fade”,
    “subtype” => array(__(‘Slide’,’avia_framework’ ) =>’slide’,__(‘Fade’,’avia_framework’ ) =>’fade’),
    ),
    */

    array(
    “name” => __(“Autorotation active?”,’avia_framework’ ),
    “desc” => __(“Check if the slideshow should rotate by default”,’avia_framework’ ),
    “id” => “autoplay”,
    “type” => “select”,
    “std” => “no”,
    “subtype” => array(__(‘Yes’,’avia_framework’ ) =>’yes’,__(‘No’,’avia_framework’ ) =>’no’)),

    array(
    “name” => __(“Slideshow autorotation duration”,’avia_framework’ ),
    “desc” => __(“Slideshow will rotate every X seconds”,’avia_framework’ ),
    “id” => “interval”,
    “type” => “select”,
    “std” => “5”,
    “required” => array(‘autoplay’,’equals’,’yes’),
    “subtype” =>
    array(‘3’=>’3′,’4’=>’4′,’5’=>’5′,’6’=>’6′,’7’=>’7′,’8’=>’8′,’9’=>’9′,’10’=>’10’,’15’=>’15’,’20’=>’20’,’30’=>’30’,’40’=>’40’,’60’=>’60’,’100’=>’100′)),

    array(
    “type” => “close_div”,
    ‘nodescription’ => true
    ),

    array(
    “type” => “tab”,
    “name” => __(“Screen Options”,’avia_framework’ ),
    ‘nodescription’ => true
    ),

    array(
    “name” => __(“Element Visibility”,’avia_framework’ ),
    “desc” => __(“Set the visibility for this element, based on the device screensize.”, ‘avia_framework’ ),
    “type” => “heading”,
    “description_class” => “av-builder-note av-neutral”,
    ),

    array(
    “desc” => __(“Hide on large screens (wider than 990px – eg: Desktop)”, ‘avia_framework’),
    “id” => “av-desktop-hide”,
    “std” => “”,
    “container_class” => ‘av-multi-checkbox’,
    “type” => “checkbox”),

    array(

    “desc” => __(“Hide on medium sized screens (between 768px and 989px – eg: Tablet Landscape)”, ‘avia_framework’),
    “id” => “av-medium-hide”,
    “std” => “”,
    “container_class” => ‘av-multi-checkbox’,
    “type” => “checkbox”),

    array(

    “desc” => __(“Hide on small screens (between 480px and 767px – eg: Tablet Portrait)”, ‘avia_framework’),
    “id” => “av-small-hide”,
    “std” => “”,
    “container_class” => ‘av-multi-checkbox’,
    “type” => “checkbox”),

    array(

    “desc” => __(“Hide on very small screens (smaller than 479px – eg: Smartphone Portrait)”, ‘avia_framework’),
    “id” => “av-mini-hide”,
    “std” => “”,
    “container_class” => ‘av-multi-checkbox’,
    “type” => “checkbox”),

    array(
    “type” => “close_div”,
    ‘nodescription’ => true
    ),

    array(
    “type” => “close_div”,
    ‘nodescription’ => true
    ),

    );

    if(current_theme_supports(‘add_avia_builder_post_type_option’))
    {
    $element = array(
    “name” => __(“Select Post Type”, ‘avia_framework’ ),
    “desc” => __(“Select which post types should be used. Note that your taxonomy will be ignored if you do not select an assign post type.
    If yo don’t select post type all registered post types will be used”, ‘avia_framework’ ),
    “id” => “post_type”,
    “type” => “select”,
    “multiple” => 6,
    “std” => “”,
    “subtype” => AviaHtmlHelper::get_registered_post_type_array()
    );

    array_splice($this->elements, 2, 0, array($element));
    }
    }

    /**
    * Editor Element – this function defines the visual appearance of an element on the AviaBuilder Canvas
    * Most common usage is to define some markup in the $params[‘innerHtml’] which is then inserted into the drag and drop container
    * Less often used: $params[‘data’] to add data attributes, $params[‘class’] to modify the className
    *
    *
    * @param array $params this array holds the default values for $content and $args.
    * @return $params the return array usually holds an innerHtml key that holds item specific markup.
    */
    function editor_element($params)
    {
    $params[‘innerHtml’] = “config[‘icon’].”‘ title='”.$this->config[‘name’].”‘ />”;
    $params[‘innerHtml’].= “<div class=’avia-element-label’>”.$this->config[‘name’].”</div>”;
    $params[‘content’] = NULL; //remove to allow content elements
    return $params;
    }

    /**
    * Frontend Shortcode Handler
    *
    * @param array $atts array of attributes
    * @param string $content text within enclosing form of shortcode element
    * @param string $shortcodename the shortcode found, when == callback name
    * @return string $output returns the modified html string
    */
    function shortcode_handler($atts, $content = “”, $shortcodename = “”, $meta = “”)
    {
    $screen_sizes = AviaHelper::av_mobile_sizes($atts);

    if(isset($atts[‘link’]))
    {
    $atts[‘link’] = explode(‘,’, $atts[‘link’], 2 );
    $atts[‘taxonomy’] = $atts[‘link’][0];

    if(isset($atts[‘link’][1]))
    {
    $atts[‘categories’] = $atts[‘link’][1];
    }
    }

    $atts[‘class’] = $meta[‘el_class’];
    $atts = array_merge($atts, $screen_sizes);

    $slider = new avia_post_slider($atts);
    $slider->query_entries();
    return $slider->html();
    }

    }
    }

    if ( !class_exists( ‘avia_post_slider’ ) )
    {
    class avia_post_slider
    {
    static $slide = 0;
    protected $atts;
    protected $entries;

    function __construct($atts = array())
    {
    $this->atts = shortcode_atts(array( ‘type’ => ‘slider’, // can also be used as grid
    ‘style’ => ”, //no_margin
    ‘columns’ => ‘4’,
    ‘items’ => ’16’,
    ‘taxonomy’ => ‘category’,
    ‘wc_prod_visible’ => ”,
    ‘prod_order_by’ => ”,
    ‘prod_order’ => ”,
    ‘post_type’=> get_post_types(),
    ‘contents’ => ‘excerpt’,
    ‘preview_mode’ => ‘auto’,
    ‘image_size’ => ‘portfolio’,
    ‘autoplay’ => ‘no’,
    ‘animation’ => ‘fade’,
    ‘paginate’ => ‘no’,
    ‘use_main_query_pagination’ => ‘no’,
    ‘interval’ => 5,
    ‘class’ => ”,
    ‘categories’=> array(),
    ‘custom_query’=> array(),
    ‘offset’ => 0,
    ‘custom_markup’ => ”,
    ‘av_display_classes’ => ”
    ), $atts, ‘av_postslider’);

    }

    public function html()
    {
    global $avia_config;

    $output = “”;

    if(empty($this->entries) || empty($this->entries->posts)) return $output;

    avia_post_slider::$slide ++;
    extract($this->atts);

    if($preview_mode == ‘auto’) $image_size = ‘portfolio’;
    $extraClass = ‘first’;
    $grid = ‘one_third’;
    $post_loop_count = 1;
    $loop_counter = 1;
    $autoplay = $autoplay == “no” ? false : true;
    $total = $columns % 2 ? “odd” : “even”;
    $blogstyle = function_exists(‘avia_get_option’) ? avia_get_option(‘blog_global_style’,”) : “”;
    $excerpt_length = 60;

    if($blogstyle !== “”)
    {
    $excerpt_length = 240;
    }

    switch($columns)
    {
    case “1”: $grid = ‘av_fullwidth’; if($preview_mode == ‘auto’) $image_size = ‘large’; break;
    case “2”: $grid = ‘av_one_half’; break;
    case “3”: $grid = ‘av_one_third’; break;
    case “4”: $grid = ‘av_one_fourth’; if($preview_mode == ‘auto’) $image_size = ‘portfolio_small’; break;
    case “5”: $grid = ‘av_one_fifth’; if($preview_mode == ‘auto’) $image_size = ‘portfolio_small’; break;
    }

    $data = AviaHelper::create_data_string(array(‘autoplay’=>$autoplay, ‘interval’=>$interval, ‘animation’ => $animation, ‘show_slide_delay’=>90));

    $thumb_fallback = “”;
    $markup = avia_markup_helper(array(‘context’ => ‘blog’,’echo’=>false, ‘custom_markup’=>$custom_markup));
    $output .= “<div {$data} class=’avia-content-slider avia-content-{$type}-active avia-content-slider”.avia_post_slider::$slide.” avia-content-slider-{$total} {$class} {$av_display_classes}’ $markup>”;
    $output .= “<div class=’avia-content-slider-inner’>”;

    foreach ($this->entries->posts as $entry)
    {
    $the_id = $entry->ID;
    $parity = $loop_counter % 2 ? ‘odd’ : ‘even’;
    $last = $this->entries->post_count == $post_loop_count ? ” post-entry-last ” : “”;
    $post_class = “post-entry post-entry-{$the_id} slide-entry-overview slide-loop-{$post_loop_count} slide-parity-{$parity} {$last}”;
    $link = get_post_meta( $the_id ,’_portfolio_custom_link’, true ) != “” ? get_post_meta( $the_id ,’_portfolio_custom_link_url’, true ) : get_permalink( $the_id );
    $excerpt = “”;
    $title = ”;
    $show_meta = !is_post_type_hierarchical($entry->post_type);
    $commentCount = get_comments_number($the_id);
    $thumbnail = get_the_post_thumbnail( $the_id, $image_size );
    $format = get_post_format( $the_id );
    if(empty($format)) $format = “standard”;

    if($thumbnail)
    {
    $thumb_fallback = $thumbnail;
    $thumb_class = “real-thumbnail”;
    }
    else
    {
    $thumbnail = “<span class=’ fallback-post-type-icon’ “.av_icon_string($format).”></span><span class=’slider-fallback-image’>{{thumbnail}}</span>”;
    $thumb_class = “fake-thumbnail”;
    }

    $permalink = ‘<div class=”read-more-link”>‘.__(‘Read more’,’avia_framework’).'<span class=”more-link-arrow”></span></div>’;
    $prepare_excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters( ‘avf_postgrid_excerpt_length’ , $excerpt_length) , apply_filters( ‘avf_postgrid_excerpt_delimiter’ , ” “), “…”, true, ”);

    if($format == ‘link’)
    {
    $current_post = array();
    $current_post[‘content’] = $entry->post_content;
    $current_post[‘title’] = $entry->post_title;

    if(function_exists(‘avia_link_content_filter’))
    {
    $current_post = avia_link_content_filter($current_post);
    }

    $link = $current_post[‘url’];
    }

    switch($contents)
    {
    case “excerpt”:
    $excerpt = $prepare_excerpt;
    $title = $entry->post_title;
    break;
    case “excerpt_read_more”:
    $excerpt = $prepare_excerpt;
    $excerpt .= $permalink;
    $title = $entry->post_title;
    break;
    case “title”:
    $excerpt = ”;
    $title = $entry->post_title;
    break;
    case “title_read_more”:
    $excerpt = $permalink;
    $title = $entry->post_title;
    break;
    case “only_excerpt”:
    $excerpt = $prepare_excerpt;
    $title = ”;
    break;
    case “only_excerpt_read_more”:
    $excerpt = $prepare_excerpt;
    $excerpt .= $permalink;
    $title = ”;
    break;
    case “no”:
    $excerpt = ”;
    $title = ”;
    break;
    }

    $title = apply_filters( ‘avf_postslider_title’, $title, $entry );

    if($loop_counter == 1) $output .= “<div class=’slide-entry-wrap’>”;

    $post_format = get_post_format($the_id) ? get_post_format($the_id) : ‘standard’;

    $markup = avia_markup_helper(array(‘context’ => ‘entry’,’echo’=>false, ‘id’=>$the_id, ‘custom_markup’=>$custom_markup));
    $output .= “<article class=’slide-entry flex_column {$style} {$post_class} {$grid} {$extraClass} {$thumb_class}’ $markup>”;
    $output .= $thumbnail ? “{$thumbnail}” : “”;

    if($post_format == “audio”)
    {
    $current_post = array();
    $current_post[‘content’] = $entry->post_content;
    $current_post[‘title’] = $entry->post_title;

    $current_post = apply_filters( ‘post-format-‘.$post_format, $current_post );

    if(!empty( $current_post[‘before_content’] )) $output .= ‘<div class=”big-preview single-big audio-preview”>’.$current_post[‘before_content’].'</div>’;
    }

    $output .= “<div class=’slide-content’>”;

    $markup = avia_markup_helper(array(‘context’ => ‘entry_title’,’echo’=>false, ‘id’=>$the_id, ‘custom_markup’=>$custom_markup));
    $output .= ‘<header class=”entry-content-header”>’;
    $meta_out = “”;

    if (!empty($title))
    {
    if($show_meta)
    {
    $taxonomies = get_object_taxonomies(get_post_type($the_id));
    $cats = ”;
    $excluded_taxonomies = array_merge( get_taxonomies( array( ‘public’ => false ) ), array(‘post_tag’,’post_format’) );
    $excluded_taxonomies = apply_filters(‘avf_exclude_taxonomies’, $excluded_taxonomies, get_post_type($the_id), $the_id);

    if(!empty($taxonomies))
    {
    foreach($taxonomies as $taxonomy)
    {
    if(!in_array($taxonomy, $excluded_taxonomies))
    {
    $cats .= get_the_term_list($the_id, $taxonomy, ”, ‘, ‘,”).’ ‘;
    }
    }
    }

    if(!empty($cats))
    {
    $meta_out .= ‘<span class=”blog-categories minor-meta”>’;
    $meta_out .= $cats;
    $meta_out .= ‘</span>’;
    }
    }

    /**
    * Allow to change default output of categories – by default supressed for setting Default(Business) blog style
    *
    * @since 4.0.6
    * @param string $blogstyle ” | ‘elegant-blog’ | ‘elegant-blog modern-blog’
    * @param avia_post_slider $this
    * @return string ‘show_elegant’ | ‘show_business’ | ‘use_theme_default’ | ‘no_show_cats’
    */
    $show_cats = apply_filters( ‘avf_postslider_show_catergories’, ‘use_theme_default’, $blogstyle, $this );

    switch( $show_cats )
    {
    case ‘no_show_cats’:
    $new_blogstyle = ”;
    break;
    case ‘show_elegant’:
    $new_blogstyle = ‘elegant-blog’;
    break;
    case ‘show_business’:
    $new_blogstyle = ‘elegant-blog modern-blog’;
    break;
    case ‘use_theme_default’:
    default:
    $new_blogstyle = $blogstyle;
    break;
    }

    // elegant style
    if( ( strpos( $new_blogstyle, ‘modern-blog’ ) === false ) && ( $new_blogstyle != “” ) )
    {
    $output .= $meta_out;
    }

    $output .= “<h3 class=’slide-entry-title entry-title’ $markup>“.$title.”</h3>”;

    // modern business style
    if( ( strpos( $new_blogstyle, ‘modern-blog’ ) !== false ) && ( $new_blogstyle != “” ) )
    {
    $output .= $meta_out;
    }

    $output .= ‘<span class=”av-vertical-delimiter”></span>’;
    }

    $output .= ‘</header>’;

    if($show_meta && !empty($excerpt))
    {
    $meta = “<div class=’slide-meta’>”;
    $meta .= “<div class=’slide-meta-author’>” . get_the_author() . “</div><div class=’slide-meta-del’>/</div>”;
    $markup = avia_markup_helper(array(‘context’ => ‘entry_time’,’echo’=>false, ‘id’=>$the_id, ‘custom_markup’=>$custom_markup));
    $meta .= “<time class=’slide-meta-time updated’ $markup>” .get_the_time(get_option(‘date_format’), $the_id).”</time>”;
    $meta .= “</div>”;

    if( strpos($blogstyle, ‘elegant-blog’) === false )
    {
    $output .= $meta;
    $meta = “”;
    }
    }
    $markup = avia_markup_helper(array(‘context’ => ‘entry_content’,’echo’=>false, ‘id’=>$the_id, ‘custom_markup’=>$custom_markup));
    $excerpt = apply_filters( ‘avf_post_slider_entry_excerpt’, $excerpt, $prepare_excerpt, $permalink, $entry );
    $output .= !empty($excerpt) ? “<div class=’slide-entry-excerpt entry-content’ $markup>”.$excerpt.”</div>” : “”;

    $output .= “</div>”;
    $output .= ‘<footer class=”entry-footer”>’;
    if( !empty($meta) ) $output .= $meta;
    $output .= ‘</footer>’;

    $output .= av_blog_entry_markup_helper( $the_id );

    $output .= “</article>”;

    $loop_counter ++;
    $post_loop_count ++;
    $extraClass = “”;

    if($loop_counter > $columns)
    {
    $loop_counter = 1;
    $extraClass = ‘first’;
    }

    if($loop_counter == 1 || !empty($last))
    {
    $output .=”</div>”;
    }
    }

    $output .= “</div>”;

    if($post_loop_count -1 > $columns && $type == ‘slider’)
    {
    $output .= $this->slide_navigation_arrows();
    }

    global $wp_query;
    if($use_main_query_pagination == ‘yes’ && $paginate == “yes”)
    {
    $avia_pagination = avia_pagination($wp_query->max_num_pages, ‘nav’);
    }
    else if($paginate == “yes”)
    {
    $avia_pagination = avia_pagination($this->entries, ‘nav’);
    }

    if(!empty($avia_pagination)) $output .= “<div class=’pagination-wrap pagination-slider’>{$avia_pagination}</div>”;

    $output .= “</div>”;

    $output = str_replace(‘{{thumbnail}}’, $thumb_fallback, $output);

    wp_reset_query();
    return $output;
    }

    protected function slide_navigation_arrows()
    {
    $html = “”;
    $html .= “<div class=’avia-slideshow-arrows avia-slideshow-controls’>”;
    $html .= ““.__(‘Previous’,’avia_framework’ ).”“;
    $html .= ““.__(‘Next’,’avia_framework’ ).”“;
    $html .= “</div>”;

    return $html;
    }

    //fetch new entries
    public function query_entries($params = array())
    {
    global $avia_config;

    if(empty($params)) $params = $this->atts;

    if(empty($params[‘custom_query’]))
    {
    $query = array();

    if(!empty($params[‘categories’]))
    {
    //get the portfolio categories
    $terms = explode(‘,’, $params[‘categories’]);
    }

    $page = get_query_var( ‘paged’ ) ? get_query_var( ‘paged’ ) : get_query_var( ‘page’ );
    if(!$page || $params[‘paginate’] == ‘no’) $page = 1;

    //if we find no terms for the taxonomy fetch all taxonomy terms
    if(empty($terms[0]) || is_null($terms[0]) || $terms[0] === “null”)
    {
    $terms = array();
    $allTax = get_terms( $params[‘taxonomy’]);
    foreach($allTax as $tax)
    {
    $terms[] = $tax->term_id;
    }

    }

    if($params[‘offset’] == ‘no_duplicates’)
    {
    $params[‘offset’] = false;
    $no_duplicates = true;
    }

    //wordpress 4.4 offset fix
    if( $params[‘offset’] == 0 )
    {
    $params[‘offset’] = false;
    }
    else
    {
    //if the offset is set the paged param is ignored. therefore we need to factor in the page number
    $params[‘offset’] = $params[‘offset’] + ( ($page -1 ) * $params[‘items’]);
    }

    if(empty($params[‘post_type’])) $params[‘post_type’] = get_post_types();
    if(is_string($params[‘post_type’])) $params[‘post_type’] = explode(‘,’, $params[‘post_type’]);

    $orderby = ‘date’;
    $order = ‘DESC’;

    // Meta query – replaced by Tax query in WC 3.0.0
    $meta_query = array();
    $tax_query = array();

    // check if taxonomy are set to product or product attributes
    $tax = get_taxonomy( $params[‘taxonomy’] );

    if( class_exists( ‘WooCommerce’ ) && is_object( $tax ) && isset( $tax->object_type ) && in_array( ‘product’, (array) $tax->object_type ) )
    {
    $avia_config[‘woocommerce’][‘disable_sorting_options’] = true;

    avia_wc_set_out_of_stock_query_params( $meta_query, $tax_query, $params[‘wc_prod_visible’] );

    // sets filter hooks !!
    $ordering_args = avia_wc_get_product_query_order_args( $params[‘prod_order_by’], $params[‘prod_order’] );

    $orderby = $ordering_args[‘orderby’];
    $order = $ordering_args[‘order’];
    }

    if( ! empty( $terms ) )
    {
    $tax_query[] = array(
    ‘taxonomy’ => $params[‘taxonomy’],
    ‘field’ => ‘id’,
    ‘terms’ => $terms,
    ‘operator’ => ‘IN’
    );
    }

    $query = array( ‘orderby’ => $orderby,
    ‘order’ => $order,
    ‘paged’ => $page,
    ‘post_type’ => $params[‘post_type’],
    // ‘post_status’ => ‘publish’,
    ‘offset’ => $params[‘offset’],
    ‘posts_per_page’ => $params[‘items’],
    ‘post__not_in’ => ( ! empty( $no_duplicates ) ) ? $avia_config[‘posts_on_current_page’] : array(),
    ‘meta_query’ => $meta_query,
    ‘tax_query’ => $tax_query
    );

    }
    else
    {
    $query = $params[‘custom_query’];
    }

    $query = apply_filters(‘avia_post_slide_query’, $query, $params);

    @$this->entries = new WP_Query( $query ); //@ is used to prevent errors caused by wpml

    // store the queried post ids in
    if( $this->entries->have_posts() )
    {
    while( $this->entries->have_posts() )
    {
    $this->entries->the_post();
    $avia_config[‘posts_on_current_page’][] = get_the_ID();
    }
    }

    if( function_exists( ‘WC’ ) )
    {
    avia_wc_clear_catalog_ordering_args_filters();
    $avia_config[‘woocommerce’][‘disable_sorting_options’] = false;
    }
    }
    }
    }

    #1009325

    Hi,

    Unfortunately without success.

    I put snippets of code that is in CODEBLOCK.
    It is easy to see that with each simple click on the Upgrade button of the page (without changing anything at all) the tags will multiply (1,2,4,8,16,32,64,128 …) after some modifications, the page does not open due to lack of memory and consumes more than 1Gb to be executed.

    THE ORIGINAL CODE

    box: '<div class="fileuploader-items">' +
    						  '<ul class="fileuploader-items-list">' +
    								'<li class="fileuploader-thumbnails-input"><div class="fileuploader-thumbnails-input-inner thumbnail_after exame_gravidez_box">+</div></li>' +
    						  '</ul>' +
    					  '</div>',
    				item: '<li class="fileuploader-item">' +

    After the first save

    			
    				box: '</p>
    <div class="fileuploader-items"><p>' +
    						  '</p>
    <ul class="fileuploader-items-list">' +
    								'</p>
    <li class="fileuploader-thumbnails-input">
    <div class="fileuploader-thumbnails-input-inner thumbnail_after exame_gravidez_box">+</div>
    </li>
    <p>' +
    						  '</ul>
    <p>' +
    					  '</div>
    <p>',
    				item: '</p>
    <li class="fileuploader-item">' +

    After the second save

    
    				box: '</p>
    <p>
    </p>
    <div class="fileuploader-items">
    <p>' +
    						  '</p>
    <p>
    </p>
    <ul class="fileuploader-items-list">' +
    								'</p>
    <p>
    </p>
    <li class="fileuploader-thumbnails-input">
    <br />
    <div class="fileuploader-thumbnails-input-inner thumbnail_after exame_gravidez_box">+</div>
    <p>
    </li>
    <p>
    </p>
    <p>' +
    						  '</ul>
    <p>
    </p>
    <p>' +
    					  '</div>
    <p>
    </p>
    <p>',
    				item: '</p>
    <p>
    </p>
    <li class="fileuploader-item">' +

    After the third save

    
    				box: '</p>
    <p>
    </p>
    <div class="fileuploader-items">
    <p>' +
    						  '</p>
    <p>
    </p>
    <ul class="fileuploader-items-list">' +
    								'</p>
    <p>
    </p>
    <li class="fileuploader-thumbnails-input">
    <br />
    <div class="fileuploader-thumbnails-input-inner thumbnail_after exame_gravidez_box">+</div>
    <p>
    </li>
    <p>
    </p>
    <p>' +
    						  '</ul>
    <p>
    </p>
    <p>' +
    					  '</div>
    <p>
    </p>
    <p>',
    				item: '</p>
    <p>
    </p>
    <li class="fileuploader-item">'

    After the fourth save

    box: '</p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <div class="fileuploader-items">
    <p>
    </p>
    <p>
    </p>
    <p>' +
    						  '</p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <ul class="fileuploader-items-list">' +
    								'</p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <li class="fileuploader-thumbnails-input">
    <br />
    <br />
    <br />
    <div class="fileuploader-thumbnails-input-inner thumbnail_after exame_gravidez_box">+</div>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </li>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>' +
    						  '</ul>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>' +
    					  '</div>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>',
    				item: '</p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <li class="fileuploader-item">' +
    #1009080
    Dependable
    Participant

    Hello,

    I’m trying to put my post titles as an overlay on the post thumbnail in the post slider. Can you help me figure out how to do this? I tried the code that Ismael provided here, but it doesn’t seem to be working: https://kriesi.at/support/topic/move-post-slider-text-content-into-thumbnail/

    Basically, I want my post sliders to function something like this: https://blog.barre3.com/recipes/

    Here’s the page I’m trying to do this on: https://dev.champagneyogi.com/nourish/recipes/

    Thank you!

    -Brad

    Thanks Ismael, switching the thumbnail size solved most of the problems. Thanks also for great support in general.

    A few issues remain for me:

    1. layout/colums switching
    This remains a problem. When I resize the width in Firefox to the smallest size, I get one column, thats fine. Then I increase the width. At some point the switch is made to a two-column layout. EXCEPT for the first item which occupies the whole width. This is not good. Increasing width further, we get three columns, fine. Increasing further, we get six columns, great! But then when I increase the width further, it jumps back to five columns. When I do the same thing in Safari, everything is good, EXCEPT the two-column-layout which also has the first picture occupying the first row completely. Same thing on iPhone sideways.

    The 5-6 column switching I can work around by setting the layout to 5 columns. It’s ok for me.
    The bug in the two-column view I find not acceptable. Is there something you can do about that?

    2. spacing between items
    The space between items is not consistent with the standard settings. Sometimes the pictures are exactly adjacent to each other, sometimes there is a narrow white space in between them.

    As a workaround, I made a 20 pixel margin between them as I posted earlier, and that fixes that.

    3. size of the text field under thumbnails
    The size is consistent as long as there is only one line everywhere. With different screen sizes however, it can be that some items have two lines of text, and others one. They appear with different sizes of the text field which breaks the evenness of the grid. Ideally all fields should be equal to the biggest field in a row. Is there anything that can be done about that?

    Thanks!

    Carl.

    PS.: for who wants to look at the website, the URL is videotonart.de under “portfolio”.

    • This reply was modified 7 years, 6 months ago by videotonart.
    #1008431
    Linseed_Studio
    Participant

    Hi,
    I think I’ve run into this problem before but it’s happened again and I’m not sure why it keeps happening or what to do to fix it. My admin panel said that I had to update the Contact Form 7 plugin so I did. It said there was an error (“couldn’t copy file”) and when I now look at the list of plugins the Contact Form 7 one isn’t there. My live site now has the slideshow missing, the contact accordion menu doesn’t open, thumbnails don’t show up in galleries, etc. Please let me know what I can do in this situation. Thanks!

    #1008145

    In reply to: Symmetrical portfolio

    Hi,

    Select the “portfolio_small” thumbnail of the “portfolio” and “post” custom post type. Again, you have to make sure that the “portfolio_small” thumbnail is selected in the portfolio grid options after regenerating the images.

    Best regards,
    Ismael

    #1007922

    Hi,

    Please add this code to your child theme:

    
    
    function avia_display_image_copyright( $atts ) 
    {
    	$atts = shortcode_atts(array('id' => ''), $atts);
    	$copyright_text = '';
    
    	if(!empty($atts['id']))
    	{
    		$copyright_text = get_post_meta($atts['id'], '_avia_attachment_copyright', true );
    	}
    	else
    	{
          if(has_post_thumbnail())
          {
            $post_thumbnail_id = get_post_thumbnail_id();
            $copyright_text = get_post_meta($post_thumbnail_id, '_avia_attachment_copyright', true );
          }
    	}
    
    	return $copyright_text;
    }
    add_shortcode( 'av_display_image_copyright', 'avia_display_image_copyright' );
    

    You can then use this shortcode:

    
    [av_display_image_copyright]
    

    to display the copyright information of the featured image. If you want to display the copyright information of another image (which is not the featured image) you can use this code:

    
    [av_display_image_copyright id=852]
    

    and replace 852 with the (attachment) id of the image.

    Best regards,
    Peter

    #1007917
      I forgot to mention this:

    When I test the gallery pages, I’ve noticed that ALL the images are being loaded as soon as you load the page, which truly surprised me. I was under the impression that if I set my gallery to Big Preview Image, No Thumbnails that all the other images would NOT be loaded until a user clicks on a gallery and opens the lightbox. Do I have to enable lazy loading somewhere in the settings or is this just how the gallerys work?

    I’ve attached a WebPageTest result for one of the pages in question. In the waterfall view you can clearly see how the entire gallery (all the images) are being loaded, even though they’re “hidden away” in the lightbox.

    #1007913
    tixxpff
    Participant

    Hi there,
    I need a recommendation for a best practice. Here’s my situation:

    On my website, I have several inner pages with (multiple) image gallerys on them. Each gallery element (big preview image, no thumbnail images, lightbox opens on click) currently contains about 100-250 images. These pages take really long to load and I’d like to fix that, but I’m not quite sure how. I think the problem is either the number of gallery elements on the page or the number of images in total, so I see 2 possible solutions:
    1. Reduce the total number of images
    2. Reduce the number of image gallery elements (i.e. merge gallerys together)


    Maybe you guys can help me understand from a developer standpoint which of the two takes a bigger toll on page speed. And if there’s a better solution than the two I’ve proposed I’d love to hear that, too!

    Thank you!

    #1007747

    Hi,

    The login credentials are invalid. Please check it carefully. Have you tried selecting a larger thumbnail before inserting the image?

    Best regards,
    Ismael

    Hi,

    The grid is more consistent when the “portfolio_small” thumbnail size is selected. You have to upload a larger image if you want to select a larger thumbnail size.

    Best regards,
    Ismael

    #1007723

    In reply to: Symmetrical portfolio

    Hi,

    Edit the portfolio and then select the “portfolio_small” thumbnail.

    Best regards,
    Ismael

    #1007613

    Hi,

    I fixed b adding this code to the child theme functions.php:

    
    add_filter('wpseo_twitter_image', 'avia_set_yoast_og_image', 10, 1);
    add_filter('wpseo_opengraph_image', 'avia_set_yoast_og_image', 10, 1);
    function avia_set_yoast_og_image($url)
    {	
    	if(has_post_thumbnail())
    	{
    		return get_the_post_thumbnail_url();
    	}
    
    	return $url;
    }
    
    

    Please note: In the backend (wordpress editor page) you won’t see any changes on existing posts/pages. The reason is Yoast saves the social data (facebook image, title, etc.) to a post meta and you would need to reset this data to see the changes (please ask the Yoast support how to reset the og meta data which is used in the settings panel). Also Facebook uses a cache for the shared entries. You can use this tool: https://developers.facebook.com/tools/debug/sharing to refresh the cache (click on “scrape again”) and reload the page several times, sometimes you need to click on “scrape again” two times.

    I tested the fix on this page and it works http://www.gonulturgut.com.tr/atolyelerimiz/sanat-atolyeleri/oynarken-ogrenme-atolyesi/ (in the frontend; the backend shows the old image because of the reasons I mentioned above).

    Best regards,
    Peter

Viewing 30 results - 2,731 through 2,760 (of 10,096 total)