Viewing 30 results - 31 through 60 (of 247 total)
  • Author
    Search Results
  • Hi Mike,

    You’ll need to override the Blog and Magazine Element.
    Please do the preparatory stuff that is written in our document: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb
    After doing that, (from the Enfold theme, location: enfold > config-templatebuilder > avia-shortcodes folder) copy both magazine and postslider folder and paste it in the shortcodes folder of the child theme.
    Then in the child theme edit postslider.php and find this code (line 699 in Enfold 4.7.2):

    $output .= $thumbnail ? "<a href='{$link}' data-rel='slide-".avia_post_slider::$slide."' class='slide-image' title=''>{$thumbnail}</a>" : '';

    replace with:

    $output .= $thumbnail ? "<a href='{$link}' data-rel='slide-".avia_post_slider::$slide."' class='slide-image' title='{$title}'>{$thumbnail}</a>" : '';

    Then again, in the child theme edit magazine.php and find this code (line 1056 in Enfold 4.7.2):

    $titleAttr = "title='".__( 'Link to:','avia_framework' )." ".the_title_attribute(array('echo' => 0, 'post' => $entry->ID)) . "'";

    replace with:

    $titleAttr = "title='".the_title_attribute(array('echo' => 0, 'post' => $entry->ID)) . "'";

    Hope this helps.

    Best regards,
    Nikko

    tjswarbs78
    Participant

    Hi,

    I have a custom field that I am inserting into various elements on site. It’s a field that adds a read time to all blogs.

    I’m using an If / Else statement to say…

    If a value is set for read time echo the value if not, do nothing.

     $k3read = get_post_meta($the_id, 'k3read', true);
      if (empty($k3read)){  
      echo "";
      }
     else{
     echo "<span class='k3-cptc'>{$k3read} MINUTE READ</span>";
     echo "<span class='text-sep text-sep-comment'>/</span>";
     }

    That has worked a treat in loop-index.php and loop-search.php.
    However in postslider.php the original code is slightly different and what ever I do breaks something.
    How do I change the if / else statement to fit into the code below?

    if ( $commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio')
    							
    						{
    							$link_add = $commentCount === "0" ? "#respond" : "#comments";
    							$text_add = $commentCount === "1" ? __('Comment', 'avia_framework' ) : __('Comments', 'avia_framework' );
    							$linkedin = get_post_meta($the_id, 'linkurl', true);
    							$k3read = get_post_meta($the_id, 'k3read', true);
    							$meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add}</a></div><div class='slide-meta-del'>/</div><span class='k3-cpt'>{$linkedin}</span><span class='k3-cptb'>{$k3read} minutes read</span>";
    						}
                            $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>";

    Thanks

    TJ

    #1158137
    goingthewholehogg
    Participant

    Hello,

    Normally when we update Enfold, we add some code into the postslider.php file in config-templatebuilder > aviashortcodes, to display the date the way we want it. However, after recently updating, we noticed that the code has changed above the place where we usually put it.

    We normally add this code:

    $output .= “<time class=’slide-meta-time updated’ $markup>” .get_the_time(get_option(‘date_format’), $the_id).”</time>”;

    Below this code:

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

    However, the above code has changed. The code at line 600 in the postslider.php file is now this:

    $output .= “<{$heading} class=’slide-entry-title entry-title {$css}’ $markup>“.$title.”</{$heading}>”;

    It’s very similar but different. Is it okay to still add the same code as before? I hope that’s clear.

    Thanks,

    Del

    #1148096

    Hi,

    Thank you for the update.

    For the image element, you need to modify the image > image.php file in the same directory. Look for this code around line 515:

    if($link)
    						{
    							$output.= "<a href='{$link}' class='avia_image'  {$blank}>{$overlay}<img class='avia_image ' src='{$src}' alt='{$alt}' title='{$title}' $markup_url /></a>";
    						}
    						else
    						{
    							$hw = "";
    							if(!empty($img_h)) $hw .= 'height="'.$img_h.'"';
    							if(!empty($img_w)) $hw .= ' width="'.$img_w.'"';
    
    							$output.= "{$overlay}<img class='avia_image' src='{$src}' alt='{$alt}' title='{$title}' {$hw} $markup_url />";
    						}
    

    Replace it with:

    if($link)
    						{
    							$output.= "<a href='{$link}' class='avia_image'  {$blank}>{$overlay}<img class='avia_image ' src='{$src}' alt='{$alt}' title='{$title}' $markup_url width='{$image_attributes[1]}' height='{$image_attributes[2]}' /></a>";
    						}
    						else
    						{
    							$hw = "";
    							if(!empty($img_h)) $hw .= 'height="'.$img_h.'"';
    							if(!empty($img_w)) $hw .= ' width="'.$img_w.'"';
    
    							$output.= "{$overlay}<img class='avia_image' src='{$src}' alt='{$alt}' title='{$title}' {$hw} $markup_url width='{$image_attributes[1]}' height='{$image_attributes[2]}' />";
    						}
    

    Best regards,
    Ismael

    #1138557
    Maskenzauber
    Participant

    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 issue

    Here 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 );
    #1118726

    Hi Ismael,

    That’s the same code i originally tried but didn’t work…

    $cptlink = get_post_meta($post->ID, 'linkedinurl', true);
    $meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add} {$cptlink}</a></div><div class='slide-meta-del'>/</div>";

    The code you supplied does work but they look identical to me! The CF pulls through correctly.
    As always you’ve done first class support. 5 stars mate

    Thanks

    TJ

    #1118645

    Hi,

    Thanks for the update.

    You don’t have to add the echo function because you’re supposed to concatenate the value of the field to the $meta string or text.

    
    $linkedin = get_post_meta($post->ID, 'linkedinurl', true);
    $meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add} </a>{$linkedin}</div><div class='slide-meta-del'>/</div>";
    

    Best regards,
    Ismael

    #1116039

    Hi all,

    I’ve only just got back to this after 7 months and I need some help.

    I know from Dude’s reply I’m in the right place and I’ve found the code that I need to tweak. This has been confirmed by sticking some text in there that does show in blog grid meta.

    Code to tweak

    if($show_meta && !empty($excerpt))
    					{
    						$meta  = "<div class='slide-meta'>";
    						if ( $commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio')
    						{
    							$link_add = $commentCount === "0" ? "#respond" : "#comments";
    							$text_add = $commentCount === "1" ? __('Comment', 'avia_framework' ) : __('Comments', 'avia_framework' );
    							$meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add}</a><p>TEST</p></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 = "";
    						}

    Result

    Capture4587

    Nice one, stage one complete.

    Stage two is to get the custom field data to show where TEST is and this is where I’m coming unstuck.
    No matter which code I use the custom field data doens’t show. I’ve tried various formats of the code and none work.
    See examples below….

      if($show_meta && !empty($excerpt))
    					{
    						$meta  = "<div class='slide-meta'>";
    						if ( $commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio')
    						{
    							$link_add = $commentCount === "0" ? "#respond" : "#comments";
    							$text_add = $commentCount === "1" ? __('Comment', 'avia_framework' ) : __('Comments', 'avia_framework' );
    							$cptlink = get_post_meta( get_the_ID(), 'linkedinurl', true);
    							$meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add} {$cptlink}</a></div><div class='slide-meta-del'>/</div>";
    						}
     if($show_meta && !empty($excerpt))
    					{
    						$meta  = "<div class='slide-meta'>";
    						if ( $commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio')
    						{
    							$link_add = $commentCount === "0" ? "#respond" : "#comments";
    							$text_add = $commentCount === "1" ? __('Comment', 'avia_framework' ) : __('Comments', 'avia_framework' );
    							$cptlink = get_post_meta($post->ID, 'linkedinurl', true);
    							$meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add} {$cptlink}</a></div><div class='slide-meta-del'>/</div>";
    						}
     if($show_meta && !empty($excerpt))
    					{
    						$meta  = "<div class='slide-meta'>";
    						if ( $commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio')
    						{
    							$link_add = $commentCount === "0" ? "#respond" : "#comments";
    							$text_add = $commentCount === "1" ? __('Comment', 'avia_framework' ) : __('Comments', 'avia_framework' );
    							$meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add} </a><?php echo get_post_meta($post->ID, 'linkedinurl', true); ?></div><div class='slide-meta-del'>/</div>";
    						}

    So the question is how can I get data from the custom field called ‘linkedinurl’ to show?
    The custom field is on a custom post type does that matter? A little help pointing me in the right direction would be super :)

    Thanks

    Tim

    #1116028

    Hi,

    In file enfold\config-templatebuilder\avia-shortcodes\buttonrow\buttonrow.php at the bottom look for:

    
     $output .=	"<a href='{$link}' {$data} class='avia-button {$extraClass} " . $this->class_by_arguments('icon_select, color, size', $atts, true) . "' {$blank} {$style} >";
    

    and replace with:

    
     $output .=	"<a title='{$atts['label']}' href='{$link}' {$data} class='avia-button {$extraClass} " . $this->class_by_arguments('icon_select, color, size', $atts, true) . "' {$blank} {$style} >";
    

    Could be that adding a title to buttons will become part of the core. Check for changelog and options in the elements.

    Best regards,
    Günter

    #1115115

    Hi Rikard,

    Thanks for your message, but I’m still struggling with this one.

    I edited /config-templatebuilder/avia-shortcodes/buttons/button.php with the following code which does add a link title to single buttons:

    $output = “”;
    $output .= “class_by_arguments(‘icon_select, color, size, position’ , $atts, true).”‘ {$blank} {$style} >”;
    $output .= “<span class=’avia_button_icon’ {$display_char}></span>”;
    $output .= “<span class=’avia_iconbox_title’ >”.$atts[‘label’].”</span>”;
    $output .= “
    “;

    However, the code in /config-templatebuilder/avia-shortcodes/buttonrow/buttonrow.php is slightly different to the single button code. I can see that it’s not too complicated, I just don’t want to break the site.

    Thanks Rikard,
    Johnny

    #1114121

    I figured it out. Hopefully this will help someone. I had to piece together a few threads to figure this out. The code that needs to be changed is in “functions-enfold.php” but I didn’t want my changes to be overwritten by a theme update so I copied the entire “avia_post_nav” section from “functions-enfold.php” into the “functions.php” file of my child theme because apparently “functions-enfold.php” file is not recognized in child themes and I learned you can copy functions from functions-enfold.php into the the function.php file, which is recognized by the child theme.

    So, I copied this entire section from functions-enfold.php into child theme functions.php:

    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;
            
    		//dont display if a fullscreen slider is available since they overlap 
    		if((class_exists('avia_sc_layerslider') && !empty(avia_sc_layerslider::$slide_count)) || 
    			class_exists('avia_sc_slider_full') && !empty(avia_sc_slider_full::$slide_count) ) $settings['is_fullwidth'] = true;
    
    		$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['next'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']);
    	            $entries['prev'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']);
    	        }
    	        else
    	        {
    	            $entries['next'] = get_previous_post($settings['same_category']);
    	            $entries['prev'] = 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;
    	}
    }
    

    and then, replaced this:

    {
    	            $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']);
    	        }

    with this:

    {
    	            $entries['next'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']);
    	            $entries['prev'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']);
    	        }
    	        else
    	        {
    	            $entries['next'] = get_previous_post($settings['same_category']);
    	            $entries['prev'] = get_next_post($settings['same_category']);
    	        }

    Now, when I sort my portfolio chronologically by date, I have my newest stuff at the top and when someone opens one and clicks on the right navigation arrow, they can navigate through the portfolio in the order they appear on the page. Intuitively, most people want to click the right arrow to navigate what they perceive to be forward, through the portfolio.

    If you care to, you can preview it in action on my site here:

    #1105340

    Hey Tobias,

    Thank you for using Enfold.

    You can edit the includes > loop-index.php file. Look for this code around line 181:

    $blog_meta_output = "<a href='{$link}' class='post-author-format-type'><span class='rounded-container'>".$gravatar.$icon."</span></a>";
    

    Set the href attribute to “get_permalink()”. Or replace the code with:

    $link = get_permalink();
                    $blog_meta_output = "<a href='{$link}' class='post-author-format-type'><span class='rounded-container'>".$gravatar.$icon."</span></a>";
    

    Best regards,
    Ismael

    #1104389

    Hi,

    Thanks for the update.

    Looks for this code around line 709:

    $output .= !empty($excerpt) ? "<div class='slide-entry-excerpt entry-content' $markup>".$excerpt."</div>" : "";
    

    Replace it with:

    $acf_provacat = get_field('provacategorie');
    $output .= "<div class='slide-entry-excerpt entry-content' $markup>".$excerpt.$acf_provacat."</div>";
    

    That should render the value of the provacategorie inside the excerpt container. If you want to place another custom field below the feature image, look for this line:

    $output .= $thumbnail ? "<a href='{$link}' data-rel='slide-".avia_post_slider::$slide."' class='slide-image' title=''>{$thumbnail}</a>" : "";
    

    Just assign the custom field in a variable and render it inside the container as shown above.

    Best regards,
    Ismael

    #1102320

    In reply to: Author's name

    Hi,
    Sorry for the late reply, I still couldn’t login, but I see in your child theme > includes/loop-index.php your code is not correct, I tried to update but could not via the WordPress > Appearance > Editor as it needs to be done via ftp. Please try to correct:
    This is what you have:

    $blog_meta_output = "<a href='{$link}' class='post-author-format-type'><span class='rounded-container'>".$gravatar.$icon."</span></a>";

    it needs to be:

    $blog_meta_output = "<a href='{$link}' class='post-author-format-type'><span class='rounded-container'>".$gravatar.$icon."</span>".$author_name."</a>";

    as you will see you need the “.$author_name.

    Best regards,
    Mike

    #1100036

    In reply to: Author's name

    Hi Mike,

    Thank you for your reply.
    I’ve updated the theme to 4.5.7. It doesn’t work. No author name.
    Here is the code in includes/loop-index.php:
    //$blog_meta_output = “<span class=’rounded-container’>”.$gravatar.$icon.”</span>“;
    $blog_meta_output = “<span class=’rounded-container’>”.$gravatar.$icon.”</span>”.$author_name.”“;
    Another thing. In the category list of posts there are two similar pictures, one thumbnail and one from the post. How can I get rid of the thumbnail in the category list of articles?

    Thank you.

    Hi,

    Thanks for the update.

    Did you enable the excerpt for your posts? Try to place the custom field somewhere else in the file. If you want to add it below the title, look for this line.

    $output .=  "
    <h3 class='slide-entry-title entry-title' $markup><a href='{$link}' title='".esc_attr(strip_tags($title))."'>".$title."</a></h3>
    ";
    

    The site contains nudity or explicit content and I prefer not to open it. I will ask the team to check the thread.

    Best regards,
    Ismael

    Hello Nikko

    Thanks for trying to help me.
    I changed the code to
    $output .= "<a href='{$link}'>More Details</a>";
    which works great in the enfold theme, but not in the child theme (with path config-templatebuilder/avia-shortcodes/portfolio)

    Any clue how can i fix it in my child theme?

    best regards
    velli

    #1084221
    der_velli
    Participant

    Hi

    I want to change the featured image of a blog post from the “small image” in the loop-index.php
    $blog_meta_output = "<a href='{$link}' class='small-preview' title='{$featured_img_desc}'>".$slider.$icon."</a>";
    the css is no problem, but i can’t find where the images size of $slider is defined … any clue?

    #1074968

    I still haven’t made any changes to any file in ENFOLD.
    I only tried this snippet in the my Code-Snippets-Plugin (which holds every snippet that normally goes to the function.php):

    add_filter('avf_loop_index_blog_meta', 'avf_loop_index_blog_meta_mod', 10, 1);
    function avf_loop_index_blog_meta_mod($output) {
    	$link = get_permalink();
    	$fallback = strpos($output, 'iconfont');
    
    	if ($fallback <= 200) {
    	    $output = "<a href='{$link}' class='small-preview' title='Advanced Post'><img src='FALLBACK IMAGE URL HERE'/></a>";
    	}
    
    	return $output;
    }

    But probably that is not the right snippet or it is not complete, so that also at the search results page this default fallback image appears.

    BeeCee
    Participant

    Hi,

    in case I forgot to upload a featured image to
    – posts
    – pages

    I would like to show a default image, that also appears in the search results!

    I found here from @ismael an old snippet:
    https://kriesi.at/support/topic/change-default-thumbnail-image/#post-668404

    add_filter('avf_loop_index_blog_meta', 'avf_loop_index_blog_meta_mod', 10, 1);
    function avf_loop_index_blog_meta_mod($output) {
    	$link = get_permalink();
    	$fallback = strpos($output, 'iconfont');
    
    	if ($fallback <= 200) {
    	    $output = "<a href='{$link}' class='small-preview' title='Advanced Post'><img src='FALLBACK IMAGE URL HERE'/></a>";
    	}
    
    	return $output;
    }

    P.S.: yes, I have replaced in the snippet the right image path :-)

    but when I look at my search results, then all the posts & pages, where I forgot to upload a featured image, still have not the default featured image; maybe this snippet is is not the right one for showing a default featured image of posts & pages (!) in the search results because “iconfont” appears in the snippet?

    Somewhere in the internet I found this snippet, but it still does not work with ENFOLD:

    if ( has_post_thumbnail() ) {
    the_post_thumbnail();
    } else { ?>
    <background-image=url("https://mysite.de/wp-content/uploads/sites/2/2018/10/defaultfeaturedimage.jpg")>
    <?php } 

    Could you please give me a newer, right snippet for it (no plugin)? Thanks a lot.

    #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;
    }
    }
    }
    }

    #997146

    Hey Victoria,

    thanks for your reply! I’ve found the right spot in postslider.php and could mod it successfully :)

    Now I just have one further question: Can I put the modded postslider.php into the child-theme folder?

    Best Regards,
    Birger

    If someone else is interested in the modded postslider.php, here’s the code (whole file):

    <?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;
    			$this->config['disabling_allowed'] = true;
    		}
    		
    		
    		function extra_assets()
    		{
    			//load css
    			wp_enqueue_style( 'avia-module-slideshow' , AviaBuilder::$path['pluginUrlRoot'].'avia-shortcodes/slideshow/slideshow.css' , array('avia-layout'), false );
    			wp_enqueue_style( 'avia-module-postslider' , AviaBuilder::$path['pluginUrlRoot'].'avia-shortcodes/postslider/postslider.css' , array('avia-module-slideshow'), false );
    			
    				//load js
    			wp_enqueue_script( 'avia-module-slideshow' , AviaBuilder::$path['pluginUrlRoot'].'avia-shortcodes/slideshow/slideshow.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" 	=> __("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'] = "<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 = "")
    		{	
    			$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"><a href="'.get_permalink($the_id).'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"></span></a></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 .= "<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><a href='{$link}' title='".esc_attr(strip_tags($title))."'>".$title."</a></h3>";
                        	
    							//	modern business style
                        	if( ( strpos( $new_blogstyle, 'modern-blog' ) !== false ) && ( $new_blogstyle != "" ) ) 
    						{
    							$output .= $meta_out;
    						}
    						
                        	
                        }
                        
                        $output .= '</header>';
    
                      
                        $output .= "</div>";
    
    					$output .= $thumbnail ? "<a href='{$link}' data-rel='slide-".avia_post_slider::$slide."' class='slide-image' title=''>{$thumbnail}</a>" : "";
    					
    					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'>";
    
                        
                        $output .= '</header><br/>';
    
                        if($show_meta && !empty($excerpt))
    					{
    						$meta  = "<div class='slide-meta'>";
    						if ( $commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio')
    						{
    							$link_add = $commentCount === "0" ? "#respond" : "#comments";
    							$text_add = $commentCount === "1" ? __('Comment', 'avia_framework' ) : __('Comments', 'avia_framework' );
    
    							$meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add}</a></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 .= '<br/><span class="av-vertical-delimiter"></span>';
    
                        $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 .= 	"<a href='#prev' class='prev-slide' ".av_icon_string('prev_big').">".__('Previous','avia_framework' )."</a>";
    			$html .= 	"<a href='#next' class='next-slide' ".av_icon_string('next_big').">".__('Next','avia_framework' )."</a>";
    			$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;
    			}
    		}
    	}
    }
    
    #985343
    calebcuster
    Participant

    I’ve read all of the posts about the previous/next arrows on portfolio items not showing only items from the same category but I can’t get them to work. I’m using a child theme and the following in functions.php

    if(!function_exists(‘avia_post_nav’))
    {
    function avia_post_nav($same_category = true, $taxonomy = ‘category’)
    {
    global $wp_version;
    $settings = array();
    $settings[‘same_category’] = $same_category;
    $settings[‘excluded_terms’] = ”;
    $settings[‘wpversion’] = $wp_version;

    //dont display if a fullscreen slider is available since they overlap
    if((class_exists(‘avia_sc_layerslider’) && !empty(avia_sc_layerslider::$slide_count)) ||
    class_exists(‘avia_sc_slider_full’) && !empty(avia_sc_slider_full::$slide_count) ) $settings[‘is_fullwidth’] = true;

    $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[‘next’] = get_previous_post($settings[‘same_category’], $settings[‘excluded_terms’], $settings[‘taxonomy’]);
    $entries[‘prev’] = get_next_post($settings[‘same_category’], $settings[‘excluded_terms’], $settings[‘taxonomy’]);
    }
    else
    {
    $entries[‘next’] = get_previous_post($settings[‘same_category’]);
    $entries[‘prev’] = 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 .= ““;
    $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 .= “
    “;
    }
    return $output;
    }
    }

    But I’m still getting all portfolio items, not just ones in the same category.

    Hey Kornelia,

    If you have a child theme, please add this at the bottom of functions.php:

    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;
      
      //dont display if a fullscreen slider is available since they overlap 
      if((class_exists('avia_sc_layerslider') && !empty(avia_sc_layerslider::$slide_count)) || 
          class_exists('avia_sc_slider_full') && !empty(avia_sc_slider_full::$slide_count) ) $settings['is_fullwidth'] = true;
    
      $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 .= "</a>";
      }
      return $output;
    }

    Hope it helps :)

    Best regards,
    Nikko

    #963274

    Hey manojvinod,

    You will need to override the Image in Avia Layout Builder to do that, but first you need to use a child theme:

    Then follow the instructions here: https://kriesi.at/documentation/enfold/intro-to-advanced-layout-builder/#add-elements-to-alb
    Copy image.php found in enfold > config-templatebuilder > avia-shortcodes > image folder then paste it to the shortcodes folder in the child theme.
    Find this code (line 548):

    $output.= "<a href='{$link}' class='avia_image'  {$blank}>{$overlay}<img class='avia_image ' src='{$src}' alt='{$alt}' title='{$title}' $markup_url /></a>";

    then insert the nofollow code. Hope this helps :)

    Best regards,
    Nikko

    #959509

    Hey Sujohn,
    The whole function would begin with “if(”
    Try using this:

    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;
            
    		//dont display if a fullscreen slider is available since they overlap 
    		if((class_exists('avia_sc_layerslider') && !empty(avia_sc_layerslider::$slide_count)) || 
    			class_exists('avia_sc_slider_full') && !empty(avia_sc_slider_full::$slide_count) ) $settings['is_fullwidth'] = true;
    
    		$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;
    	}
    }

    Best regards,
    Mike

    #946355

    Hey victoriahepburn,

    Thank you for using Enfold.

    That is possible but you have to modify one of the parent theme files. Edit the config-templatebuilder > aviashortcodes > postslider.php file and look for this code around line 621.

    $markup = avia_markup_helper(array('context' => 'entry_time','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup));
    

    Add this code above it.

    $author_name = apply_filters('avf_author_name', get_the_author_meta('display_name', $post->post_author), $post->post_author);
    						$author_email = apply_filters('avf_author_email', get_the_author_meta('email', $post->post_author), $post->post_author);
    						$link = get_author_posts_url($post->post_author);
    
    						$meta .= "<a href='{$link}' class='post-author-format-type'>$author_name</a>";
    						$meta .= "<div class='slide-meta-del'>/</div>";
    

    Best regards,
    Ismael

    #925573

    $output .= $thumbnail ? "<a href='{$link}' data-rel='slide-".avia_post_slider::$slide."' class='slide-image' title=''>{$thumbnail}</a>" : "";

    #925572

    I had tried to change. Nothing changed.
    The previous configration below:
    $output .= $thumbnail ? “{$thumbnail}” : “”;

    How to change in a correct way?
    Thanks a lot

Viewing 30 results - 31 through 60 (of 247 total)