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

    Hey Yigit,

    you have send me this code for the functions.php to remove breadcrumps from single events page. Is it possible to keep the colored title bar and only remove the breadcrumps ?

    function avia_title($args = false, $id = false)
    	{
    		global $avia_config;
    
    		if(!$id) $id = avia_get_the_id();
    		
    		$header_settings = avia_header_setting();
    		if($header_settings['header_title_bar'] == 'hidden_title_bar' || is_singular( 'tribe_events' )) return "";
    		
    		$defaults 	 = array(
    
    			'title' 		=> get_the_title($id),
    			'subtitle' 		=> "", //avia_post_meta($id, 'subtitle'),
    			'link'			=> get_permalink($id),
    			'html'			=> "<div class='{class} title_container'><div class='container'><{heading} class='main-title entry-title'>{title}</{heading}>{additions}</div></div>",
    			'class'			=> 'stretch_full container_wrap alternate_color '.avia_is_dark_bg('alternate_color', true),
    			'breadcrumb'	=> true,
    			'additions'		=> "",
    			'heading'		=> 'h1' //headings are set based on this article: http://yoast.com/blog-headings-structure/
    		);
    
    		if ( is_tax() || is_category() || is_tag() )
    		{
    			global $wp_query;
    
    			$term = $wp_query->get_queried_object();
    			$defaults['link'] = get_term_link( $term );
    		}
    		else if(is_archive())
    		{
    			$defaults['link'] = "";
    		}
    		
    		
    		// Parse incomming $args into an array and merge it with $defaults
    		$args = wp_parse_args( $args, $defaults );
    		$args = apply_filters('avf_title_args', $args, $id);
    
    		//disable breadcrumb if requested
    		if($header_settings['header_title_bar'] == 'title_bar') $args['breadcrumb'] = false;
    		
    		//disable title if requested
    		if($header_settings['header_title_bar'] == 'breadcrumbs_only') $args['title'] = '';
    
    		// OPTIONAL: Declare each item in $args as its own variable i.e. $type, $before.
    		extract( $args, EXTR_SKIP );
    
    		if(empty($title)) $class .= " empty_title ";
            $markup = avia_markup_helper(array('context' => 'avia_title','echo'=>false));
    		if(!empty($link) && !empty($title)) $title = "".$title."";
    		if(!empty($subtitle)) $additions .= "<div class='title_meta meta-color'>".wpautop($subtitle)."</div>";
    		if($breadcrumb) $additions .= avia_breadcrumbs(array('separator' => '/', 'richsnippet' => true));
    
    		$html = str_replace('{class}', $class, $html);
    		$html = str_replace('{title}', $title, $html);
    		$html = str_replace('{additions}', $additions, $html);
    		$html = str_replace('{heading}', $heading, $html);
    
    		if(!empty($avia_config['slide_output']) && !avia_is_dynamic_template($id) && !avia_is_overview())
    		{
    			$avia_config['small_title'] = $title;
    		}
    		else
    		{
    			return $html;
    		}
    	}

    Thanks
    krumm

    • This topic was modified 7 years, 11 months ago by krummnagel.
    #721100

    Hey krummnagel,

    Please add following code to Functions.php file in Appearance > Editor

    add_filter('avf_title_args', 'fix_events_post_title', 10, 2);
    function fix_events_post_title($args,$id)
    {
        if (is_singular( 'tribe_events' ))
        {
            $args['breadcrumb'] = false;
        }
    
        return $args;
    }

    Best regards,
    Yigit

    #722746

    Hi Yigit,
    sorry for being late at this. i missed your answer. I added the code but it does not seem to have any effect.

    The title bar is still missing. see for example the page in the private area. Any ideas ?

    thank you very much for your help

    krumm

    #722893

    Hi,

    I removed this code – http://pastebin.com/TEQf6zhc from functions.php file and it is working now. Please review your website :)

    Best regards,
    Yigit

    #725341

    Thank you very much Yigit ! Good work as always.

    Thanks krumm

    #725347

    Hi!

    Glad we could help! Let us know if you have any other questions or issues and enjoy your weekend!

    Best regards,
    Yigit

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