Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27798

    Hi,

    I was wondering if there was a way to have the breadcrumb display items based on the Menu Structure rather than the page’s parent-child relationship?

    If this is not possible, perhaps I can use something like this?

    http://codecanyon.net/item/wp-nav-menu-breadcrumbs/4706192

    Please give me your thoughts. Thanks.

    #135392

    Hi,

    I’m sure it is possible to use the plugin. You can then insert the breadcrumb code on functions-enfold.php, find this code:

    //advanced title + breadcrumb function
    if(!function_exists('avia_title'))
    {
    function avia_title($args = false, $id = false)
    {
    global $avia_config;

    if(!$id) $id = avia_get_the_id();

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

    // OPTIONAL: Declare each item in $args as its own variable i.e. $type, $before.
    extract( $args, EXTR_SKIP );

    if(empty($title)) $class .= " empty_title ";
    if(!empty($link)) $title = "<a href='".$link."' rel='bookmark' title='".__('Permanent Link:','avia_framework')." ".esc_attr( $title )."'>".$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;
    }
    }
    }

    Please hire a freelance developer to help you integrate the plugin.

    Regards,

    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Breadcrumb based on Menu Structure’ is closed to new replies.