Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #417069

    Ok Guys, I need your help.

    I made a research on the complete Suport site, but not exactly found what I am searching for.
    I want to add the breadcrumb from its actually position in between the yvia content session (exactly under a slider, Google maps etc. )

    So one easy solution could be, if there is a shortcode for dislaying the breadcrumb, Maybe I can create may own.

    I found the Function and added to my child-theme.
    I found the template-builder.php and the line 18, where the breadcrumb is dropped into the template.
    – – – – – – – – – – – – – – – —
    Can You help me to put this via a textsnippet in to the Layout builder?

    #417079

    Hi Rafíyel!

    Please refer to my post here – https://kriesi.at/support/topic/add-breadcrumbs-to-page/#post-384515

    Regards,
    Yigit

    #417087

    Hi can´t find any solutions at least the topic is closed.

    Actually I found one solution: making my self a shortcode [bread_crumb]

    function bread_crumb_func ($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') 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 container_breadcrumb'>{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'] = "";
    		}
    		
    		//disable breadcrumb if requested
    		if($header_settings['header_title_bar'] == 'title_bar') $defaults['breadcrumb'] = false;
    		
    		//disable title if requested
    		if($header_settings['header_title_bar'] == 'breadcrumbs_only') $defaults['title'] = '';
    
    		// 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);
    
    		// 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)) $title = "<a href='".$link."' rel='bookmark' title='".__('Permanent Link:','avia_framework')." ".esc_attr( $title )."' $markup>".$title."</a>";
    		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;
    		}
    	}
    add_shortcode( 'bread_crumb', 'bread_crumb_func' );
    • This reply was modified 9 years, 9 months ago by Raphael.
    #417095

    But now I have two functions, the original one and the shortcode add function.

    It would be easier to call the main breadcrumb function to show in between the shortdode. Can you help me with that?

    #417123

    Solution was simple … with the shortcode in the Layoutbuilder:
    [bread_crumb]

    after the breadcrumb function in the functions-enfold.php add the following line.
    add_shortcode( ‘bread_crumb’, ‘avia_title’ );

    Done

    (why i found this solution so simple and can´t find any solution posted in the support. Many people asking for this snippet

    #417128

    Hey!

    Glad you figured it out and thank you for sharing your solution. I will add it to our documentation :)

    Cheers!
    Yigit

    #427122

    Hi together,

    I’m a newbie with the nice Enfold theme and need some help. I also want to move the breadcrumbs and found this topic, but the solution doesn’t work. I edited my functions-enfold.php like it’s described here and added the shortcode [bread_crumb] to a codeblock in the Layout builder, but at the frontend it is always displayed as [bread_crumb].

    What is the exact place to add the code “add_shortcode( ‘bread_crumb’, ‘avia_title’ );” in the functions-enfold.php? What does it mean, “right after closing of ‘//advanced title + breadcrumb function’ function” ?

    It would be nice if you can help me.

    Regards,
    Andreas

    #427511

    Hi!

    @dreamworker80

    You can put

    
    add_shortcode( ‘bread_crumb’, ‘avia_title’ );
    

    at the end of functions.php OR at the end of functions-enfold.php.

    See also: http://kriesi.at/documentation/enfold/inserting-breadcrumbs-as-shortcode/

    But this code displays title and breadcrumbs.

    There have been several requests already. I will talk to Kriesi for implementing a more sophoisticated solution.

    Regards,
    Günter

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