-
Search Results
-
Topic: Thumbnail size in galleries
Hi,
I have a site with a lot of galleries (Avia Layout Architect -> Gallery). I always used 3 columns and the no-scaling-option and although the pictures are not squared, I would get perfectly squared thumbs as in: https://blumen-hegemann.de/floristik/straeusse/
Wordpress offered a 450×450.jpg, the gallery used this and everything was fine.Now after the last theme-update this doesn’t work anymore and I get what the option says: no-scaled-thumbs. So I look for alternatives, but none of them work. The only squared thumbs I can get are 180×180.jpg and these are too low in resolution. Everything else is rectangular (if the original picutre is).
So what can I do? All I want is a gallery with square thumbnails in appr. 450px size and good resolution – no matter what the originals picture-size is.
Thanks for your help,
DanielHi,
I am using this function but the output appears on top of the page right after #main is opened and not in the element I placed the shortcode.
What is wrong with the code?function evenementen() { $today = current_time('Ymd'); $args = array( 'post_type' => 'evenementen', 'posts_per_page' => '4', 'meta_key' => 'datum_evenement', 'order' => 'DESC', 'orderby' => 'meta_value', 'meta_query' => array( array( 'key' => 'datum_evenement', 'compare' => '>=', 'value' => $today, ), ), ); $children = new WP_Query($args); ?> <?php if ($children->have_posts()) : ?> <?php while ($children->have_posts()) : $children->the_post(); $fields = (object) get_fields(); ?> <div class="event row"> <div class="event-logo col-sm-4"> <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'large', array( 'class' => 'img-responsive' ) ); ?></a> </div> <div class="event-details col-sm-8"> <h3 class="underline"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> <h5><?php the_field('datum_evenement'); ?></h5> <p class="call-to-action"><a href="<?php the_permalink(); ?>">Read More</a></p> </div> </div> <?php endwhile; wp_reset_postdata(); ?> <?php endif; ?> <?php } add_shortcode('nm2d_evenementen', 'evenementen');Hi
after i updated your theme the layout is completly crashed.
Examples:
– What has been a gallery with miniatures before is now one long row of big images below each other.
-Lightboxes dont work anymore
-The whole layout structure is foobar!
If i look in the backend everything looks fine, the ALB shows everything as its supposed to be, but the output in the frontend is horrible.
Please check at first if there is something in our childthemes functions.php which maybe doesnt work anymore and which could cause that conflict.
The problem arises only on pages that uses a custom post type. The developer of the plugin says its a theme issueHere it is:
<?php //$avia_config['imgSize']['square-custom'] = array('width'=>300, 'height'=>300); // small image for blogs //$avia_config['imgSize']['square2'] = array('width'=>400, 'height'=>400); // small image for blogs /* * Add your own functions here. You can also copy some of the theme functions into this file. * WordPress will use those functions instead of the original functions then. */ function enqueue_parent_theme_style() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); } add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style'); /* Proper way to enqueue styles and scripts */ function theme_name_scripts() { wp_enqueue_style( 'style-name', get_stylesheet_uri() ); } add_action( 'wp_enqueue_scripts', 'theme_name_scripts' ); /* Activate Avia debug mode */ add_action('avia_builder_mode', "builder_set_debug"); function builder_set_debug() { return "debug"; } add_filter('avf_builder_boxes', 'add_builder_to_posttype'); function add_builder_to_posttype($metabox) { foreach($metabox as &$meta) { if($meta['id'] == 'avia_builder' || $meta['id'] == 'layout') { $meta['page'][] = 'angebot'; /*instead add the name of the custom post type here*/ $meta['page'][] = 'bild-des-tages'; /*instead add the name of the custom post type here*/ } } return $metabox; } add_filter('avf_blog_style','avia_change_category_blog_layout', 10, 2); function avia_change_category_blog_layout($layout, $context){ if($context == 'archive') $layout = 'blog-grid'; return $layout; } add_filter('avf_blog_style','avia_change_tag_blog_layout', 10, 2); function avia_change_tag_blog_layout($layout, $context){ if($context == 'tag') $layout = 'blog-grid'; return $layout; } /* Länge des Auszug auf Blogseite */ add_filter('avf_postgrid_excerpt_length','avia_change_postgrid_excerpt_length', 10, 1); function avia_change_postgrid_excerpt_length($length) { $length = 100; return $length; } /* Doppelten Breadcrumb entfernt */ add_filter( 'avia_breadcrumbs_trail', 'mmx_remove_element_from_trail', 50, 2 ); function mmx_remove_element_from_trail( $trail, $args ) { if ( is_single() ) { unset ($trail[2]); } return $trail; } add_filter('avf_form_use_wpmail', 'avia_change_php_mail', 10, 3); function avia_change_php_mail($active, $new_post, $form_params){ return true; } add_theme_support('avia_template_builder_custom_css'); add_filter('avf_logo_subtext', 'kriesi_logo_addition'); function kriesi_logo_addition($sub) { $sub .= "<div id='headText'> <a href='http://www.maskenzauber.com'><h1>Venezianische<span> Masken</span></h1></a> <span id='subslogan'>und Headdresses</span> </div>"; $sub .= "<div id='headClaim'> <strong>Hier kommt</strong> eine Unterzeile hin </div>"; return $sub; } add_filter('avf_title_args','fotos_remove_bc'); function fotos_remove_bc($args){ if(is_single() && 'post' == get_post_type()) { $args['breadcrumb'] = false; } return $args; } add_filter('avf_title_args','fotosangebot_remove_bc'); function fotosangebot_remove_bc($args){ if(is_single() && 'angebot' == get_post_type()) { $args['breadcrumb'] = false; } return $args; } //entfernt den Kommentarblock und die Datumsangaben aus dem Combo Widget // class avia_combo_widget extends WP_Widget { function avia_combo_widget() { //Constructor $widget_ops = array('classname' => 'avia_combo_widget', 'description' => 'A widget that displays your popular posts, recent posts, recent comments and a tagcloud' ); $this->WP_Widget( 'avia_combo_widget', THEMENAME.' Combo Widget', $widget_ops ); } function widget($args, $instance) { // prints the widget extract($args, EXTR_SKIP); $posts = empty($instance['count']) ? 4 : $instance['count']; echo $before_widget; echo "<div class='tabcontainer border_tabs top_tab tab_initial_open tab_initial_open__1'>"; echo '<div class="tab first_tab active_tab widget_tab_popular"><span>'.__('Popular', 'avia_framework').'</span></div>'; echo "<div class='tab_content active_tab_content'>"; avia_get_post_list('cat=&orderby=comment_count&posts_per_page='.$posts); echo "</div>"; echo '<div class="tab widget_tab_recent"><span>'.__('Recent', 'avia_framework').'</span></div>'; echo "<div class='tab_content'>"; avia_get_post_list('showposts='. $posts .'&orderby=post_date&order=desc'); echo "</div>"; echo '<div class="tab last_tab widget_tab_tags"><span>'.__('Tags', 'avia_framework').'</span></div>'; echo "<div class='tab_content tagcloud'>"; wp_tag_cloud('smallest=12&largest=12&unit=px'); echo "</div>"; echo "</div>"; echo $after_widget; } function update($new_instance, $old_instance) { $instance = $old_instance; foreach($new_instance as $key=>$value) { $instance[$key] = strip_tags($new_instance[$key]); } return $instance; } function form($instance) { //widgetform in backend $instance = wp_parse_args( (array) $instance, array('count' => 4) ); if(!is_numeric($instance['count'])) $instance['count'] = 4; ?> <p> <label for="<?php echo $this->get_field_id('count'); ?>">Number of posts you want to display: <input class="widefat" id="<?php echo $this->get_field_id('count'); ?>" name="<?php echo $this->get_field_name('count'); ?>" type="text" value="<?php echo esc_attr($instance['count']); ?>" /></label></p> <?php } } function avia_get_post_list( $avia_new_query , $excerpt = false) { global $avia_config; $image_size = isset($avia_config['widget_image_size']) ? $avia_config['widget_image_size'] : 'widget'; $additional_loop = new WP_Query($avia_new_query); if($additional_loop->have_posts()) : echo '<ul class="news-wrap">'; while ($additional_loop->have_posts()) : $additional_loop->the_post(); $format = ""; if(get_post_type() != 'post') $format = get_post_type(); if(empty($format)) $format = get_post_format(); if(empty($format)) $format = 'standard'; echo '<li class="news-content post-format-'.$format.'">'; //check for preview images: $image = ""; if(!current_theme_supports('force-post-thumbnails-in-widget')) { $slides = avia_post_meta(get_the_ID(), 'slideshow'); if( $slides != "" && !empty( $slides[0]['slideshow_image'] ) ) { $image = avia_image_by_id($slides[0]['slideshow_image'], 'widget', 'image'); } } if(!$image && current_theme_supports( 'post-thumbnails' )) { $image = get_the_post_thumbnail( get_the_ID(), $image_size ); } $time_format = apply_filters( 'avia_widget_time', get_option('date_format')." - ".get_option('time_format'), 'avia_get_post_list' ); $nothumb = (!$image) ? 'no-news-thumb' : ''; echo "<a class='news-link' title='".get_the_title()."' href='".get_permalink()."'>"; echo "<span class='news-thumb $nothumb'>"; echo $image; echo "</span>"; echo "<strong class='news-headline'>".avia_backend_truncate(get_the_title(), 55," "); //echo "<span class='news-time'>".get_the_time($time_format)."</span>"; echo "</strong>"; echo "</a>"; if('display title and excerpt' == $excerpt) { echo "<div class='news-excerpt'>"; the_excerpt(); echo "</div>"; } echo '</li>'; endwhile; echo "</ul>"; wp_reset_postdata(); endif; } //erzeugt Next / Preview Links in Blogposts auch bei Verwendung von Fullwidth-Slider // if(!function_exists('avia_post_nav')) { function avia_post_nav($same_category = false, $taxonomy = 'category') { global $wp_version; $settings = array(); $settings['same_category'] = $same_category; $settings['excluded_terms'] = ''; $settings['wpversion'] = $wp_version; $settings['type'] = get_post_type(); $settings['taxonomy'] = ($settings['type'] == 'portfolio') ? 'portfolio_entries' : $taxonomy; if(!is_singular() || is_post_type_hierarchical($settings['type'])) $settings['is_hierarchical'] = true; if($settings['type'] === 'topic' || $settings['type'] === 'reply') $settings['is_bbpress'] = true; $settings = apply_filters('avia_post_nav_settings', $settings); if(!empty($settings['is_bbpress']) || !empty($settings['is_hierarchical']) || !empty($settings['is_fullwidth'])) return; if(version_compare($settings['wpversion'], '3.8', '>=' )) { $entries['prev'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); $entries['next'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); } else { $entries['prev'] = get_previous_post($settings['same_category']); $entries['next'] = get_next_post($settings['same_category']); } $entries = apply_filters('avia_post_nav_entries', $entries, $settings); $output = ""; foreach ($entries as $key => $entry) { if(empty($entry)) continue; $the_title = isset($entry->av_custom_title) ? $entry->av_custom_title : avia_backend_truncate(get_the_title($entry->ID),75," "); $link = isset($entry->av_custom_link) ? $entry->av_custom_link : get_permalink($entry->ID); $image = isset($entry->av_custom_image) ? $entry->av_custom_image : get_the_post_thumbnail($entry->ID, 'thumbnail'); $tc1 = $tc2 = ""; $class = $image ? "with-image" : "without-image"; $output .= "<a class='avia-post-nav avia-post-{$key} {$class}' href='{$link}' >"; $output .= " <span class='label iconfont' ".av_icon_string($key)."></span>"; $output .= " <span class='entry-info-wrap'>"; $output .= " <span class='entry-info'>"; $tc1 = " <span class='entry-title'>{$the_title}</span>"; if($image) $tc2 = " <span class='entry-image'>{$image}</span>"; $output .= $key == 'prev' ? $tc1.$tc2 : $tc2.$tc1; $output .= " </span>"; $output .= " </span>"; $output .= "</a>"; } return $output; } } add_filter('avf_debugging_info', 'remove_debugging_info', $info); function remove_debugging_info($info) { $info = ''; return $info; } remove_action( 'init', 'cptui_create_custom_post_types', 10 ); add_action( 'init', 'cptui_create_custom_post_types', 11 ); // Nach Dateinamen in der Mediathek suchen function posts_search_media_filenames($search, $a_wp_query) { global $wpdb, $pagenow; // Only Admin side && Only Media Library page if ( !is_admin() && 'upload.php' != $pagenow ) return $search; // Original search string: // AND (((wp_posts.post_title LIKE '%search-string%') OR (wp_posts.post_content LIKE '%search-string%'))) $search = str_replace( 'AND ((', 'AND (((' . $wpdb->prefix . 'posts.guid LIKE \'%' . $a_wp_query->query_vars['s'] . '%\') OR ', $search ); return $search; } add_filter('posts_search', 'posts_search_media_filenames', 10, 2); // Sortiert alle Bilder in der masonry-Galerie nach Zufall add_filter('avia_masonry_entries_query', 'avia_random_image_query', 10, 2); function avia_random_image_query($query, $params) { if(!empty($query['post_mime_type']) && $query['post_mime_type'] == 'image') { $query['orderby'] = "rand"; } return $query; } function remove_avia_search(){ remove_filter( 'wp_nav_menu_items', 'avia_append_search_nav', 10, 2 ); } add_action( 'init' , 'remove_avia_search' ); add_filter( 'avf_main_menu_nav' , 'um_enfold_menu' , 100 , 1 ); function um_enfold_menu( $menu ){ $menu = ubermenu( 'main' , array( 'theme_location' => 'avia' , 'echo' => false ) ); return $menu; } add_image_size( 'my-ubermenu-image-size', 100, 100, true );Topic: cropping thumbnails?
hello
on this page, in the galery, i want all the thumbs to be square.
why are the last 3 thumbnails of the galery recalcitrant/not obeying?
i choose in settings: Shop Catelog 450×450 , that should be square, shouldnt it? but they are not cropping.
best regards, jelle vanhijfteTopic: Outline css over image
hi guys,
I’m wondering if you might be able to help me figure out why my outline css is going underneath the image and not above it. I have the following css entered:
.attorney-thumbnail.active { outline-style: solid !important; outline-color: white !important; outline-width: 2px !important; outline-offset: -10px !important; }It looks like the outline is having z-index issues or something because it’s not showing on the image. Would someone be able to lend a hand with this? Thanks :)
Topic: Thumbnail not round anymore
Suddenly the thumbnails in the events calendar and the catalogue widget in Enfold is not showing up as round anymore. They are oval, either vertical or horizontal. Any idea why this is happening and how can I get it back to being round.
The old ones stay round, it is new events and new catalogue items that is showing oval thumbnails.
As you can see on this page, the top one is circle, the second one is oval. I need them all to be a circle.
Also, featured images set in a post and showing up in a blog-post widget on the front page does no longer conform to equal height and width as it did before. https://www.spatind1414.no
Regards
NinaTopic: Edit category pages
Hello Kriesi-Forum,
I would like to edit the category pages of the blog.
– The blog thumbnail is not displayed in the category subpages.
– I would like to have the menus “Last entries” and “All categories” on the left side in the free area. Like in the blog page.Thanks a lot!
SarahHello,
I just started optimizing the images in webp format with the Google squoosh application to make things easier. The main image shows well in all browsers, I have tested it in Firefox, Opera, Explorer, Yandex, brave and Chrome. But the thumbnails of the image are not displayed.
The image has the right format so the problem must be another, what can I do? Thanks!
Hello. On my page I have added a color element. At desktop screen widths, there is some space between the thumbnail image and the previous element (screenshot). But at mobile screen widths (>768 px), there is no space between the thumbnail image and the previous element (screenshot). Is there a way within the theme/page builder to add some top padding to the element at these screen widths? Or would I have to simply add my own custom CSS?
Thanks.
Topic: Enfold Category styling
I have category images for each product category. This is very nice in the product page, but there is no way to hide this inside the category. Seems like must have this visible, either as a big thumbnail or as a fullsize wide header image inside the category.
I would like to hide it and just show the products.Any help would be delightful :)
Roger Enger Lie
Norway


