Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • Hi, I’m trying amb works like a charm.
    In my particular case i’m using

    
      #top #header .av-main-nav li:nth-child(4) {
            margin-right: 60vw;
      }
    

    But brokes all in different resolutions. I have:

    projects team services blog —– logo ——————————-contact [wpml menu lang]

    I need contact amb wpml menu always sticked to right, but with vw solution always move arround when resolution is lower. Any other solution?

    Really Thanks

    in reply to: Add Metabox to Portfolio item #1136522

    Hi,

    it’s old topic, but changing post to portfolio works:

    
    function prfx_custom_meta() {
        add_meta_box( 'prfx_meta', __( 'Featured Post Startseite', 'prfx-textdomain' ), 'prfx_meta_callback', 'portfolio');
    }
    add_action( 'add_meta_boxes', 'prfx_custom_meta' );
    
    • This reply was modified 5 years, 2 months ago by fromcouch.
    in reply to: enfold button nofollow shortcode #1108102

    Still Javascript. All methods involve javascript are bad practice and google bot penalises.

    Regards,

    in reply to: enfold button nofollow shortcode #1107170

    Some times I don’t understand moderators and the knowledge that they have. Sorry for this comment but is true, a lot of times your solutions aren’t the good ones or simply no solution for some simple think. Maybe your support team isn’t telling you the good answers.

    The javascript solution isn’t a good one because “nofollow” is just to tell google that the link doesn’t need to follow and index and google bot knows when some attributes are added via javascript and drop a little bit in search points because isn’t good practice.

    Enfold have ‘nofollow’ for button links by default, but is deactivated. You only need to add:

    
    add_theme_support('avia_rel_nofollow_for_links');
    

    to functions.php and the option appear in Open Link in new Window? selector.

    A little bit of deep code navigation in av_button shortcode file shows me the solution.

    Enjoy

    @corefocusgroup stop please, I was discussed before, using robots.txt isn’t a valid solution for us. Or did not you read the whole post?

    I’m not tested yet because my first solution was deactivate search nav in my wordpress.
    But this maybe works (add to functions of child theme)

    add_filter( 'wp_nav_menu_items', function($items, $args) {
        return str_replace('href="?s="', 'href="#"', $items);
    }, 9999, 2 );

    However, any idea why this has suddenly become an issue – sometime in the last few weeks.

    Really no idea. Google change their mind quickly with this kind of questions. Another thing that can happen is that Kriesi has changed something in Enfold theme raising this 404.

    Really I don’t know. I’m using Enfold from one year and is the first time I see this.

    Regards,

    Not a valid solution, problem still there.
    I think is better if you change line 126 of functions-enfold.php and change
    ?s=

    for a valid:
    #

    final line will be:
    <a href="#" data-avia-search-tooltip="'.$form.'" '.av_icon_string('search').'><span class="avia_hidden_link_text">'.__('Search','avia_framework').'</span></a>

    Credentials in Private field.

    Please, use our test environment. Have same problem.

    in reply to: Change Portfolio/Masonry Sort Options to checkboxes #584101

    Hey Guys, very disappointed, I’m not paying support for get this templated answer. I think that is not complex question and answer. I have been forced in do a deep investigation in your code, this is my answer to my question:

    First of all you need to know that i’m using a child theme because I want to update enfold in a future. I think (but not tested) that this code works in normal enfold functions.php but i wrote this code in child theme functions.php :

    
    add_action( 'init', function () {
    	
    	//we need new portfolio class extending actual portfolio class
    	class ebavs_portfolio extends avia_sc_portfolio {
    
    		//this method is called when shortcode needs to render, we need override and then copy and paste original content 
    		public function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
    		{
    			$atts['class'] = !empty($meta['custom_class']) ? $meta['custom_class'] : "";
    			
    			if(current_theme_supports('avia_template_builder_custom_post_type_grid'))
    			{
    			    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];
    			        }
    			    }
    			
    				if(empty($atts['post_type']) || !current_theme_supports('add_avia_builder_post_type_option'))
    				{
    					$atts['post_type'] = get_post_types();
    				}
    
    				if(is_string($atts['post_type'])) $atts['post_type'] = explode(',', $atts['post_type']);
    			}
    			
    			$atts['fullscreen'] = ShortcodeHelper::is_top_level();
    
    			// HERE WE CHANGE $grid TO NEW OBJECT
    			$grid = new ebavs_post_grid($atts);
    			$grid->query_entries();
    			$portfolio_html = $grid->html();
    		
    			if(!ShortcodeHelper::is_top_level()) 
    			return $portfolio_html . '<!-- ebavs -->';
    			
    			
    			$params['class'] = "main_color avia-no-border-styling avia-fullwidth-portfolio ".$meta['el_class'];
    			$params['open_structure'] = false;
    			$params['id'] = !empty($atts['id']) ? AviaHelper::save_string($atts['id'],'-') : "";
    			$params['custom_markup'] = $meta['custom_markup'];
    			
    			//we dont need a closing structure if the element is the first one or if a previous fullwidth element was displayed before
    			if(isset($meta['index']) && $meta['index'] == 0) $params['close'] = false;
    			if(!empty($meta['siblings']['prev']['tag']) && in_array($meta['siblings']['prev']['tag'], AviaBuilder::$full_el_no_section )) $params['close'] = false;
    				
    			$output  =  avia_new_section($params);
    			$output .= $portfolio_html;
    			$output .= avia_section_after_element_content( $meta , 'after_portfolio' );
    			
    			return $output . '<!-- ebavs -->';
    		}
    
    	}
    
    	// Create new Grid class and extends the original
    	class ebavs_post_grid extends avia_post_grid { 
    
    		// override sort buttons, this methods render html for sort bar
    		protected function sort_buttons($entries, $params)
    		{
    			//get all categories that are actually listed on the page
    			$categories = get_categories(array(
    				'taxonomy'	=> $params['taxonomy'],
    				'hide_empty'=> 0
    			));
    
    			$current_page_cats 	= array();
    			$cat_count 			= array();
    			$display_cats 		= is_array($params['categories']) ? $params['categories'] : array_filter(explode(',',$params['categories']));
    
    			foreach ($entries as $entry)
    			{
    				if($current_item_cats = get_the_terms( $entry->ID, $params['taxonomy'] ))
    				{
    					if(!empty($current_item_cats))
    					{
    						foreach($current_item_cats as $current_item_cat)
    						{
    							if(empty($display_cats) || in_array($current_item_cat->term_id, $display_cats))
    							{
    								$current_page_cats[$current_item_cat->term_id] = $current_item_cat->term_id;
    
    								if(!isset($cat_count[$current_item_cat->term_id] ))
    								{
    									$cat_count[$current_item_cat->term_id] = 0;
    								}
    
    								$cat_count[$current_item_cat->term_id] ++;
    							}
    						}
    					}
    				}
    			}
    
    			// DRAW HERE YOUR HTML
    			$output = 'new sort buttons';
    			return $output;
    			
    		}
    
    	}
    
    	// Look for builder Avia Object
    	global $builder;
    
    	// Magic here, change portfolio class by our new class
    	$builder->shortcode_class['avia_sc_portfolio'] = new ebavs_portfolio( $builder ); 
    	
    	// init new object
    	$builder->shortcode_class['avia_sc_portfolio']->init();
    
    	// and replace the named class for shortcode
    	$builder->shortcode[$builder->shortcode_class['avia_sc_portfolio']->config['shortcode']] = 'ebavs_portfolio';
    
    	// this shortcode have a heavy css and js components, you can add your new js and css in this point
    },'100');
    

    As you can see only few lines of code explaining how you can override portfolio sort buttons, masonry is similar.

    in reply to: Magnifier Plugin for Enfold (No Woocommerce) #522264

    Hi, thanks for quick response. Finally we decided not use magnifier because a lot of plugins don’t work with Enfold.
    We try again the next ones with Portfolio Image and image overlay disabled with next results:

    • Zoom Image – Not Work
    • Wd Image Magnifier – Not Work
    • Image Magnify – Not Work
    • Image Zoom – Work
    • WP Image Zoooom – Not Work

    Thanks a lot,
    Victor

    in reply to: Magnifier Plugin for Enfold (No Woocommerce) #520887

    Hi Yigit,

    i will try,

    thank you

Viewing 12 posts - 1 through 12 (of 12 total)